authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2022-04-14 06:37:11-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2022-04-14 06:37:11-07:00
log07397707392d27fbee5f1bf0a788937b66300bf0
treeac2be32d1c024e15839cede1750146729b134592
parent2a00df9c091498268b58dd671f646a5590439b7a

Sema: workaround for generic instantiation recurison bug


1 files changed, 7 insertions(+), 0 deletions(-)

src/type.zig+7
...@@ -1520,6 +1520,13 @@ pub const Type = extern union {...@@ -1520,6 +1520,13 @@ pub const Type = extern union {
1520 ) @TypeOf(writer).Error!void {1520 ) @TypeOf(writer).Error!void {
1521 _ = options;1521 _ = options;
1522 comptime assert(unused_format_string.len == 0);1522 comptime assert(unused_format_string.len == 0);
1523 if (@import("builtin").zig_backend != .stage1) {
1524 // This is disabled to work around a stage2 bug where this function recursively
1525 // causes more generic function instantiations resulting in an infinite loop
1526 // in the compiler.
1527 try writer.writeAll("[TODO fix internal compiler bug regarding dump]");
1528 return;
1529 }
1523 var ty = start_type;1530 var ty = start_type;
1524 while (true) {1531 while (true) {
1525 const t = ty.tag();1532 const t = ty.tag();