Update test suite to use address payable.

This commit is contained in:
Daniel Kirchner
2018-09-12 16:21:43 +02:00
parent 1994b51ef3
commit 879251a78b
26 changed files with 121 additions and 67 deletions
@@ -1,6 +1,6 @@
contract C {
function f() public {
address addr;
address payable addr;
uint balance = addr.balance;
(bool callSuc,) = addr.call("");
(bool delegatecallSuc,) = addr.delegatecall("");
@@ -6,6 +6,8 @@ contract C {
function transfer(uint amount) public {
address(this).transfer(amount); // to avoid pureness warning
}
function() payable external {
}
}
contract D {
function f() public {
@@ -16,6 +16,8 @@ contract C {
(bool success,) = address(this).call("");
require(success);
}
function() payable external {
}
}
// ----
// TypeError: (52-77): Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.