ref: e1b5f8f8dee7eba58fe610a2b18a7f3bb80c6ede
parent: 0781d54100ac448eda8cc9e39bd931d47b21988a
author: Ori Bernstein <[email protected]>
date: Wed Oct 9 11:28:24 EDT 2013
Give slight better errors.
--- a/parse/infer.c
+++ b/parse/infer.c
@@ -576,7 +576,8 @@
} else if (u->type == Tystruct && v->type == Tystruct && u != v) {
assert(u->nmemb = v->nmemb);
for (i = 0; i < v->nmemb; i++) {
- unify(st, ctx, type(st, u->sdecls[i]), type(st, v->sdecls[i]));
+ assert(!strcmp(namestr(u->sdecls[i]->decl.name), namestr(v->sdecls[i]->decl.name)));
+ unify(st, u->sdecls[i], type(st, u->sdecls[i]), type(st, v->sdecls[i]));
}
}
}