mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-29 02:40:05 +00:00
Fix enum type comparison; Start demo 003 code
This commit is contained in:
@@ -418,7 +418,7 @@ Entity *scope_insert_entity(Scope *s, Entity *entity) {
|
||||
|
||||
void check_scope_usage(Checker *c, Scope *scope) {
|
||||
// TODO(bill): Use this?
|
||||
#if 1
|
||||
#if 0
|
||||
gb_for_array(i, scope->elements.entries) {
|
||||
auto *entry = scope->elements.entries + i;
|
||||
Entity *e = entry->value;
|
||||
|
||||
@@ -599,12 +599,8 @@ b32 are_types_identical(Type *x, Type *y) {
|
||||
break;
|
||||
|
||||
case TypeRecord_Enum:
|
||||
if (are_types_identical(x->Record.enum_base, y->Record.enum_base)) {
|
||||
if (x->Record.field_count == y->Record.field_count) {
|
||||
return x->Record.fields == y->Record.fields;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
// NOTE(bill): Each enum is unique
|
||||
return x == y;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user