Fix for in enum iteration

This commit is contained in:
gingerBill
2018-08-22 18:56:41 +01:00
parent 16dfae62bc
commit a65eadee63
5 changed files with 9 additions and 31 deletions
-5
View File
@@ -717,9 +717,6 @@ enum_value_to_string :: proc(v: any) -> (string, bool) {
case u64: return get_str(v, e);
case uint: return get_str(v, e);
case uintptr: return get_str(v, e);
case f32: return get_str(v, e);
case f64: return get_str(v, e);
}
}
@@ -778,8 +775,6 @@ enum_value_to_u64 :: proc(ev: runtime.Type_Info_Enum_Value) -> u64 {
case u64: return u64(i);
case uint: return u64(i);
case uintptr: return u64(i);
case f32: return u64(i);
case f64: return u64(i);
}
return 0;
}
-1
View File
@@ -37,7 +37,6 @@ Type_Info_Enum_Value :: union {
rune,
i8, i16, i32, i64, int,
u8, u16, u32, u64, uint, uintptr,
f32, f64,
};
// Variant Types
+1 -1
View File
@@ -299,7 +299,7 @@ type_assertion_check :: proc "contextless" (ok: bool, file: string, line, column
fd := os.stderr;
__print_caller_location(fd, Source_Code_Location{file, line, column, ""});
os.write_string(fd, " Invalid type assertion from");
os.write_string(fd, " Invalid type assertion from ");
__print_typeid(fd, from);
os.write_string(fd, " to ");
__print_typeid(fd, to);