aboutsummaryrefslogtreecommitdiff
path: root/src/type.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2022-02-20 00:08:26 -0700
committerAndrew Kelley <andrew@ziglang.org>2022-02-20 00:20:29 -0700
commit7d9e3840bb668f2040b30480deadf8c1a4cad4b0 (patch)
tree7d6ecc5f0207eefe0850ac7ee5047519f9fc5980 /src/type.zig
parent01638c250fa270c8cb3b3416ea55e22988cd32a2 (diff)
downloadzig-7d9e3840bb668f2040b30480deadf8c1a4cad4b0.tar.gz
zig-7d9e3840bb668f2040b30480deadf8c1a4cad4b0.zip
Sema: fix inline break from a non-comptime scope to outer one
Prior to this, the compiler would hit an assertion because the break_inline would not successfully move the compile-time control flow.
Diffstat (limited to 'src/type.zig')
-rw-r--r--src/type.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/type.zig b/src/type.zig
index d8463a6ba8..18ff2f2f38 100644
--- a/src/type.zig
+++ b/src/type.zig
@@ -2986,7 +2986,7 @@ pub const Type = extern union {
pub fn containerLayout(ty: Type) std.builtin.TypeInfo.ContainerLayout {
return switch (ty.tag()) {
- .tuple => .Auto,
+ .tuple, .empty_struct_literal => .Auto,
.@"struct" => ty.castTag(.@"struct").?.data.layout,
.@"union" => ty.castTag(.@"union").?.data.layout,
.union_tagged => ty.castTag(.union_tagged).?.data.layout,