1. type api = <
  2. f : string -> unit
  3. >
  4. class impl = object
  5. method f (s:string) = ()
  6. method g = ()
  7. end
  8. type t = {
  9. impl : api;
  10. }
  11. let something = {
  12. 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 *)
  13. }