Merge pull request #4769 from ethereum/inlineasm-overloading-resolution

Provide nicer error message when referencing overloaded references
This commit is contained in:
Alex Beregszaszi
2018-08-08 17:55:10 +01:00
committed by GitHub
3 changed files with 15 additions and 0 deletions
@@ -264,7 +264,10 @@ bool ReferencesResolver::visit(InlineAssembly const& _inlineAssembly)
declarations = m_resolver.nameFromCurrentScope(realName);
}
if (declarations.size() != 1)
{
declarationError(_identifier.location, "Multiple matching identifiers. Resolving overloaded identifiers is not supported.");
return size_t(-1);
}
if (auto var = dynamic_cast<VariableDeclaration const*>(declarations.front()))
if (var->isLocalVariable() && _crossesFunctionBoundary)
{