diff options
author | chriseth <c@ethdev.com> | 2015-03-17 00:52:19 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2015-03-18 01:13:28 +0800 |
commit | 2cde4f34044b89bb8bced05cab308c0093bd192d (patch) | |
tree | 00c787836993fccec01d16a6ecf5ed072b8e6c2a /Types.h | |
parent | 895c08342c4b236c2928a5af9fb23def218eca3d (diff) | |
download | dexon-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.h | 15 |
1 files changed, 12 insertions, 3 deletions
@@ -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; |