aboutsummaryrefslogtreecommitdiffstats
path: root/Types.cpp
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2015-03-18 01:34:57 +0800
committerchriseth <c@ethdev.com>2015-03-18 01:34:57 +0800
commit90c519d08f9de494369d122296ae6a9ca0445dad (patch)
treeb51f291cead59cc9d0f13656fc7c6b515fc0c478 /Types.cpp
parent2cde4f34044b89bb8bced05cab308c0093bd192d (diff)
downloaddexon-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.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/Types.cpp b/Types.cpp
index 14ea4c73..a718ee4f 100644
--- a/Types.cpp
+++ b/Types.cpp
@@ -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())