Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- type base_type = ..
- class type base = object method base : base_type end
- class type a' = object method baba : string method base : base_type end;;
- type base_type += A of a'
- class a = object (self) method baba = "string" method base = A (self :> a') end
- let foo () =
- let a = new a in
- let base = (a :> base) in
- match base#base with
- | A a' -> a'#baba
- | _ -> assert false
Advertisement
Add Comment
Please, Sign In to add comment