diff options
author | Christian Parpart <christian@parpart.family> | 2018-08-04 01:30:33 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-04 01:30:33 +0800 |
commit | a4ee1dfc8308328e55141abed4a1e2286495469a (patch) | |
tree | d1dd367445f3e8dc909fa64587df598911a2cf2b /test/libsolidity/SolidityNameAndTypeResolution.cpp | |
parent | 2c2d4c47ea9cbd485385cf943079d62ef4d84566 (diff) | |
parent | 43c01361f3bb1b2ffebbb82bb24ec7fecbb52d16 (diff) | |
download | dexon-solidity-a4ee1dfc8308328e55141abed4a1e2286495469a.tar dexon-solidity-a4ee1dfc8308328e55141abed4a1e2286495469a.tar.gz dexon-solidity-a4ee1dfc8308328e55141abed4a1e2286495469a.tar.bz2 dexon-solidity-a4ee1dfc8308328e55141abed4a1e2286495469a.tar.lz dexon-solidity-a4ee1dfc8308328e55141abed4a1e2286495469a.tar.xz dexon-solidity-a4ee1dfc8308328e55141abed4a1e2286495469a.tar.zst dexon-solidity-a4ee1dfc8308328e55141abed4a1e2286495469a.zip |
Merge pull request #4412 from ethereum/v050-reference-resolver-errorTypeForLoose
[BREAKING] permanently set errorTypeForLoose from Warning to SyntaxError
Diffstat (limited to 'test/libsolidity/SolidityNameAndTypeResolution.cpp')
-rw-r--r-- | test/libsolidity/SolidityNameAndTypeResolution.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/test/libsolidity/SolidityNameAndTypeResolution.cpp b/test/libsolidity/SolidityNameAndTypeResolution.cpp index d025e65a..41814888 100644 --- a/test/libsolidity/SolidityNameAndTypeResolution.cpp +++ b/test/libsolidity/SolidityNameAndTypeResolution.cpp @@ -390,12 +390,10 @@ BOOST_AUTO_TEST_CASE(unsatisfied_version) BOOST_AUTO_TEST_CASE(returndatasize_as_variable) { char const* text = R"( - contract c { function f() public { uint returndatasize; assembly { returndatasize }}} + contract C { function f() public pure { uint returndatasize; returndatasize; assembly { pop(returndatasize()) }}} )"; vector<pair<Error::Type, std::string>> expectations(vector<pair<Error::Type, std::string>>{ - {Error::Type::Warning, "Variable is shadowed in inline assembly by an instruction of the same name"}, - {Error::Type::Warning, "The use of non-functional instructions is deprecated."}, - {Error::Type::DeclarationError, "Unbalanced stack"} + {Error::Type::Warning, "Variable is shadowed in inline assembly by an instruction of the same name"} }); if (!dev::test::Options::get().evmVersion().supportsReturndata()) expectations.emplace_back(make_pair(Error::Type::Warning, std::string("\"returndatasize\" instruction is only available for Byzantium-compatible"))); @@ -405,15 +403,13 @@ BOOST_AUTO_TEST_CASE(returndatasize_as_variable) BOOST_AUTO_TEST_CASE(create2_as_variable) { char const* text = R"( - contract c { function f() public { uint create2; assembly { create2(0, 0, 0, 0) } }} + contract c { function f() public { uint create2; create2; assembly { pop(create2(0, 0, 0, 0)) } }} )"; // This needs special treatment, because the message mentions the EVM version, // so cannot be run via isoltest. CHECK_ALLOW_MULTI(text, (std::vector<std::pair<Error::Type, std::string>>{ {Error::Type::Warning, "Variable is shadowed in inline assembly by an instruction of the same name"}, {Error::Type::Warning, "The \"create2\" instruction is not supported by the VM version"}, - {Error::Type::DeclarationError, "Unbalanced stack"}, - {Error::Type::Warning, "not supposed to return values"} })); } |