Modifier invocation can be base constructor call

This commit is contained in:
chriseth 2017-08-31 16:03:50 +02:00
parent d6861d909c
commit 7886c24d40

View File

@ -302,10 +302,12 @@ void ViewPureChecker::endVisit(IndexAccess const& _indexAccess)
void ViewPureChecker::endVisit(ModifierInvocation const& _modifier) void ViewPureChecker::endVisit(ModifierInvocation const& _modifier)
{ {
solAssert(_modifier.name(), ""); solAssert(_modifier.name(), "");
ModifierDefinition const* mod = dynamic_cast<decltype(mod)>(_modifier.name()->annotation().referencedDeclaration); if (ModifierDefinition const* mod = dynamic_cast<decltype(mod)>(_modifier.name()->annotation().referencedDeclaration))
solAssert(mod, ""); {
solAssert(m_inferredMutability.count(mod), ""); solAssert(m_inferredMutability.count(mod), "");
reportMutability(m_inferredMutability.at(mod), _modifier.location()); reportMutability(m_inferredMutability.at(mod), _modifier.location());
} }
else
solAssert(dynamic_cast<ContractDefinition const*>(_modifier.name()->annotation().referencedDeclaration), "");
}