aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/syntaxTests/controlFlow/uninitializedAccess/struct.sol
blob: b4f2be5d780cda10bcec406240932e4b87ecf513 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
contract C {
    struct S { uint a; }
    S s;
    function f() internal returns (S storage r)
    {
        r.a = 0;
        r = s;
    }
}
// ----
// TypeError: (109-110): This variable is of storage pointer type and can be accessed without prior assignment.