summaryrefslogtreecommitdiff
path: root/testsuite/tests/typing-gadts/pr6174.ml
blob: d689f656c8054abe583655c6f9ee175cdbba1235 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
(* TEST
 expect;
*)

type _ t = C : ((('a -> 'o) -> 'o) -> ('b -> 'o) -> 'o) t
let f : type a o. ((a -> o) -> o) t -> (a -> o) -> o =
 fun C k -> k (fun x -> x);;
[%%expect{|
type _ t = C : ((('a -> 'o) -> 'o) -> ('b -> 'o) -> 'o) t
Line 3, characters 24-25:
3 |  fun C k -> k (fun x -> x);;
                            ^
Error: This expression has type $0 but an expression was expected of type
         $1 = o
|}];;