mirror of
https://github.com/odin-lang/Odin.git
synced 2026-01-18 02:27:00 +00:00
Integer Enumerations
This commit is contained in:
@@ -1237,10 +1237,11 @@ ssaValue *ssa_emit_conv(ssaProcedure *proc, ssaValue *value, Type *t) {
|
||||
}
|
||||
|
||||
|
||||
Type *src = get_base_type(src_type);
|
||||
Type *dst = get_base_type(t);
|
||||
if (are_types_identical(t, src_type))
|
||||
Type *src = get_enum_base_type(get_base_type(src_type));
|
||||
Type *dst = get_enum_base_type(get_base_type(t));
|
||||
if (are_types_identical(src, dst)) {
|
||||
return value;
|
||||
}
|
||||
|
||||
if (value->kind == ssaValue_Constant) {
|
||||
if (dst->kind == Type_Basic) {
|
||||
@@ -1383,7 +1384,6 @@ ssaValue *ssa_emit_conv(ssaProcedure *proc, ssaValue *value, Type *t) {
|
||||
return v;
|
||||
}
|
||||
|
||||
|
||||
gb_printf_err("Not Identical %s != %s\n", type_to_string(src_type), type_to_string(t));
|
||||
gb_printf_err("Not Identical %s != %s\n", type_to_string(src), type_to_string(dst));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user