diff options
| author | Veikka Tuominen <git@vexu.eu> | 2024-03-17 13:21:43 +0200 |
|---|---|---|
| committer | Veikka Tuominen <git@vexu.eu> | 2024-03-17 13:33:05 +0200 |
| commit | f983adfc1076adc8509458c4bb64102c797041ff (patch) | |
| tree | c3f29f96fce9b11006e1d774b6f28ae160c6d632 /src/type.zig | |
| parent | 294f51814f491ae4a09348d9e7221ae3e550c16f (diff) | |
| download | zig-f983adfc1076adc8509458c4bb64102c797041ff.tar.gz zig-f983adfc1076adc8509458c4bb64102c797041ff.zip | |
Sema: fix printing of inferred error set of generic fn
Closes #19332
Diffstat (limited to 'src/type.zig')
| -rw-r--r-- | src/type.zig | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/type.zig b/src/type.zig index 664498e353..b0da997de1 100644 --- a/src/type.zig +++ b/src/type.zig @@ -254,7 +254,11 @@ pub const Type = struct { .error_union_type => |error_union_type| { try print(Type.fromInterned(error_union_type.error_set_type), writer, mod); try writer.writeByte('!'); - try print(Type.fromInterned(error_union_type.payload_type), writer, mod); + if (error_union_type.payload_type == .generic_poison_type) { + try writer.writeAll("anytype"); + } else { + try print(Type.fromInterned(error_union_type.payload_type), writer, mod); + } return; }, .inferred_error_set_type => |func_index| { |
