aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2017-10-19 17:10:10 +0800
committerGitHub <noreply@github.com>2017-10-19 17:10:10 +0800
commit0ae4aad8f346e3c23873aa97a359239714f3c039 (patch)
tree1c6b43116bf9b01cd561bf01d5d62b18224ed152 /test
parentda298eb5ad4ccc4a5a9f7efe3eb4295d2b020b3b (diff)
parent10677125ae5b2c211d22add52022ebd5a7cc8260 (diff)
downloaddexon-solidity-0ae4aad8f346e3c23873aa97a359239714f3c039.tar
dexon-solidity-0ae4aad8f346e3c23873aa97a359239714f3c039.tar.gz
dexon-solidity-0ae4aad8f346e3c23873aa97a359239714f3c039.tar.bz2
dexon-solidity-0ae4aad8f346e3c23873aa97a359239714f3c039.tar.lz
dexon-solidity-0ae4aad8f346e3c23873aa97a359239714f3c039.tar.xz
dexon-solidity-0ae4aad8f346e3c23873aa97a359239714f3c039.tar.zst
dexon-solidity-0ae4aad8f346e3c23873aa97a359239714f3c039.zip
Merge pull request #3108 from ethereum/remove-callcode
Turn usage of callcode into an error as experimental 0.5.0 feature
Diffstat (limited to 'test')
-rw-r--r--test/libsolidity/SolidityNameAndTypeResolution.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/libsolidity/SolidityNameAndTypeResolution.cpp b/test/libsolidity/SolidityNameAndTypeResolution.cpp
index 9b0647bf..9b5ea349 100644
--- a/test/libsolidity/SolidityNameAndTypeResolution.cpp
+++ b/test/libsolidity/SolidityNameAndTypeResolution.cpp
@@ -4783,6 +4783,16 @@ BOOST_AUTO_TEST_CASE(warn_about_callcode)
}
)";
CHECK_WARNING(text, "\"callcode\" has been deprecated in favour of \"delegatecall\"");
+ text = R"(
+ pragma experimental "v0.5.0";
+ contract test {
+ function f() pure public {
+ var x = address(0x12).callcode;
+ x;
+ }
+ }
+ )";
+ CHECK_ERROR(text, TypeError, "\"callcode\" has been deprecated in favour of \"delegatecall\"");
}
BOOST_AUTO_TEST_CASE(no_warn_about_callcode_as_function)