commit
2cdf149e32
|
@ -10,4 +10,5 @@ pr6123_bad.ml
|
|||
pr6383.ml
|
||||
pr6907_bad.ml
|
||||
self_cannot_be_closed.ml
|
||||
self_cannot_escape_pr7865.ml
|
||||
Tests.ml
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
(* TEST
|
||||
* expect
|
||||
*)
|
||||
|
||||
class c =
|
||||
object (o)
|
||||
method foo = o
|
||||
end;;
|
||||
[%%expect {|
|
||||
class c : object ('a) method foo : 'a end
|
||||
|}]
|
||||
|
||||
class d =
|
||||
object (o) inherit c
|
||||
method bar = fun () ->
|
||||
let o = List.fold_right (fun _ o -> o#foo) [] o in
|
||||
let o = match () with () -> o in o
|
||||
end;;
|
||||
[%%expect {|
|
||||
class d : object ('a) method bar : unit -> 'a method foo : 'a end
|
||||
|}]
|
Loading…
Reference in New Issue