solidity/test/libsolidity/syntaxTests/viewPureChecker/returning_structs_no_restrict_warning.sol
2018-07-04 11:25:45 +02:00

15 lines
242 B
Solidity

contract C {
struct S { uint x; }
S s;
function f() view internal returns (S storage) {
return s;
}
function g() public {
f().x = 2;
}
function h() view public {
f();
f().x;
}
}