aboutsummaryrefslogtreecommitdiff
path: root/test/cases/compile_errors/@intCast_on_vec.zig
diff options
context:
space:
mode:
authorr00ster91 <r00ster91@proton.me>2023-05-28 01:39:59 +0200
committerr00ster91 <r00ster91@proton.me>2023-06-27 19:57:19 -0400
commitc040c0f45a2940dfa71fd9e835f815207931b6a9 (patch)
tree1d08af11c1f0e601a8b0710b025fa8b827fb295e /test/cases/compile_errors/@intCast_on_vec.zig
parent7213234f0c5188422540d5aa3a80984c2cd54581 (diff)
downloadzig-c040c0f45a2940dfa71fd9e835f815207931b6a9.tar.gz
zig-c040c0f45a2940dfa71fd9e835f815207931b6a9.zip
test cases: @intCast on vector
Closes #11770
Diffstat (limited to 'test/cases/compile_errors/@intCast_on_vec.zig')
-rw-r--r--test/cases/compile_errors/@intCast_on_vec.zig13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/cases/compile_errors/@intCast_on_vec.zig b/test/cases/compile_errors/@intCast_on_vec.zig
new file mode 100644
index 0000000000..0bc18afb9f
--- /dev/null
+++ b/test/cases/compile_errors/@intCast_on_vec.zig
@@ -0,0 +1,13 @@
+export fn entry() void {
+ const a = @Vector(4, u32){ 1, 1, 1, 1 };
+ _ = @as(u32, @intCast(a));
+}
+
+// TODO: change target in the manifest to "native" probably after this is fixed:
+// https://github.com/ziglang/zig/issues/13782
+
+// error
+// backend=stage2
+// target=x86_64-linux
+//
+// :3:27: error: expected type 'u32', found '@Vector(4, u32)'