summaryrefslogtreecommitdiff
path: root/testsuite/tests/typing-misc/pr7712.ml
blob: 09ffb4d297246e913efa7a58cd033c8617dd4761 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
(* TEST
   * expect
*)

type 'a or_error = string

type ('a, 'b) t_ =
  | Bar : ('a, 'a or_error) t_

type 'a t = ('a, 'a) t_

let f : type a. a t -> a t = function
  | Bar -> Bar
;;
[%%expect{|
type 'a or_error = string
type ('a, 'b) t_ = Bar : ('a, 'a or_error) t_
type 'a t = ('a, 'a) t_
val f : 'a t -> 'a t = <fun>
|}];;