Skip to content

Commit

Permalink
Fix: remove reference.
Browse files Browse the repository at this point in the history
  • Loading branch information
chriseth authored and axic committed Feb 13, 2018
1 parent 5747985 commit 1dcd7c5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions libsolidity/analysis/ReferencesResolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,10 @@ bool ReferencesResolver::visit(Identifier const& _identifier)
auto declarations = m_resolver.nameFromCurrentScope(_identifier.name());
if (declarations.empty())
{
string const& suggestions = m_resolver.similarNameSuggestions(_identifier.name());
string errorMessage = "Undeclared identifier." + (suggestions.empty()? "": " Did you mean " + suggestions + "?");
string suggestions = m_resolver.similarNameSuggestions(_identifier.name());
string errorMessage =
"Undeclared identifier." +
(suggestions.empty()? "": " Did you mean " + std::move(suggestions) + "?");
declarationError(_identifier.location(), errorMessage);
}
else if (declarations.size() == 1)
Expand Down

0 comments on commit 1dcd7c5

Please sign in to comment.