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

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