diff options
author | chriseth <chris@ethereum.org> | 2017-06-27 22:32:48 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-27 22:32:48 +0800 |
commit | 708d17d13fce9095178962c2ebc3fa17303b72f3 (patch) | |
tree | 774625d27d8f372e10132760248b349016247f94 /test | |
parent | 36044c8c95890bfc25a199510e32a0481e8082d0 (diff) | |
parent | 70fd5c17704119a3f52aba5c67eda96c2a222d2d (diff) | |
download | dexon-solidity-708d17d13fce9095178962c2ebc3fa17303b72f3.tar dexon-solidity-708d17d13fce9095178962c2ebc3fa17303b72f3.tar.gz dexon-solidity-708d17d13fce9095178962c2ebc3fa17303b72f3.tar.bz2 dexon-solidity-708d17d13fce9095178962c2ebc3fa17303b72f3.tar.lz dexon-solidity-708d17d13fce9095178962c2ebc3fa17303b72f3.tar.xz dexon-solidity-708d17d13fce9095178962c2ebc3fa17303b72f3.tar.zst dexon-solidity-708d17d13fce9095178962c2ebc3fa17303b72f3.zip |
Merge pull request #2464 from federicobond/deprecate-function-type-names
Warn deprecated usage of parameter names in function types
Diffstat (limited to 'test')
-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 b489be22..c8a04539 100644 --- a/test/libsolidity/SolidityNameAndTypeResolution.cpp +++ b/test/libsolidity/SolidityNameAndTypeResolution.cpp @@ -5129,6 +5129,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"( |