ref: ac0e66a985ee126f7ea5ab26eb024747054be295
parent: ddf0bd7ed1851d8c06ed327dd3b20b9895d0b0dd
author: Ori Bernstein <[email protected]>
date: Thu Jun 7 17:45:47 EDT 2012
Actually set constraints on all types. Since we're doing constraint checking... yeah. it's needed.
--- a/parse/infer.c
+++ b/parse/infer.c
@@ -81,8 +81,8 @@
return bscount(a->cstrs) == 0;
/* if b->cstrs \ a->cstrs == 0, then all of
* a's constraints are satisfied. */
- s = dupbs(b->cstrs);
- bsdiff(s, a->cstrs);
+ s = dupbs(a->cstrs);
+ bsdiff(s, b->cstrs);
n = bscount(s);
delbs(s);
--- a/parse/type.c
+++ b/parse/type.c
@@ -226,8 +226,6 @@
{
if (!t->cstrs)
t->cstrs = mkbs();
- if (t->type != Tyvar && t->type != Typaram)
- return 0;
bsput(t->cstrs, c->cid);
return 1;
}