diff options
| author | Veikka Tuominen <git@vexu.eu> | 2022-12-11 16:28:48 +0200 |
|---|---|---|
| committer | Veikka Tuominen <git@vexu.eu> | 2022-12-14 14:05:57 +0200 |
| commit | 327fb798c3a2fb18588fc79b1f024cfdd166a4e9 (patch) | |
| tree | 147b55e8e691d28f466f6f3cfe0fd24ac9f5ee98 /test/cases/compile_errors/union_enum_field_missing.zig | |
| parent | 0b4461d97b5d315e71302f96076c54bbdffb7717 (diff) | |
| download | zig-327fb798c3a2fb18588fc79b1f024cfdd166a4e9.tar.gz zig-327fb798c3a2fb18588fc79b1f024cfdd166a4e9.zip | |
move stage2 compile errors out of special folder
Diffstat (limited to 'test/cases/compile_errors/union_enum_field_missing.zig')
| -rw-r--r-- | test/cases/compile_errors/union_enum_field_missing.zig | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/cases/compile_errors/union_enum_field_missing.zig b/test/cases/compile_errors/union_enum_field_missing.zig new file mode 100644 index 0000000000..81bc83cf18 --- /dev/null +++ b/test/cases/compile_errors/union_enum_field_missing.zig @@ -0,0 +1,21 @@ +const E = enum { + a, + b, + c, +}; + +const U = union(E) { + a: i32, + b: f64, +}; + +export fn entry() usize { + return @sizeOf(U); +} + +// error +// target=native +// +// :7:11: error: enum field(s) missing in union +// :4:5: note: field 'c' missing, declared here +// :1:11: note: enum declared here |
