Skip to content

Commit

Permalink
Check for import aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
axic committed Feb 11, 2017
1 parent cf8e222 commit 72fea3b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions libsolidity/analysis/StaticAnalyzer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,13 @@ bool StaticAnalyzer::visit(EventDefinition const& _event)
bool StaticAnalyzer::visit(ImportDirective const& _import)
{
checkShadowingBuiltin(_import);
for (auto const& alias: _import.symbolAliases())
{
ASTString aliasName = *(alias.second.get());
for (string const name: m_globals)
if (name == aliasName)
warning(_import.location(), "Shadowing builtin symbol \"" + name + "\".");
}
return true;
}

Expand Down

0 comments on commit 72fea3b

Please sign in to comment.