static unsigned hash_atomic_type(const atomic_type_t *type)
{
unsigned some_prime = 27644437;
- unsigned result = type->atype * some_prime;
+ unsigned result = type->akind * some_prime;
return result;
}
case TYPE_INVALID:
panic("internalizing void or invalid types not possible");
return 0;
+ case TYPE_ERROR:
+ return 0;
case TYPE_ATOMIC:
hash = hash_atomic_type(&type->atomic);
break;
static bool atomic_types_equal(const atomic_type_t *type1,
const atomic_type_t *type2)
{
- return type1->atype == type2->atype;
+ return type1->akind == type2->akind;
}
static bool function_types_equal(const function_type_t *type1,
return false;
switch(type1->kind) {
+ case TYPE_ERROR:
+ /* Hmm, the error type is never equal */
+ return false;
case TYPE_INVALID:
return false;
case TYPE_ATOMIC: