aboutsummaryrefslogtreecommitdiff
path: root/test/cases/compile_errors/invalid_deref_on_switch_target.zig
blob: a0e9358381a9c001ae258fc577a6da2630d1e70f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
comptime {
    const tile = Tile.Empty;
    switch (tile.*) {
        Tile.Empty => {},
        Tile.Filled => {},
    }
}
const Tile = enum {
    Empty,
    Filled,
};

// error
//
// :3:17: error: cannot dereference non-pointer type 'tmp.Tile'
// :8:14: note: enum declared here