aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/syntaxTests/viewPureChecker/local_storage_variables.sol
blob: 7d01118aee1db62281413c45a1418103577323d7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
contract C {
    struct S { uint a; }
    S s;
    function f() view public {
        S storage x = s;
        x;
    }
    function g() view public {
        S storage x = s;
        x = s;
    }
    function i() public {
        s.a = 2;
    }
    function h() public {
        S storage x = s;
        x.a = 2;
    }
}