diff options
Diffstat (limited to 'test/cases/compile_errors/array_access_of_non_array.zig')
| -rw-r--r-- | test/cases/compile_errors/array_access_of_non_array.zig | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/test/cases/compile_errors/array_access_of_non_array.zig b/test/cases/compile_errors/array_access_of_non_array.zig index 06fa1569e6..0f06bae1dd 100644 --- a/test/cases/compile_errors/array_access_of_non_array.zig +++ b/test/cases/compile_errors/array_access_of_non_array.zig @@ -1,9 +1,9 @@ export fn f() void { - var bad : bool = undefined; + var bad: bool = undefined; bad[0] = bad[0]; } export fn g() void { - var bad : bool = undefined; + var bad: bool = undefined; _ = bad[0]; } @@ -11,5 +11,7 @@ export fn g() void { // backend=stage2 // target=native // -// :3:8: error: element access of non-indexable type 'bool' -// :7:12: error: element access of non-indexable type 'bool' +// :3:8: error: type 'bool' does not support indexing +// :3:8: note: operand must be an array, slice, tuple, or vector +// :7:12: error: type 'bool' does not support indexing +// :7:12: note: operand must be an array, slice, tuple, or vector |
