ref: 837deb5ccade25f83390d9b2af6a2369804514c8
parent: 2dff776a9d042ef21bd6efc75b8f149fa6b460e1
author: Ori Bernstein <ori@eigenstate.org>
date: Tue Jan 6 10:48:21 EST 2015
Slightly less confusing error messages. We now print the types. Stop babbling about subtype counts.
--- a/parse/infer.c
+++ b/parse/infer.c
@@ -787,7 +787,6 @@
Type *t, *r;
Type *a, *b;
char *from, *to;
- char buf[256];
size_t i;
/* a ==> b */
@@ -829,8 +828,7 @@
if (a->type == Tyname && !nameeq(a->name, b->name))
typeerror(st, a, b, ctx, NULL);
if (a->nsub != b->nsub) {
- snprintf(buf, sizeof buf, "Wrong subtype count - Got %zu, expected %zu", a->nsub, b->nsub);
- typeerror(st, a, b, ctx, buf);
+ typeerror(st, a, b, ctx, "subtypes are incompatible");
}
for (i = 0; i < b->nsub; i++)
unify(st, ctx, a->sub[i], b->sub[i]);