Erreur dans la "location" de if...then...else
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@857 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02master
parent
2a073e5ee9
commit
b2d9978b17
|
@ -425,9 +425,9 @@ let rec type_exp env sexp =
|
|||
{ exp_desc = Texp_ifthenelse(cond, ifso, None);
|
||||
exp_loc = sexp.pexp_loc;
|
||||
exp_type = instance Predef.type_unit }
|
||||
| Some sexp ->
|
||||
| Some sifnot ->
|
||||
let ifso = type_exp env sifso in
|
||||
let ifnot = type_expect env sexp ifso.exp_type in
|
||||
let ifnot = type_expect env sifnot ifso.exp_type in
|
||||
{ exp_desc = Texp_ifthenelse(cond, ifso, Some ifnot);
|
||||
exp_loc = sexp.pexp_loc;
|
||||
exp_type = ifso.exp_type }
|
||||
|
|
Loading…
Reference in New Issue