mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Modifier invocation can be base constructor call
This commit is contained in:
parent
d6861d909c
commit
7886c24d40
@ -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), "");
|
||||||
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user