From 90c519d08f9de494369d122296ae6a9ca0445dad Mon Sep 17 00:00:00 2001 From: chriseth Date: Tue, 17 Mar 2015 18:34:57 +0100 Subject: [PATCH] Disallowed special case of bytes0 arrays. --- Types.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Types.cpp b/Types.cpp index 14ea4c73c..a718ee4f9 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())