From c040c0f45a2940dfa71fd9e835f815207931b6a9 Mon Sep 17 00:00:00 2001 From: r00ster91 Date: Sun, 28 May 2023 01:39:59 +0200 Subject: test cases: @intCast on vector Closes #11770 --- test/cases/compile_errors/@intCast_on_vec.zig | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 test/cases/compile_errors/@intCast_on_vec.zig (limited to 'test/cases/compile_errors/@intCast_on_vec.zig') 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)' -- cgit v1.2.3