diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2022-04-14 06:37:11 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2022-04-14 06:37:11 -0700 |
| commit | 07397707392d27fbee5f1bf0a788937b66300bf0 (patch) | |
| tree | ac2be32d1c024e15839cede1750146729b134592 /src | |
| parent | 2a00df9c091498268b58dd671f646a5590439b7a (diff) | |
| download | zig-07397707392d27fbee5f1bf0a788937b66300bf0.tar.gz zig-07397707392d27fbee5f1bf0a788937b66300bf0.zip | |
Sema: workaround for generic instantiation recurison bug
Diffstat (limited to 'src')
| -rw-r--r-- | src/type.zig | 7 |
1 files changed, 7 insertions, 0 deletions
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(); |
