summaryrefslogtreecommitdiff
path: root/parse/infer.c
diff options
context:
space:
mode:
Diffstat (limited to 'parse/infer.c')
-rw-r--r--parse/infer.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/parse/infer.c b/parse/infer.c
index daa3727..77749de 100644
--- a/parse/infer.c
+++ b/parse/infer.c
@@ -895,8 +895,7 @@ tryconstrain(Type *base, Trait *tr)
if (tymatchrank(tm->filter[i], ty) >= 0)
return 1;
}
- assert(ty->nsub == 1);
- if (!ty->sub)
+ if (!ty->sub || ty->nsub != 1)
break;
ty = ty->sub[0];
tm = tm->sub[ty->type];