Dear list,
I'm having a little problem understanding constraints in objects. Consider
the following code:

class type foo =
object
  method get_parent : foo
end

class type foo2 =
object
  constraint foo2 = #foo
  method baz : float
  method get_parent : foo2
end

it gives me the following error:

The abbreviation foo2 expands to type < baz : float; get_parent : foo2 >
but is used with type #foo

but foo2 is clearly a subtype of foo. What am I doing wrong? I'm using ocaml
3.10.2
--Jacques Le Normand
_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

Reply via email to