Merge pull request #5049 from ethereum/structtype-assert-annotation

Add assertion for annotated type in Structtype::canBeUsedExternally
This commit is contained in:
Alex Beregszaszi 2018-09-21 15:02:26 +01:00 committed by GitHub
commit 8f96fe698d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2126,8 +2126,11 @@ bool StructType::canBeUsedExternally(bool _inLibrary) const
// passed by value and thus the encoding does not differ, but it will disallow
// mappings.
for (auto const& var: m_struct.members())
{
solAssert(var->annotation().type, "");
if (!var->annotation().type->canBeUsedExternally(false))
return false;
}
}
return true;
}