monotone-debian
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Monotone-debian] Bug#790062: Change in typing between OCaml 4.01.0 and


From: Stéphane Glondu
Subject: [Monotone-debian] Bug#790062: Change in typing between OCaml 4.01.0 and 4.02.2...
Date: Fri, 26 Jun 2015 18:09:11 -0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.7.0

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]