mirror of
https://github.com/ziglang/zig.git
synced 2026-01-21 23:05:24 +00:00
Type.print: fix inferred error set crash
The index is a function, not an inferred error set.
This commit is contained in:
parent
b81d193021
commit
d98526f912
@ -250,10 +250,9 @@ pub const Type = struct {
|
||||
try print(error_union_type.payload_type.toType(), writer, mod);
|
||||
return;
|
||||
},
|
||||
.inferred_error_set_type => |index| {
|
||||
const func = mod.iesFuncIndex(index);
|
||||
.inferred_error_set_type => |func_index| {
|
||||
try writer.writeAll("@typeInfo(@typeInfo(@TypeOf(");
|
||||
const owner_decl = mod.funcOwnerDeclPtr(func);
|
||||
const owner_decl = mod.funcOwnerDeclPtr(func_index);
|
||||
try owner_decl.renderFullyQualifiedName(mod, writer);
|
||||
try writer.writeAll(")).Fn.return_type.?).ErrorUnion.error_set");
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user