solidity/test/libsolidity/syntaxTests/viewPureChecker/returning_structs.sol
2018-06-06 15:41:41 +01: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;
}
}