aboutsummaryrefslogtreecommitdiff
path: root/test/cases/compile_errors
diff options
context:
space:
mode:
authorVeikka Tuominen <git@vexu.eu>2022-06-28 17:13:43 +0300
committerJakub Konka <kubkon@jakubkonka.com>2022-06-30 09:57:38 +0200
commit2e7dc5e15192431c64eca458ecfdce3d07b89f69 (patch)
treeabaf49ad2840c5ac799105e79dd0b536daed30ba /test/cases/compile_errors
parent03b356e34af37d74cf92087c0303a1b2c74d3afc (diff)
downloadzig-2e7dc5e15192431c64eca458ecfdce3d07b89f69.tar.gz
zig-2e7dc5e15192431c64eca458ecfdce3d07b89f69.zip
Sema: improve vector overflow errors
Diffstat (limited to 'test/cases/compile_errors')
-rw-r--r--test/cases/compile_errors/comptime_vector_overflow_shows_the_index.zig (renamed from test/cases/compile_errors/stage1/test/comptime_vector_overflow_shows_the_index.zig)7
-rw-r--r--test/cases/compile_errors/shuffle_with_selected_index_past_first_vector_length.zig (renamed from test/cases/compile_errors/stage1/test/shuffle_with_selected_index_past_first_vector_length.zig)9
2 files changed, 7 insertions, 9 deletions
diff --git a/test/cases/compile_errors/stage1/test/comptime_vector_overflow_shows_the_index.zig b/test/cases/compile_errors/comptime_vector_overflow_shows_the_index.zig
index a1f026ab70..678d99376e 100644
--- a/test/cases/compile_errors/stage1/test/comptime_vector_overflow_shows_the_index.zig
+++ b/test/cases/compile_errors/comptime_vector_overflow_shows_the_index.zig
@@ -6,9 +6,8 @@ comptime {
}
// error
-// backend=stage1
+// backend=stage2
// target=native
-// is_test=1
//
-// tmp.zig:4:15: error: operation caused overflow
-// tmp.zig:4:15: note: when computing vector element at index 2
+// :4:15: error: overflow of vector type '@Vector(4, u8)' with value '.{ 6, 8, 256, 12 }'
+// :4:15: note: when computing vector element at index '2'
diff --git a/test/cases/compile_errors/stage1/test/shuffle_with_selected_index_past_first_vector_length.zig b/test/cases/compile_errors/shuffle_with_selected_index_past_first_vector_length.zig
index 8b0c5ba780..1c602f7ab0 100644
--- a/test/cases/compile_errors/stage1/test/shuffle_with_selected_index_past_first_vector_length.zig
+++ b/test/cases/compile_errors/shuffle_with_selected_index_past_first_vector_length.zig
@@ -6,10 +6,9 @@ export fn entry() void {
}
// error
-// backend=stage1
+// backend=stage2
// target=native
-// is_test=1
//
-// tmp.zig:4:39: error: mask index '4' has out-of-bounds selection
-// tmp.zig:4:27: note: selected index '7' out of bounds of @Vector(4, u32)
-// tmp.zig:4:30: note: selections from the second vector are specified with negative numbers
+// :4:39: error: mask index '4' has out-of-bounds selection
+// :4:27: note: selected index '7' out of bounds of '@Vector(4, u32)'
+// :4:30: note: selections from the second vector are specified with negative numbers