Skip to content

Commit

Permalink
Rename warning text to 'builtin symbol'
Browse files Browse the repository at this point in the history
  • Loading branch information
axic committed Feb 2, 2017
1 parent 39feb8d commit d287927
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions libsolidity/analysis/StaticAnalyzer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ bool StaticAnalyzer::visit(FunctionDefinition const& _function)

for (Declaration const* declaration: m_globals)
if (declaration->name() == _function.name())
warning(_function.location(), "Shadowing global function \"" + _function.name() + "\".");
warning(_function.location(), "Shadowing builtin symbol \"" + _function.name() + "\".");

return true;
}
Expand All @@ -77,7 +77,7 @@ bool StaticAnalyzer::visit(VariableDeclaration const& _variable)
{
for (Declaration const* declaration: m_globals)
if (declaration->name() == _variable.name())
warning(_variable.location(), "Shadowing global variable \"" + _variable.name() + "\".");
warning(_variable.location(), "Shadowing builtin symbol \"" + _variable.name() + "\".");

return true;
}
Expand Down
4 changes: 2 additions & 2 deletions test/libsolidity/SolidityNameAndTypeResolution.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5085,7 +5085,7 @@ BOOST_AUTO_TEST_CASE(shadowing_global_functions)
function keccak256() {}
}
)";
CHECK_WARNING(text, "Shadowing global function");
CHECK_WARNING(text, "Shadowing builtin symbol");
}

BOOST_AUTO_TEST_CASE(shadowing_global_variables)
Expand All @@ -5097,7 +5097,7 @@ BOOST_AUTO_TEST_CASE(shadowing_global_variables)
}
}
)";
CHECK_WARNING(text, "Shadowing global variable");
CHECK_WARNING(text, "Shadowing builtin symbol");
}


Expand Down

0 comments on commit d287927

Please sign in to comment.