diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2023-07-25 10:46:49 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2023-07-25 21:45:33 -0700 |
| commit | 6cee98eb3074fcb99297f23f30e3a230a14e8db7 (patch) | |
| tree | dba0265f7fe90862ac7c1dee3287eff5a69865c1 /src/Sema.zig | |
| parent | 4b7fa0fce90f05e13334bab5379d9e9ae8c5ae49 (diff) | |
| download | zig-6cee98eb3074fcb99297f23f30e3a230a14e8db7.tar.gz zig-6cee98eb3074fcb99297f23f30e3a230a14e8db7.zip | |
frontend: forbid packed and extern tuples
Diffstat (limited to 'src/Sema.zig')
| -rw-r--r-- | src/Sema.zig | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Sema.zig b/src/Sema.zig index 2f068bd98f..3ae2ab96bd 100644 --- a/src/Sema.zig +++ b/src/Sema.zig @@ -20391,6 +20391,12 @@ fn reifyStruct( const gpa = sema.gpa; const ip = &mod.intern_pool; + if (is_tuple) switch (layout) { + .Extern => return sema.fail(block, src, "extern tuples are not supported", .{}), + .Packed => return sema.fail(block, src, "packed tuples are not supported", .{}), + .Auto => {}, + }; + // Because these three things each reference each other, `undefined` // placeholders are used before being set after the struct type gains an // InternPool index. |
