mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-20 16:36:46 +00:00
Fix for in enum iteration
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user