blob: 157ea36b44ba1e0a653318ee77c6d2a8ca18804e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
contract C {
function balance() public returns (uint) {
this.balance; // to avoid pureness warning
return 1;
}
function transfer(uint amount) public {
address(this).transfer(amount); // to avoid pureness warning
}
}
contract D {
function f() public {
uint x = (new C()).balance();
x;
(new C()).transfer(5);
}
}
// ----
// Warning: (17-134): Function state mutability can be restricted to view
|