summaryrefslogtreecommitdiff
path: root/parse/infer.c
diff options
context:
space:
mode:
Diffstat (limited to 'parse/infer.c')
-rw-r--r--parse/infer.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/parse/infer.c b/parse/infer.c
index f03c6bc..83690cc 100644
--- a/parse/infer.c
+++ b/parse/infer.c
@@ -353,6 +353,7 @@ occurs_rec(Type *sub, Bitset *bs)
{
size_t i;
+ sub = tf(sub);
if (bshas(bs, sub->tid))
return 1;
bsput(bs, sub->tid);
@@ -390,8 +391,9 @@ occursin(Type *a, Type *b)
int r;
bs = mkbs();
- bsput(bs, b->tid);
- r = occurs_rec(a, bs);
+ a = tf(a);
+ bsput(bs, a->tid);
+ r = occurs_rec(b, bs);
bsfree(bs);
return r;
}