Merge pull request #3033 from ethereum/unused-variables-abstract

Ensure unused variables are not warned for in interfaces/abstract contracts
This commit is contained in:
Yoichi Hirai 2017-10-06 12:10:45 +02:00 committed by GitHub
commit 961f8746ff

View File

@ -6210,6 +6210,26 @@ BOOST_AUTO_TEST_CASE(warn_unused_return_parameter)
CHECK_SUCCESS_NO_WARNINGS(text);
}
BOOST_AUTO_TEST_CASE(no_unused_warning_interface_arguments)
{
char const* text = R"(
interface I {
function f(uint a) pure public returns (uint b);
}
)";
CHECK_SUCCESS_NO_WARNINGS(text);
}
BOOST_AUTO_TEST_CASE(no_unused_warning_abstract_arguments)
{
char const* text = R"(
contract C {
function f(uint a) pure public returns (uint b);
}
)";
CHECK_SUCCESS_NO_WARNINGS(text);
}
BOOST_AUTO_TEST_CASE(no_unused_warnings)
{
char const* text = R"(