aboutsummaryrefslogtreecommitdiff
path: root/test/cases/compile_errors
diff options
context:
space:
mode:
Diffstat (limited to 'test/cases/compile_errors')
-rw-r--r--test/cases/compile_errors/union_init_with_non_type_as_first_param.zig9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/cases/compile_errors/union_init_with_non_type_as_first_param.zig b/test/cases/compile_errors/union_init_with_non_type_as_first_param.zig
new file mode 100644
index 0000000000..a99a9157e1
--- /dev/null
+++ b/test/cases/compile_errors/union_init_with_non_type_as_first_param.zig
@@ -0,0 +1,9 @@
+export fn u() void {
+ _ = @unionInit(0, "a", 0);
+}
+
+// error
+// backend=stage2
+// target=native
+//
+// :2:20: error: expected type 'type', found 'comptime_int'