diff options
-rw-r--r-- | stdlib/sys.ml | 2 | ||||
-rw-r--r-- | typing/typecore.ml | 11 |
2 files changed, 6 insertions, 7 deletions
diff --git a/stdlib/sys.ml b/stdlib/sys.ml index c186f1cd0..494916bae 100644 --- a/stdlib/sys.ml +++ b/stdlib/sys.ml @@ -78,4 +78,4 @@ let catch_break on = (* OCaml version string, must be in the format described in sys.mli. *) -let ocaml_version = "3.09+dev19 (2005-03-24)";; +let ocaml_version = "3.09+dev20 (2005-04-04)";; diff --git a/typing/typecore.ml b/typing/typecore.ml index b5dd272fb..6bb26c53f 100644 --- a/typing/typecore.ml +++ b/typing/typecore.ml @@ -777,12 +777,11 @@ let rec type_approx env sexp = in let ty = type_approx env e and ty1 = approx_ty_opt sty1 - and ty2 = approx_ty_opt sty2 - in begin - try unify env ty ty1; unify env ty1 ty2; ty2 - with Unify trace -> - raise(Error(sexp.pexp_loc, Expr_type_clash trace)) - end + and ty2 = approx_ty_opt sty2 in + begin try unify env ty ty1 with Unify trace -> + raise(Error(sexp.pexp_loc, Expr_type_clash trace)) + end; + if sty2 = None then ty1 else ty2 | _ -> newvar () (* List labels in a function type, and whether return type is a variable *) |