ref: c9d57fb9d847b916d1c84f0ecd5c7d62676819a4
parent: 3b9796f80b335ea4c2f152988715e6069effdc88
author: Ori Bernstein <ori@eigenstate.org>
date: Sun May 3 21:09:33 EDT 2015
Fix a bug detected by scan-build.
--- a/parse/infer.c
+++ b/parse/infer.c
@@ -903,6 +903,7 @@
typeerror(st, a, b, ctx, "Incompatible parameter lists");
for (i = 0; i < a->narg; i++)
unify(st, ctx, a->arg[i], b->arg[i]);
+ r = b;
} else if (a->type != Tyvar) {
typeerror(st, a, b, ctx, NULL);
}
--- a/parse/stab.c
+++ b/parse/stab.c
@@ -304,6 +304,7 @@
Tydefn *td;
Type *ty;
+ assert(t != NULL);
if (st->name)
setns(n, st->name);
if (st->name && t && t->name)