aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/analysis/ReferencesResolver.cpp
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2018-08-08 22:55:41 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2018-08-08 22:59:24 +0800
commit3c791d637d6bdf709ec272e6c8cf9ff51abd34ef (patch)
treea2464e62ca686131e732bf04fbc2fed81c94cb38 /libsolidity/analysis/ReferencesResolver.cpp
parent863778fe3614f8387723572693f276f66321fd74 (diff)
downloaddexon-solidity-3c791d637d6bdf709ec272e6c8cf9ff51abd34ef.tar.gz
dexon-solidity-3c791d637d6bdf709ec272e6c8cf9ff51abd34ef.tar.zst
dexon-solidity-3c791d637d6bdf709ec272e6c8cf9ff51abd34ef.zip
Provide nicer error message when referencing overloaded references
Diffstat (limited to 'libsolidity/analysis/ReferencesResolver.cpp')
-rw-r--r--libsolidity/analysis/ReferencesResolver.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/libsolidity/analysis/ReferencesResolver.cpp b/libsolidity/analysis/ReferencesResolver.cpp
index 501521f5..2cf09eff 100644
--- a/libsolidity/analysis/ReferencesResolver.cpp
+++ b/libsolidity/analysis/ReferencesResolver.cpp
@@ -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)
{