Sema: workaround for generic instantiation recurison bug

This commit is contained in:
Andrew Kelley 2022-04-14 06:37:11 -07:00
parent 2a00df9c09
commit 0739770739

View File

@ -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();