|
@@ -1252,7 +1252,7 @@ and type_switch ctx e cases def need_val p =
|
|
|
| [] -> ()
|
|
|
| _ -> display_error ctx ("Some constructors are not matched : " ^ String.concat "," l) p
|
|
|
);
|
|
|
- let t = if not need_val then (mk_mono()) else unify_min_raise ctx !el in
|
|
|
+ let t = if not need_val then (mk_mono()) else unify_min ctx !el in
|
|
|
mk (TMatch (eval,(enum,enparams),List.map indexes cases,def)) t p
|
|
|
| _ ->
|
|
|
let consts = Hashtbl.create 0 in
|
|
@@ -1272,7 +1272,7 @@ and type_switch ctx e cases def need_val p =
|
|
|
el, e
|
|
|
in
|
|
|
let cases = List.map exprs cases in
|
|
|
- let t = if not need_val then (mk_mono()) else unify_min_raise ctx !el in
|
|
|
+ let t = if not need_val then (mk_mono()) else unify_min ctx !el in
|
|
|
mk (TSwitch (eval,cases,def)) t p
|
|
|
|
|
|
and type_ident_noerr ctx i is_type p mode =
|
|
@@ -1699,7 +1699,7 @@ and type_expr ctx ?(need_val=true) (e,p) =
|
|
|
mk (TIf (e,e1,None)) ctx.t.tvoid p
|
|
|
| Some e2 ->
|
|
|
let e2 = type_expr ctx ~need_val e2 in
|
|
|
- let t = if not need_val then ctx.t.tvoid else unify_min_raise ctx [e1; e2] in
|
|
|
+ let t = if not need_val then ctx.t.tvoid else unify_min ctx [e1; e2] in
|
|
|
mk (TIf (e,e1,Some e2)) t p)
|
|
|
| EWhile (cond,e,NormalWhile) ->
|
|
|
let old_loop = ctx.in_loop in
|