diff options
author | Federico Bond <federicobond@gmail.com> | 2017-06-25 01:09:19 +0800 |
---|---|---|
committer | Federico Bond <federicobond@gmail.com> | 2017-06-27 02:39:01 +0800 |
commit | 70fd5c17704119a3f52aba5c67eda96c2a222d2d (patch) | |
tree | 2cc6c9255c71f821bed14ed5b2b37ccf1162bbe5 /test/libsolidity | |
parent | bffb8c404f0df22c4da7cdc2a8affcbb77377582 (diff) | |
download | dexon-solidity-70fd5c17704119a3f52aba5c67eda96c2a222d2d.tar.gz dexon-solidity-70fd5c17704119a3f52aba5c67eda96c2a222d2d.tar.zst dexon-solidity-70fd5c17704119a3f52aba5c67eda96c2a222d2d.zip |
Warn deprecated usage of parameter names in function types
Diffstat (limited to 'test/libsolidity')
-rw-r--r-- | test/libsolidity/SolidityNameAndTypeResolution.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/libsolidity/SolidityNameAndTypeResolution.cpp b/test/libsolidity/SolidityNameAndTypeResolution.cpp index c4b1250f..a1428972 100644 --- a/test/libsolidity/SolidityNameAndTypeResolution.cpp +++ b/test/libsolidity/SolidityNameAndTypeResolution.cpp @@ -5022,6 +5022,26 @@ BOOST_AUTO_TEST_CASE(external_function_type_to_uint) CHECK_ERROR(text, TypeError, "Explicit type conversion not allowed"); } +BOOST_AUTO_TEST_CASE(warn_function_type_parameters_with_names) +{ + char const* text = R"( + contract C { + function(uint a) f; + } + )"; + CHECK_WARNING(text, "Naming function type parameters is deprecated."); +} + +BOOST_AUTO_TEST_CASE(warn_function_type_return_parameters_with_names) +{ + char const* text = R"( + contract C { + function(uint) returns(bool ret) f; + } + )"; + CHECK_WARNING(text, "Naming function type return parameters is deprecated."); +} + BOOST_AUTO_TEST_CASE(shift_constant_left_negative_rvalue) { char const* text = R"( |