diff options
author | chriseth <chris@ethereum.org> | 2018-03-06 16:26:14 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-06 16:26:14 +0800 |
commit | f6c0daec14a047d753c2e501c500995bc7e6dc54 (patch) | |
tree | fa9b30b3c5d4f5a318f29d4ad382e57db82c897a /test/libsolidity | |
parent | a9e02accb96fb1eb39942fa3a68f1904df7ae41d (diff) | |
parent | 91b13b734d34e6bb5a76fb53624588d035946237 (diff) | |
download | dexon-solidity-f6c0daec14a047d753c2e501c500995bc7e6dc54.tar.gz dexon-solidity-f6c0daec14a047d753c2e501c500995bc7e6dc54.tar.zst dexon-solidity-f6c0daec14a047d753c2e501c500995bc7e6dc54.zip |
Merge pull request #3652 from ethereum/gasleft_v2
Use StaticAnalyzer to deprecate msg.gas instead of conditionally remo…
Diffstat (limited to 'test/libsolidity')
-rw-r--r-- | test/libsolidity/SolidityNameAndTypeResolution.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/libsolidity/SolidityNameAndTypeResolution.cpp b/test/libsolidity/SolidityNameAndTypeResolution.cpp index 7b0a7d4c..b6e2cd43 100644 --- a/test/libsolidity/SolidityNameAndTypeResolution.cpp +++ b/test/libsolidity/SolidityNameAndTypeResolution.cpp @@ -7417,7 +7417,7 @@ BOOST_AUTO_TEST_CASE(gasleft) function f() public view returns (uint256 val) { return msg.gas; } } )"; - CHECK_SUCCESS_NO_WARNINGS(text); + CHECK_WARNING(text, "\"msg.gas\" has been deprecated in favor of \"gasleft()\""); text = R"( contract C { @@ -7432,7 +7432,7 @@ BOOST_AUTO_TEST_CASE(gasleft) function f() public returns (uint256 val) { return msg.gas; } } )"; - CHECK_ERROR(text, TypeError, "Member \"gas\" not found or not visible after argument-dependent lookup in msg"); + CHECK_ERROR(text, TypeError, "\"msg.gas\" has been deprecated in favor of \"gasleft()\""); } BOOST_AUTO_TEST_CASE(gasleft_shadowing) |