mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Disallow magic variables in inline assembly
This commit is contained in:
@@ -592,6 +592,10 @@ bool TypeChecker::visit(InlineAssembly const& _inlineAssembly)
|
||||
unsigned pushes = 0;
|
||||
if (dynamic_cast<FunctionDefinition const*>(declaration))
|
||||
pushes = 1;
|
||||
else if (dynamic_cast<MagicVariableDeclaration const*>(declaration))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else if (auto var = dynamic_cast<VariableDeclaration const*>(declaration))
|
||||
{
|
||||
if (var->isConstant())
|
||||
|
||||
Reference in New Issue
Block a user