Fix enum type comparison; Start demo 003 code

This commit is contained in:
Ginger Bill
2016-09-21 23:26:31 +01:00
parent 33bd3f635f
commit 664c2cd7a5
11 changed files with 361 additions and 48 deletions
+1 -1
View File
@@ -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;
+2 -6
View File
@@ -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;
}
}
}