IR Fix for UnionTagValue

This commit is contained in:
Ginger Bill
2017-08-28 23:04:48 +01:00
parent 2ac33285c1
commit 1e3b3c107c
2 changed files with 6 additions and 5 deletions
+4 -2
View File
@@ -174,7 +174,10 @@ fprint_type :: proc(fd: os.Handle, info: ^Type_Info) {
}
write_type :: proc(buf: ^String_Buffer, ti: ^Type_Info) {
if ti == nil do return;
if ti == nil {
write_string(buf, "nil");
return;
}
using Type_Info;
match info in ti.variant {
@@ -324,7 +327,6 @@ write_type :: proc(buf: ^String_Buffer, ti: ^Type_Info) {
write_int(buf, i64(info.bits[i]), 10);
}
write_string(buf, "}");
}
}