Fix P#7395 by reverting 9a2015

master
Jacques Garrigue 2016-10-28 06:08:17 +09:00 committed by David Allsopp
parent 8c4ec6aed3
commit 09fcd51004
2 changed files with 14 additions and 1 deletions

View File

@ -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>
|}]

View File

@ -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