Prevent cast on pointer to union types

This commit is contained in:
Ginger Bill
2017-02-14 17:24:56 +00:00
parent 8b5e3428a1
commit 2722de65b7
7 changed files with 29 additions and 9 deletions
+1 -1
View File
@@ -140,7 +140,7 @@ buffer_write_type :: proc(buf: ^Buffer, ti: ^Type_Info) {
if info.params == nil {
buffer_write_string(buf, "()");
} else {
t := cast(^Tuple)info.params;
t := union_cast(^Tuple)info.params;
buffer_write_string(buf, "(");
for type, i in t.types {
if i > 0 { buffer_write_string(buf, ", "); }