diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2017-09-14 01:48:21 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-09-14 01:48:21 +0800 |
commit | 71118e99fe33290b3ef9ee2a4e96b3184ecf52b0 (patch) | |
tree | 34eade1b4a01622e113a8adba707efe93ec20765 /test/libsolidity | |
parent | 66d7c1d474d34e48b3b4019095e3c9dca7789669 (diff) | |
download | dexon-solidity-71118e99fe33290b3ef9ee2a4e96b3184ecf52b0.tar.gz dexon-solidity-71118e99fe33290b3ef9ee2a4e96b3184ecf52b0.tar.zst dexon-solidity-71118e99fe33290b3ef9ee2a4e96b3184ecf52b0.zip |
Fix view/pure warnings on selector tests
Diffstat (limited to 'test/libsolidity')
-rw-r--r-- | test/libsolidity/SolidityNameAndTypeResolution.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/test/libsolidity/SolidityNameAndTypeResolution.cpp b/test/libsolidity/SolidityNameAndTypeResolution.cpp index d3c9802b..c7ef1d46 100644 --- a/test/libsolidity/SolidityNameAndTypeResolution.cpp +++ b/test/libsolidity/SolidityNameAndTypeResolution.cpp @@ -6289,7 +6289,7 @@ BOOST_AUTO_TEST_CASE(function_types_sig) { char const* text = R"( contract C { - function f() returns (bytes4) { + function f() view returns (bytes4) { return f.selector; } } @@ -6297,9 +6297,9 @@ BOOST_AUTO_TEST_CASE(function_types_sig) CHECK_ERROR(text, TypeError, "Member \"selector\" not found"); text = R"( contract C { - function g() internal { + function g() pure internal { } - function f() returns (bytes4) { + function f() view returns (bytes4) { return g.selector; } } @@ -6307,7 +6307,7 @@ BOOST_AUTO_TEST_CASE(function_types_sig) CHECK_ERROR(text, TypeError, "Member \"selector\" not found"); text = R"( contract C { - function f() returns (bytes4) { + function f() view returns (bytes4) { function () g; return g.selector; } @@ -6316,7 +6316,7 @@ BOOST_AUTO_TEST_CASE(function_types_sig) CHECK_ERROR(text, TypeError, "Member \"selector\" not found"); text = R"( contract C { - function f() returns (bytes4) { + function f() view returns (bytes4) { return this.f.selector; } } @@ -6324,7 +6324,7 @@ BOOST_AUTO_TEST_CASE(function_types_sig) CHECK_SUCCESS_NO_WARNINGS(text); text = R"( contract C { - function f() external returns (bytes4) { + function f() view external returns (bytes4) { return this.f.selector; } } @@ -6332,9 +6332,9 @@ BOOST_AUTO_TEST_CASE(function_types_sig) CHECK_SUCCESS_NO_WARNINGS(text); text = R"( contract C { - function h() external { + function h() pure external { } - function f() external returns (bytes4) { + function f() view external returns (bytes4) { var g = this.h; return g.selector; } @@ -6343,10 +6343,10 @@ BOOST_AUTO_TEST_CASE(function_types_sig) CHECK_SUCCESS_NO_WARNINGS(text); text = R"( contract C { - function h() external { + function h() pure external { } - function f() external returns (bytes4) { - function () external g = this.h; + function f() view external returns (bytes4) { + function () pure external g = this.h; return g.selector; } } @@ -6354,10 +6354,10 @@ BOOST_AUTO_TEST_CASE(function_types_sig) CHECK_SUCCESS_NO_WARNINGS(text); text = R"( contract C { - function h() external { + function h() pure external { } - function f() external returns (bytes4) { - function () external g = this.h; + function f() view external returns (bytes4) { + function () pure external g = this.h; var i = g; return i.selector; } |