caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Unwanted type constraint in mutually recursive parameterized class type definition.
@ 2015-07-08 16:24 Philippe Veber
  2015-07-08 23:57 ` Jacques Garrigue
  0 siblings, 1 reply; 3+ messages in thread
From: Philippe Veber @ 2015-07-08 16:24 UTC (permalink / raw)
  To: caml users

[-- Attachment #1: Type: text/plain, Size: 467 bytes --]

Dear camlers,

  I obtain an unexpected answer from the toplevel when I enter the
following definition:

        OCaml version 4.03.0+dev7-2015-02-08

# class type ['a] c =
  object
    method m : d
  end
and d =
  object
    inherit [int] c
  end
;;
class type ['a] c = object constraint 'a = int method m : d end
and d = object method m : d end

What surprises me is the constraint 'a = int in the definition of c. Is
this is a bug or feature?

Cheers,
  Philippe.

[-- Attachment #2: Type: text/html, Size: 692 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-07-16 16:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-08 16:24 [Caml-list] Unwanted type constraint in mutually recursive parameterized class type definition Philippe Veber
2015-07-08 23:57 ` Jacques Garrigue
2015-07-16 16:00   ` Philippe Veber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).