ref: 6a4f50b69edba3548b265cbcb99c5dbd7ada04c5
parent: 6f349d4517219f9e23f70c87d1a62dccc7438218
author: Ori Bernstein <[email protected]>
date: Sun Jun 24 10:40:33 EDT 2012
Give correct error when unifying mismatched aliases
--- a/parse/infer.c
+++ b/parse/infer.c
@@ -292,7 +292,7 @@
tytab[a->tid] = b;
r = b;
}
- if (b->type != Tyvar)
+ if (a->type == Tyvar && b->type != Tyvar)
if (occurs(a, b))
fatal(ctx->line, "Infinite type %s in %s near %s", tystr(a), tystr(b), ctxstr(ctx));