# class type foo_t = object method foo : string end type 'a name = Foo : foo_t name | Int : int name # class foo : object method cast : foo_t name -> < foo : string > method foo : string end # Characters 22-184: ..object(self) method foo = "foo" method cast: type a. a name -> a = function Foo -> (self :> foo_t) | _ -> ((raise Exit) : a) end Error: The class type object method cast : 'a name -> 'a method foo : string end is not matched by the class type foo_t The public method cast cannot be hidden #