Fix P#7395 by reverting 9a2015
parent
8c4ec6aed3
commit
09fcd51004
|
@ -1434,3 +1434,16 @@ type (+'a, -'b) foo = private int
|
|||
val f : int -> ('a, 'a) foo = <fun>
|
||||
val x : ('_a, '_a) foo = 3
|
||||
|}]
|
||||
|
||||
(* PR#7395 *)
|
||||
type u
|
||||
type 'a t = u;;
|
||||
let c (f : u -> u) =
|
||||
object
|
||||
method apply: 'a. 'a t -> 'a t = fun x -> f x
|
||||
end;;
|
||||
[%%expect{|
|
||||
type u
|
||||
type 'a t = u
|
||||
val c : (u -> u) -> < apply : 'a. 'a t -> 'a t > = <fun>
|
||||
|}]
|
||||
|
|
|
@ -3800,7 +3800,7 @@ and type_cases ?in_function env ty_arg ty_res partial_flag loc caselist =
|
|||
let rec is_var spat =
|
||||
match spat.ppat_desc with
|
||||
Ppat_any | Ppat_var _ -> true
|
||||
| Ppat_alias (spat, _) | Ppat_constraint (spat, _) -> is_var spat
|
||||
| Ppat_alias (spat, _) -> is_var spat
|
||||
| _ -> false in
|
||||
let needs_exhaust_check =
|
||||
match caselist with
|
||||
|
|
Loading…
Reference in New Issue