aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/syntaxTests
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2018-06-20 02:00:55 +0800
committerGitHub <noreply@github.com>2018-06-20 02:00:55 +0800
commitc9ff67ca3e55ba46f6cb4332158328db0c1d2660 (patch)
tree70e1fb40266ffae1a0455b96b8674e91fd2ebaae /test/libsolidity/syntaxTests
parent9d3b7ad586a800f1a9e576311076f486fc776ae3 (diff)
parenta17059573fe2ffce115b5368e798a87ce07dc1cd (diff)
downloaddexon-solidity-c9ff67ca3e55ba46f6cb4332158328db0c1d2660.tar.gz
dexon-solidity-c9ff67ca3e55ba46f6cb4332158328db0c1d2660.tar.zst
dexon-solidity-c9ff67ca3e55ba46f6cb4332158328db0c1d2660.zip
Merge pull request #4313 from ethereum/remove-callcode
Disallow raw callcode (was deprecated in 0.4.12)
Diffstat (limited to 'test/libsolidity/syntaxTests')
-rw-r--r--test/libsolidity/syntaxTests/nameAndTypeResolution/349_unused_return_value_callcode.sol8
-rw-r--r--test/libsolidity/syntaxTests/nameAndTypeResolution/351_callcode_deprecated.sol2
-rw-r--r--test/libsolidity/syntaxTests/nameAndTypeResolution/413_address_methods.sol5
-rw-r--r--test/libsolidity/syntaxTests/nameAndTypeResolution/545_warn_about_address_members_on_contract_callcode.sol2
-rw-r--r--test/libsolidity/syntaxTests/nameAndTypeResolution/551_warn_about_address_members_on_non_this_contract_callcode.sol2
5 files changed, 4 insertions, 15 deletions
diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/349_unused_return_value_callcode.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/349_unused_return_value_callcode.sol
deleted file mode 100644
index a5bda4f6..00000000
--- a/test/libsolidity/syntaxTests/nameAndTypeResolution/349_unused_return_value_callcode.sol
+++ /dev/null
@@ -1,8 +0,0 @@
-contract test {
- function f() public {
- address(0x12).callcode("abc");
- }
-}
-// ----
-// Warning: (50-79): Return value of low-level calls not used.
-// Warning: (50-72): "callcode" has been deprecated in favour of "delegatecall".
diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/351_callcode_deprecated.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/351_callcode_deprecated.sol
index 422de58c..554f2e11 100644
--- a/test/libsolidity/syntaxTests/nameAndTypeResolution/351_callcode_deprecated.sol
+++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/351_callcode_deprecated.sol
@@ -4,4 +4,4 @@ contract test {
}
}
// ----
-// Warning: (55-77): "callcode" has been deprecated in favour of "delegatecall".
+// TypeError: (55-77): "callcode" has been deprecated in favour of "delegatecall".
diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/413_address_methods.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/413_address_methods.sol
index ee4acdcc..d0c3769c 100644
--- a/test/libsolidity/syntaxTests/nameAndTypeResolution/413_address_methods.sol
+++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/413_address_methods.sol
@@ -3,13 +3,10 @@ contract C {
address addr;
uint balance = addr.balance;
bool callRet = addr.call();
- bool callcodeRet = addr.callcode();
bool delegatecallRet = addr.delegatecall();
bool sendRet = addr.send(1);
addr.transfer(1);
- callRet; callcodeRet; delegatecallRet; sendRet;
+ balance; callRet; delegatecallRet; sendRet;
}
}
// ----
-// Warning: (161-174): "callcode" has been deprecated in favour of "delegatecall".
-// Warning: (69-81): Unused local variable.
diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/545_warn_about_address_members_on_contract_callcode.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/545_warn_about_address_members_on_contract_callcode.sol
index 04747e7f..43ee4d88 100644
--- a/test/libsolidity/syntaxTests/nameAndTypeResolution/545_warn_about_address_members_on_contract_callcode.sol
+++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/545_warn_about_address_members_on_contract_callcode.sol
@@ -5,4 +5,4 @@ contract C {
}
// ----
// Warning: (52-65): Using contract member "callcode" inherited from the address type is deprecated. Convert the contract to "address" type to access the member, for example use "address(contract).callcode" instead.
-// Warning: (52-65): "callcode" has been deprecated in favour of "delegatecall".
+// TypeError: (52-65): "callcode" has been deprecated in favour of "delegatecall".
diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/551_warn_about_address_members_on_non_this_contract_callcode.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/551_warn_about_address_members_on_non_this_contract_callcode.sol
index 9ab6fb0c..3c1e0280 100644
--- a/test/libsolidity/syntaxTests/nameAndTypeResolution/551_warn_about_address_members_on_non_this_contract_callcode.sol
+++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/551_warn_about_address_members_on_non_this_contract_callcode.sol
@@ -6,4 +6,4 @@ contract C {
}
// ----
// Warning: (65-75): Using contract member "callcode" inherited from the address type is deprecated. Convert the contract to "address" type to access the member, for example use "address(contract).callcode" instead.
-// Warning: (65-75): "callcode" has been deprecated in favour of "delegatecall".
+// TypeError: (65-75): "callcode" has been deprecated in favour of "delegatecall".