aboutsummaryrefslogtreecommitdiff
path: root/test/cases/compile_errors/invalid_deref_on_switch_target.zig
blob: a880b16fca8579d4cf982582834aa3c349a31857 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
comptime {
    var 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'