summaryrefslogtreecommitdiff
path: root/parse/infer.c
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2018-06-09 13:47:28 -0700
committerOri Bernstein <ori@eigenstate.org>2018-06-09 13:47:28 -0700
commit84393ead97a2e189b6057420ad7d94170b9aa00f (patch)
tree0356c0bc422713adde510745645d652aa867944f /parse/infer.c
parent92840bc1ade4d670ce1b6cd3dc7be48b16148a5e (diff)
downloadmc-84393ead97a2e189b6057420ad7d94170b9aa00f.tar.gz
Consistently and corretly add Oundef.
Diffstat (limited to 'parse/infer.c')
-rw-r--r--parse/infer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/parse/infer.c b/parse/infer.c
index 58399b0..808a485 100644
--- a/parse/infer.c
+++ b/parse/infer.c
@@ -2108,7 +2108,7 @@ infernode(Node **np, Type *ret, int *sawret)
t = type(n->iterstmt.seq);
constrain(n, t, traittab[Tciter]);
b = basetype(t);
- if (b)
+ if (b && t->type != Typtr)
unify(n, e, b);
else
t->seqaux = e;