summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/type_check.ml2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/type_check.ml b/src/type_check.ml
index b4460992..fea94a90 100644
--- a/src/type_check.ml
+++ b/src/type_check.ml
@@ -2514,7 +2514,7 @@ and infer_funapp' l env f (typq, f_typ) xs ret_ctx_typ =
let nc_true = nc_eq (nconstant 0) (nconstant 0) in
let typ_ret =
- if existentials = []
+ if KidSet.is_empty (KidSet.inter (typ_frees typ_ret) (KidSet.of_list existentials))
then typ_ret
else mk_typ (Typ_exist (existentials, List.fold_left nc_and nc_true ex_constraints, typ_ret))
in