* Ocaml 3.09.3 --> 3.11.0 breaks this
@ 2009-10-27 9:04 Brighten Godfrey
2009-10-27 9:45 ` [Caml-list] " Stéphane Glondu
0 siblings, 1 reply; 3+ messages in thread
From: Brighten Godfrey @ 2009-10-27 9:04 UTC (permalink / raw)
To: OCaml List
Hello list,
I went to recompile some software I wrote, after installing OCaml
3.11.0, and it won't compile. Specifically the following code snippet
compiles in OCaml 3.09.3:
class virtual c1 = object(self)
end
class virtual c2 = object(self)
inherit c1
method virtual stuff: c2 list
method contents: c1 list =
(self#stuff :> c1 list)
method size: int =
List.fold_right (fun (c:c2) sum ->
(c#size) + sum) (self#stuff) 0
end
Yet in 3.11.0, the compiler complains:
File "test.ml", line 14, characters 10-11:
Error: This expression has type c2
It has no method size
The expression in question is the variable `c' in the expression
`c#size'. Note that removing the method `contents', which is not used
anywhere, or having `contents' just return [], causes it to compile
without error.
Any thoughts?
Thanks,
~Brighten Godfrey
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Caml-list] Ocaml 3.09.3 --> 3.11.0 breaks this
2009-10-27 9:04 Ocaml 3.09.3 --> 3.11.0 breaks this Brighten Godfrey
@ 2009-10-27 9:45 ` Stéphane Glondu
2009-10-28 2:24 ` Brighten Godfrey
0 siblings, 1 reply; 3+ messages in thread
From: Stéphane Glondu @ 2009-10-27 9:45 UTC (permalink / raw)
To: Brighten Godfrey; +Cc: OCaml List
Brighten Godfrey a écrit :
> I went to recompile some software I wrote, after installing OCaml
> 3.11.0, and it won't compile. Specifically the following code snippet
> compiles in OCaml 3.09.3: [...]
Your code works with OCaml 3.11.1. Maybe it was a temporary regression.
Best regards,
--
Stéphane
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Caml-list] Ocaml 3.09.3 --> 3.11.0 breaks this
2009-10-27 9:45 ` [Caml-list] " Stéphane Glondu
@ 2009-10-28 2:24 ` Brighten Godfrey
0 siblings, 0 replies; 3+ messages in thread
From: Brighten Godfrey @ 2009-10-28 2:24 UTC (permalink / raw)
To: Stéphane Glondu; +Cc: OCaml List
On Oct 27, 2009, at 4:45 AM, Stéphane Glondu wrote:
> Brighten Godfrey a écrit :
>> I went to recompile some software I wrote, after installing OCaml
>> 3.11.0, and it won't compile. Specifically the following code
>> snippet
>> compiles in OCaml 3.09.3: [...]
>
> Your code works with OCaml 3.11.1. Maybe it was a temporary
> regression.
Yes, it seems to work again in 3.11.1. Thanks!
~Brighten
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-10-28 2:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-27 9:04 Ocaml 3.09.3 --> 3.11.0 breaks this Brighten Godfrey
2009-10-27 9:45 ` [Caml-list] " Stéphane Glondu
2009-10-28 2:24 ` Brighten Godfrey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox