diff options
author | Daniel Kirchner <daniel@ekpyron.org> | 2018-03-06 06:13:51 +0800 |
---|---|---|
committer | Daniel Kirchner <daniel@ekpyron.org> | 2018-03-06 06:16:26 +0800 |
commit | 91b13b734d34e6bb5a76fb53624588d035946237 (patch) | |
tree | c0fe84429572c32cffda17009d350f7ddd6cbda7 /test | |
parent | 2213f9946b34a6e8f5604a6b821d31788dcee08b (diff) | |
download | dexon-solidity-91b13b734d34e6bb5a76fb53624588d035946237.tar.gz dexon-solidity-91b13b734d34e6bb5a76fb53624588d035946237.tar.zst dexon-solidity-91b13b734d34e6bb5a76fb53624588d035946237.zip |
Use StaticAnalyzer to deprecate msg.gas instead of conditionally removing it in MagicType.
Diffstat (limited to 'test')
-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 f08f695b..3b0ccd4d 100644 --- a/test/libsolidity/SolidityNameAndTypeResolution.cpp +++ b/test/libsolidity/SolidityNameAndTypeResolution.cpp @@ -7416,7 +7416,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 { @@ -7431,7 +7431,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) |