mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
committed by
chriseth
parent
5ad590cf0b
commit
9f8d49e358
@@ -547,11 +547,7 @@ void TypeChecker::visitManually(
|
||||
for (ASTPointer<Expression> const& argument: arguments)
|
||||
argument->accept(*this);
|
||||
|
||||
{
|
||||
m_insideModifierInvocation = true;
|
||||
ScopeGuard resetFlag{[&] () { m_insideModifierInvocation = false; }};
|
||||
_modifier.name()->accept(*this);
|
||||
}
|
||||
_modifier.name()->accept(*this);
|
||||
|
||||
auto const* declaration = &dereference(*_modifier.name());
|
||||
vector<ASTPointer<VariableDeclaration>> emptyParameterList;
|
||||
@@ -2704,15 +2700,6 @@ bool TypeChecker::visit(Identifier const& _identifier)
|
||||
);
|
||||
}
|
||||
|
||||
if (!m_insideModifierInvocation)
|
||||
if (ModifierType const* type = dynamic_cast<decltype(type)>(_identifier.annotation().type))
|
||||
{
|
||||
m_errorReporter.typeError(
|
||||
_identifier.location(),
|
||||
"Modifier can only be referenced in function headers."
|
||||
);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user