Commit 0739770739

Andrew Kelley <andrew@ziglang.org>
2022-04-14 15:37:11
Sema: workaround for generic instantiation recurison bug
1 parent 2a00df9
Changed files (1)
src/type.zig
@@ -1520,6 +1520,13 @@ pub const Type = extern union {
     ) @TypeOf(writer).Error!void {
         _ = options;
         comptime assert(unused_format_string.len == 0);
+        if (@import("builtin").zig_backend != .stage1) {
+            // This is disabled to work around a stage2 bug where this function recursively
+            // causes more generic function instantiations resulting in an infinite loop
+            // in the compiler.
+            try writer.writeAll("[TODO fix internal compiler bug regarding dump]");
+            return;
+        }
         var ty = start_type;
         while (true) {
             const t = ty.tag();