mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Fix segfault with undeclared array types
This commit is contained in:
@@ -153,6 +153,11 @@ void ReferencesResolver::endVisit(Mapping const& _typeName)
|
||||
void ReferencesResolver::endVisit(ArrayTypeName const& _typeName)
|
||||
{
|
||||
TypePointer baseType = _typeName.baseType().annotation().type;
|
||||
if (!baseType)
|
||||
{
|
||||
solAssert(!m_errorReporter.errors().empty(), "");
|
||||
return;
|
||||
}
|
||||
if (baseType->storageBytes() == 0)
|
||||
fatalTypeError(_typeName.baseType().location(), "Illegal base type of storage size zero for array.");
|
||||
if (Expression const* length = _typeName.length())
|
||||
|
||||
Reference in New Issue
Block a user