diff options
Diffstat (limited to 'test/libsolidity')
-rw-r--r-- | test/libsolidity/SolidityNameAndTypeResolution.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/libsolidity/SolidityNameAndTypeResolution.cpp b/test/libsolidity/SolidityNameAndTypeResolution.cpp index 4695317a..ee4857aa 100644 --- a/test/libsolidity/SolidityNameAndTypeResolution.cpp +++ b/test/libsolidity/SolidityNameAndTypeResolution.cpp @@ -5663,6 +5663,22 @@ BOOST_AUTO_TEST_CASE(warn_unused_return_param) } )"; success(text); + text = R"( + contract C { + function f() returns (uint a) { + a = 1; + } + } + )"; + success(text); + text = R"( + contract C { + function f() returns (uint a) { + return 1; + } + } + )"; + success(text); } BOOST_AUTO_TEST_CASE(no_unused_warnings) |