aboutsummaryrefslogtreecommitdiffstats
path: root/Types.h
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2015-03-17 00:52:19 +0800
committerchriseth <c@ethdev.com>2015-03-18 01:13:28 +0800
commit2cde4f34044b89bb8bced05cab308c0093bd192d (patch)
tree00c787836993fccec01d16a6ecf5ed072b8e6c2a /Types.h
parent895c08342c4b236c2928a5af9fb23def218eca3d (diff)
downloaddexon-solidity-2cde4f34044b89bb8bced05cab308c0093bd192d.tar.gz
dexon-solidity-2cde4f34044b89bb8bced05cab308c0093bd192d.tar.zst
dexon-solidity-2cde4f34044b89bb8bced05cab308c0093bd192d.zip
Packing for arrays.
Diffstat (limited to 'Types.h')
-rw-r--r--Types.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/Types.h b/Types.h
index c7dbcdeb..c90aabda 100644
--- a/Types.h
+++ b/Types.h
@@ -335,13 +335,22 @@ public:
/// Constructor for a byte array ("bytes")
explicit ArrayType(Location _location):
- m_location(_location), m_isByteArray(true), m_baseType(std::make_shared<IntegerType>(8)) {}
+ m_location(_location),
+ m_isByteArray(true),
+ m_baseType(std::make_shared<FixedBytesType>(8))
+ {}
/// Constructor for a dynamically sized array type ("type[]")
ArrayType(Location _location, const TypePointer &_baseType):
- m_location(_location), m_baseType(_baseType) {}
+ m_location(_location),
+ m_baseType(_baseType)
+ {}
/// Constructor for a fixed-size array type ("type[20]")
ArrayType(Location _location, const TypePointer &_baseType, u256 const& _length):
- m_location(_location), m_baseType(_baseType), m_hasDynamicLength(false), m_length(_length) {}
+ m_location(_location),
+ m_baseType(_baseType),
+ m_hasDynamicLength(false),
+ m_length(_length)
+ {}
virtual bool isImplicitlyConvertibleTo(Type const& _convertTo) const override;
virtual TypePointer unaryOperatorResult(Token::Value _operator) const override;