From 3c791d637d6bdf709ec272e6c8cf9ff51abd34ef Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Wed, 8 Aug 2018 15:55:41 +0100 Subject: Provide nicer error message when referencing overloaded references --- libsolidity/analysis/ReferencesResolver.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libsolidity') 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(declarations.front())) if (var->isLocalVariable() && _crossesFunctionBoundary) { -- cgit