summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/type_check.ml4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/type_check.ml b/src/type_check.ml
index e69a40e8..dbaeb98f 100644
--- a/src/type_check.ml
+++ b/src/type_check.ml
@@ -2303,11 +2303,11 @@ and bind_lexp env (LEXP_aux (lexp_aux, (l, ())) as lexp) typ =
let (Typ_aux (typ_aux, _)) = typ in
match typ_aux with
| Typ_tup typs ->
- let bind_tuple_lexp (tlexps, env) lexp typ =
+ let bind_tuple_lexp lexp typ (tlexps, env) =
let tlexp, env = bind_lexp env lexp typ in tlexp :: tlexps, env
in
let tlexps, env =
- try List.fold_left2 bind_tuple_lexp ([], env) lexps typs with
+ try List.fold_right2 bind_tuple_lexp lexps typs ([], env) with
| Invalid_argument _ -> typ_error l "Tuple l-expression and tuple type have different length"
in
annot_lexp (LEXP_tup tlexps) typ, env