diff options
| author | 2022-08-04 15:46:32 +0200 | |
|---|---|---|
| committer | 2022-08-04 15:46:32 +0200 | |
| commit | d104761e3c213504f5a6dfb63059fc905fe6799f (patch) | |
| tree | 5b51d3147ce0506d331e89874033af0d4eb260e3 /bootstrap/types.c | |
| parent | 8a5bde697364ca301c14471196d137c3a53c25fa (diff) | |
enum
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"); } |