mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Tests after making all explicit address conversions as non-payable
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
contract C {
|
||||
function f() public {
|
||||
address(this).transfer(1);
|
||||
require(address(this).send(2));
|
||||
selfdestruct(address(this));
|
||||
payable(this).transfer(1);
|
||||
require(payable(this).send(2));
|
||||
selfdestruct(payable(this));
|
||||
(bool success,) = address(this).delegatecall("");
|
||||
require(success);
|
||||
(success,) = address(this).call("");
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
contract C {
|
||||
function f() view public {
|
||||
address(this).transfer(1);
|
||||
payable(this).transfer(1);
|
||||
}
|
||||
function g() view public {
|
||||
require(address(this).send(2));
|
||||
require(payable(this).send(2));
|
||||
}
|
||||
function h() view public {
|
||||
selfdestruct(address(this));
|
||||
selfdestruct(payable(this));
|
||||
}
|
||||
function i() view public {
|
||||
(bool success,) = address(this).delegatecall("");
|
||||
|
||||
Reference in New Issue
Block a user