From 07397707392d27fbee5f1bf0a788937b66300bf0 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Thu, 14 Apr 2022 06:37:11 -0700 Subject: [PATCH] Sema: workaround for generic instantiation recurison bug --- src/type.zig | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/type.zig b/src/type.zig index bcb6e63f6e..da0149967b 100644 --- a/src/type.zig +++ b/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();