diff options
author | chriseth <chris@ethereum.org> | 2017-05-02 23:14:42 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2017-05-03 17:26:21 +0800 |
commit | 230f51efb7da7cc4f8e03027b958aee8f3346914 (patch) | |
tree | 32455f9f32e34a6fb936949e0c879eb736735638 /test/libsolidity | |
parent | e3ed3623c78befec9bd88261e6cbf534197d64a1 (diff) | |
download | dexon-solidity-230f51efb7da7cc4f8e03027b958aee8f3346914.tar dexon-solidity-230f51efb7da7cc4f8e03027b958aee8f3346914.tar.gz dexon-solidity-230f51efb7da7cc4f8e03027b958aee8f3346914.tar.bz2 dexon-solidity-230f51efb7da7cc4f8e03027b958aee8f3346914.tar.lz dexon-solidity-230f51efb7da7cc4f8e03027b958aee8f3346914.tar.xz dexon-solidity-230f51efb7da7cc4f8e03027b958aee8f3346914.tar.zst dexon-solidity-230f51efb7da7cc4f8e03027b958aee8f3346914.zip |
Cleanup, style and additional test.
Diffstat (limited to 'test/libsolidity')
-rw-r--r-- | test/libsolidity/SolidityNameAndTypeResolution.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/test/libsolidity/SolidityNameAndTypeResolution.cpp b/test/libsolidity/SolidityNameAndTypeResolution.cpp index ace8ef46..fd50609d 100644 --- a/test/libsolidity/SolidityNameAndTypeResolution.cpp +++ b/test/libsolidity/SolidityNameAndTypeResolution.cpp @@ -5658,6 +5658,14 @@ BOOST_AUTO_TEST_CASE(warn_unused_return_param) CHECK_WARNING(text, "Unused"); text = R"( contract C { + function f() returns (uint a) { + return; + } + } + )"; + CHECK_WARNING(text, "Unused"); + text = R"( + contract C { function f() returns (uint) { } } @@ -5699,8 +5707,8 @@ BOOST_AUTO_TEST_CASE(no_unused_dec_after_use) char const* text = R"( contract C { function f() { - a = 7; - uint a; + a = 7; + uint a; } } )"; |