2018-05-30 16:41:34 +00:00
|
|
|
contract C {
|
2018-06-29 12:55:44 +00:00
|
|
|
function balance() public returns (uint) {
|
2018-05-30 16:41:34 +00:00
|
|
|
this.balance; // to avoid pureness warning
|
|
|
|
return 1;
|
|
|
|
}
|
2018-06-29 12:55:44 +00:00
|
|
|
function transfer(uint amount) public {
|
2018-05-30 16:41:34 +00:00
|
|
|
address(this).transfer(amount); // to avoid pureness warning
|
|
|
|
}
|
2018-09-12 14:21:43 +00:00
|
|
|
function() payable external {
|
|
|
|
}
|
2018-05-30 16:41:34 +00:00
|
|
|
}
|
|
|
|
contract D {
|
2018-06-29 12:55:44 +00:00
|
|
|
function f() public {
|
2018-06-11 12:15:27 +00:00
|
|
|
uint x = (new C()).balance();
|
2018-05-30 16:41:34 +00:00
|
|
|
x;
|
|
|
|
(new C()).transfer(5);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// ----
|
2018-06-29 12:55:44 +00:00
|
|
|
// Warning: (17-134): Function state mutability can be restricted to view
|