Fix type assertion bug #619

This commit is contained in:
gingerBill
2020-04-21 23:26:02 +01:00
parent f141e2868d
commit 4236e870d7
2 changed files with 8 additions and 5 deletions
+6 -2
View File
@@ -235,8 +235,12 @@ print_caller_location :: proc(fd: os.Handle, using loc: Source_Code_Location) {
os.write_byte(fd, ')');
}
print_typeid :: proc(fd: os.Handle, id: typeid) {
ti := type_info_of(id);
print_type(fd, ti);
if id == nil {
os.write_string(fd, "nil");
} else {
ti := type_info_of(id);
print_type(fd, ti);
}
}
print_type :: proc(fd: os.Handle, ti: ^Type_Info) {
if ti == nil {