error set type formatting

This commit is contained in:
Techatrix 2023-01-06 15:01:48 +01:00
parent 650eaeb66c
commit 909424cada

View File

@ -656,7 +656,15 @@ pub const Key = union(enum) {
}); });
}, },
// .error_type => @panic("TODO"), // .error_type => @panic("TODO"),
.error_set_type => @panic("TODO"), .error_set_type => |error_set_info| {
const names = error_set_info.names;
try writer.writeAll("error{");
for (names) |name, i| {
if (i != 0) try writer.writeByte(',');
try writer.writeAll(name);
}
try writer.writeByte('}');
},
.enum_type => @panic("TODO"), .enum_type => @panic("TODO"),
.function_type => |function_info| { .function_type => |function_info| {
try writer.writeAll("fn("); try writer.writeAll("fn(");