From: "Stéphane Glondu" <steph@glondu.net>
To: caml users <caml-list@inria.fr>
Cc: Debian Ocaml Maint ML <debian-ocaml-maint@lists.debian.org>,
790062@bugs.debian.org
Subject: [Caml-list] Change in typing between OCaml 4.01.0 and 4.02.2...
Date: Fri, 26 Jun 2015 20:07:39 +0200 [thread overview]
Message-ID: <558D94EB.3020902@glondu.net> (raw)
Hello,
I am debugging why monotone-viz doesn't compile with OCaml 4.02.2. I
have reduced the problem to the following:
$ cat query.mli
val make : #App.t -> unit
$ cat app.mli
class type status =
object
method pop : unit -> unit
end
class type t =
object
method query : status -> unit
end
val make : unit -> t
$ cat app.ml
class type status =
object
method pop : unit -> unit
end
class type t =
object
method query : status -> unit
end
class ctrl : t =
object (self)
method query status =
Query.make self;
status#pop ()
end
let make () =
new ctrl
$ ocamlc -c app.mli
$ ocamlc -c query.mli
$ ocamlc -c app.ml
With OCaml 4.02.2, I get the following error message:
File "app.ml", line 15, characters 6-12:
Error: This expression has type App.status
It has no method pop
which looks wrong. With OCaml 4.01.0, there is no error.
Does anyone understand what is going on?
Cheers,
--
Stéphane
next reply other threads:[~2015-06-26 18:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-26 18:07 Stéphane Glondu [this message]
2015-06-26 19:15 ` Jeremy Yallop
2015-06-28 9:44 ` Jacques Garrigue
2015-06-28 17:04 ` Stéphane Glondu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=558D94EB.3020902@glondu.net \
--to=steph@glondu.net \
--cc=790062@bugs.debian.org \
--cc=caml-list@inria.fr \
--cc=debian-ocaml-maint@lists.debian.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox