blob: 1957e1fce6b950f950e16150af6addac3ef40d17 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
(* TEST
*)
class idfunc =
object
method id : 'ab. ([< `A | `B ] as 'ab) -> 'ab = fun x -> x
end
let act : [ `A | `B ] -> string =
fun x -> match (new idfunc)#id x with `B -> "B" | `A -> "A"
let _ = print_endline (act `A)
|