From 5394435bea4e553a86f872b6b2512c50bdef1628 Mon Sep 17 00:00:00 2001 From: a3d4 Date: Mon, 27 Jul 2020 20:31:51 +0200 Subject: [PATCH] Use assert to check zero size base type --- libsolidity/analysis/DeclarationTypeChecker.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/libsolidity/analysis/DeclarationTypeChecker.cpp b/libsolidity/analysis/DeclarationTypeChecker.cpp index 15cbc30ba..96b71f45e 100644 --- a/libsolidity/analysis/DeclarationTypeChecker.cpp +++ b/libsolidity/analysis/DeclarationTypeChecker.cpp @@ -243,12 +243,7 @@ void DeclarationTypeChecker::endVisit(ArrayTypeName const& _typeName) solAssert(!m_errorReporter.errors().empty(), ""); return; } - if (baseType->storageBytes() == 0) - m_errorReporter.fatalTypeError( - 6493_error, - _typeName.baseType().location(), - "Illegal base type of storage size zero for array." - ); + solAssert(baseType->storageBytes() != 0, "Illegal base type of storage size zero for array."); if (Expression const* length = _typeName.length()) { TypePointer& lengthTypeGeneric = length->annotation().type;