diff options
Diffstat (limited to 'bootstrap/types.c')
| -rw-r--r-- | bootstrap/types.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/bootstrap/types.c b/bootstrap/types.c index 401f9e6..0353041 100644 --- a/bootstrap/types.c +++ b/bootstrap/types.c @@ -52,7 +52,9 @@ hashtype(const struct type *ty) { h = jkhashv(h, ty->fn.params.n); for (int i = 0; i < ty->fn.params.n; ++i) h = jkhashv(h, ty->fn.params.d[i]); - + case TYenum: + h = jkhashv(h, ty->enu.id); + break; } return h; } @@ -82,6 +84,8 @@ typeeql(const struct type *lhs, const struct type *rhs) { if (!typeeql(lhs->fn.params.d[i], rhs->fn.params.d[i])) return 0; return 1; + case TYenum: + return 0; } assert(0 && "unreachable"); } |