aboutsummaryrefslogtreecommitdiff
path: root/test/cases/compile_errors/array_access_of_non_array.zig
blob: 06fa1569e660deaf142b846f19ead476505f6cd8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
export fn f() void {
    var bad : bool = undefined;
    bad[0] = bad[0];
}
export fn g() void {
    var bad : bool = undefined;
    _ = bad[0];
}

// error
// backend=stage2
// target=native
//
// :3:8: error: element access of non-indexable type 'bool'
// :7:12: error: element access of non-indexable type 'bool'