ref: ff6bb29c564433019230ecae56cc2273bc217b33
parent: 7ff7b5fec85dbfa255e92827a58ca632dbabd657
author: Ori Bernstein <[email protected]>
date: Wed Aug 28 13:02:57 EDT 2013
Use the right variable to dump line info.
--- a/parse/infer.c
+++ b/parse/infer.c
@@ -735,7 +735,7 @@
/* if an export has an initializer, it shouldn't be declared in the
* body */
if (ux && ug)
- fatal(ux->line, "Union constructor double defined on %d", ng->line);
+ fatal(ux->line, "Union constructor double defined on %d", ux->line);
else if (!ug)
putucon(globls, ux);
else
@@ -1267,6 +1267,8 @@
t->sub[i] = tyfix(st, ctx, t->sub[i]);
}
if (t->type == Tyvar) {
+ if (debugopt['T'])
+ dump(file, stdout);
fatal(t->line, "underconstrained type %s near %s", tyfmt(buf, 1024, t), ctxstr(st, ctx));
}