- type api = <
- f : string -> unit
- >
- class impl = object
- method f (s:string) = ()
- method g = ()
- end
- type t = {
- impl : api;
- }
- let something = {
- impl = new impl; (* Error: This expression has type impl but an expression was expected of type api The second object type has no method g *)
- }