mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Proper error message for missing variables in inline assembly
This commit is contained in:
@@ -298,11 +298,13 @@ bool ReferencesResolver::visit(InlineAssembly const& _inlineAssembly)
|
||||
}
|
||||
declarations = m_resolver.nameFromCurrentScope(realName);
|
||||
}
|
||||
if (declarations.size() != 1)
|
||||
if (declarations.size() > 1)
|
||||
{
|
||||
declarationError(_identifier.location, "Multiple matching identifiers. Resolving overloaded identifiers is not supported.");
|
||||
return size_t(-1);
|
||||
}
|
||||
else if (declarations.size() == 0)
|
||||
return size_t(-1);
|
||||
if (auto var = dynamic_cast<VariableDeclaration const*>(declarations.front()))
|
||||
if (var->isLocalVariable() && _crossesFunctionBoundary)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user