diff options
author | chriseth <c@ethdev.com> | 2015-03-18 01:34:57 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2015-03-18 01:34:57 +0800 |
commit | 90c519d08f9de494369d122296ae6a9ca0445dad (patch) | |
tree | b51f291cead59cc9d0f13656fc7c6b515fc0c478 /Types.cpp | |
parent | 2cde4f34044b89bb8bced05cab308c0093bd192d (diff) | |
download | dexon-solidity-90c519d08f9de494369d122296ae6a9ca0445dad.tar.gz dexon-solidity-90c519d08f9de494369d122296ae6a9ca0445dad.tar.zst dexon-solidity-90c519d08f9de494369d122296ae6a9ca0445dad.zip |
Disallowed special case of bytes0 arrays.
Diffstat (limited to 'Types.cpp')
-rw-r--r-- | Types.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -184,6 +184,8 @@ TypePointer Type::fromArrayTypeName(TypeName& _baseTypeName, Expression* _length TypePointer baseType = _baseTypeName.toType(); if (!baseType) BOOST_THROW_EXCEPTION(_baseTypeName.createTypeError("Invalid type name.")); + if (baseType->getStorageBytes() == 0) + BOOST_THROW_EXCEPTION(_baseTypeName.createTypeError("Illegal base type of storage size zero for array.")); if (_length) { if (!_length->getType()) |