mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Consider fixed size array members when checking for recursive structs.
This commit is contained in:
parent
5d8a8f7265
commit
d4dfd28694
@ -607,6 +607,12 @@ bool TypeChecker::visit(StructDefinition const& _struct)
|
||||
auto const& typeName = dynamic_cast<UserDefinedTypeName const&>(*member->typeName());
|
||||
check(&dynamic_cast<StructDefinition const&>(*typeName.annotation().referencedDeclaration), parents);
|
||||
}
|
||||
else if (auto arrayType = dynamic_cast<ArrayType const*>(type(*member).get()))
|
||||
{
|
||||
if (!arrayType->isDynamicallySized())
|
||||
if (auto structType = dynamic_cast<StructType const*>(arrayType->baseType().get()))
|
||||
check(&structType->structDefinition(), parents);
|
||||
}
|
||||
};
|
||||
check(&_struct, StructPointersSet{});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user