mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Use assert to check zero size base type
This commit is contained in:
parent
8a6aa53791
commit
5394435bea
@ -243,12 +243,7 @@ void DeclarationTypeChecker::endVisit(ArrayTypeName const& _typeName)
|
|||||||
solAssert(!m_errorReporter.errors().empty(), "");
|
solAssert(!m_errorReporter.errors().empty(), "");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (baseType->storageBytes() == 0)
|
solAssert(baseType->storageBytes() != 0, "Illegal base type of storage size zero for array.");
|
||||||
m_errorReporter.fatalTypeError(
|
|
||||||
6493_error,
|
|
||||||
_typeName.baseType().location(),
|
|
||||||
"Illegal base type of storage size zero for array."
|
|
||||||
);
|
|
||||||
if (Expression const* length = _typeName.length())
|
if (Expression const* length = _typeName.length())
|
||||||
{
|
{
|
||||||
TypePointer& lengthTypeGeneric = length->annotation().type;
|
TypePointer& lengthTypeGeneric = length->annotation().type;
|
||||||
|
Loading…
Reference in New Issue
Block a user