aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-10-06 02:31:32 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2017-10-06 02:31:53 +0800
commitb8be060b30d7c47d7c967291d24b5f0b4bf6cbff (patch)
treefa7cc61bc63e3b83cf5f4d4dcbfe58f2fb797023
parentb8e904616a22507371fd994a3193412711ab6ddd (diff)
downloaddexon-solidity-b8be060b30d7c47d7c967291d24b5f0b4bf6cbff.tar.gz
dexon-solidity-b8be060b30d7c47d7c967291d24b5f0b4bf6cbff.tar.zst
dexon-solidity-b8be060b30d7c47d7c967291d24b5f0b4bf6cbff.zip
Ensure unused variables are not warned for in interfaces/abstract contracts
-rw-r--r--test/libsolidity/SolidityNameAndTypeResolution.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/libsolidity/SolidityNameAndTypeResolution.cpp b/test/libsolidity/SolidityNameAndTypeResolution.cpp
index a6fc4e34..c3dacc3d 100644
--- a/test/libsolidity/SolidityNameAndTypeResolution.cpp
+++ b/test/libsolidity/SolidityNameAndTypeResolution.cpp
@@ -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"(