mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Warn about side-effect free statements.
This commit is contained in:
@@ -1674,8 +1674,8 @@ bool TypeChecker::visit(Identifier const& _identifier)
|
||||
if (auto variableDeclaration = dynamic_cast<VariableDeclaration const*>(annotation.referencedDeclaration))
|
||||
annotation.isPure = annotation.isConstant = variableDeclaration->isConstant();
|
||||
else if (dynamic_cast<MagicVariableDeclaration const*>(annotation.referencedDeclaration))
|
||||
if (auto functionType = dynamic_cast<FunctionType const*>(annotation.type.get()))
|
||||
annotation.isPure = functionType->isPure();
|
||||
if (dynamic_cast<FunctionType const*>(annotation.type.get()))
|
||||
annotation.isPure = true;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user