aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/syntaxTests/viewPureChecker/returning_structs_no_restrict_warning.sol
blob: 9b4eb46695714ca26103bb5b53f0052ad6c7d335 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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;
    }
}