* [Caml-list] Oo.copy
@ 2003-06-27 15:35 Babo Attila
2003-06-28 10:14 ` Jacques Garrigue
0 siblings, 1 reply; 2+ messages in thread
From: Babo Attila @ 2003-06-27 15:35 UTC (permalink / raw)
To: caml-list
What's wrong with this code? When I try to compile it using ocamlc
3.06 the compiler hangs on Win32 and on Debian Linux as well. The
ocaml interpreter does the same.
It works when I changed Oo.copy self to {<>} or simply self.
class virtual duplicatable =
object (_ : 'a)
method virtual dup : 'a
end
class test =
object (self)
inherit duplicatable
method dup = Oo.copy self
end
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Caml-list] Oo.copy
2003-06-27 15:35 [Caml-list] Oo.copy Babo Attila
@ 2003-06-28 10:14 ` Jacques Garrigue
0 siblings, 0 replies; 2+ messages in thread
From: Jacques Garrigue @ 2003-06-28 10:14 UTC (permalink / raw)
To: attila.babo; +Cc: caml-list
> What's wrong with this code? When I try to compile it using ocamlc
> 3.06 the compiler hangs on Win32 and on Debian Linux as well. The
> ocaml interpreter does the same.
>
> It works when I changed Oo.copy self to {<>} or simply self.
>
> class virtual duplicatable =
> object (_ : 'a)
> method virtual dup : 'a
> end
>
> class test =
> object (self)
> inherit duplicatable
> method dup = Oo.copy self
> end
Looks like a bug.
But the CVS version chomps it happily, so this bug is already fixed
for the next release.
Anyway, it makes more sense to use {< >} to get a copy of self (the
meaning is just the same as Oo.copy self).
Jacques Garrigue
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-06-28 10:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-27 15:35 [Caml-list] Oo.copy Babo Attila
2003-06-28 10:14 ` Jacques Garrigue
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox