* virtual instance variables @ 2007-06-28 13:34 Jeremy Yallop 2007-06-28 13:47 ` [Caml-list] " Jon Harrop 2007-06-28 14:48 ` Jacques Garrigue 0 siblings, 2 replies; 5+ messages in thread From: Jeremy Yallop @ 2007-06-28 13:34 UTC (permalink / raw) To: Caml List Should this be considered a bug? # (object val virtual c : float method m = c end) # m;; Segmentation fault ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Caml-list] virtual instance variables 2007-06-28 13:34 virtual instance variables Jeremy Yallop @ 2007-06-28 13:47 ` Jon Harrop 2007-06-28 13:48 ` Vincent Hanquez 2007-06-28 14:48 ` Jacques Garrigue 1 sibling, 1 reply; 5+ messages in thread From: Jon Harrop @ 2007-06-28 13:47 UTC (permalink / raw) To: caml-list On Thursday 28 June 2007 14:34:20 Jeremy Yallop wrote: > Should this be considered a bug? > > # (object val virtual c : float method m = c end) # m;; > Segmentation fault Yes: $ ocaml Objective Caml version 3.09.1 # (object val virtual c : float method m = c end) # m;; Syntax error $ ocaml Objective Caml version 3.10.0 # (object val virtual c : float method m = c end) # m;; Signal -10 and what is signal -10?! :-) -- Dr Jon D Harrop, Flying Frog Consultancy Ltd. The OCaml Journal http://www.ffconsultancy.com/products/ocaml_journal/?e ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Caml-list] virtual instance variables 2007-06-28 13:47 ` [Caml-list] " Jon Harrop @ 2007-06-28 13:48 ` Vincent Hanquez 0 siblings, 0 replies; 5+ messages in thread From: Vincent Hanquez @ 2007-06-28 13:48 UTC (permalink / raw) To: Jon Harrop; +Cc: caml-list On Thu, Jun 28, 2007 at 02:47:59PM +0100, Jon Harrop wrote: > $ ocaml > Objective Caml version 3.10.0 > > # (object val virtual c : float method m = c end) # m;; > Signal -10 > > and what is signal -10?! :-) $ ocaml Objective Caml version 3.10.0 # Sys.sigsegv;; - : int = -10 # -- Vincent Hanquez ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Caml-list] virtual instance variables 2007-06-28 13:34 virtual instance variables Jeremy Yallop 2007-06-28 13:47 ` [Caml-list] " Jon Harrop @ 2007-06-28 14:48 ` Jacques Garrigue 1 sibling, 0 replies; 5+ messages in thread From: Jacques Garrigue @ 2007-06-28 14:48 UTC (permalink / raw) To: jeremy.yallop; +Cc: caml-list From: Jeremy Yallop <jeremy.yallop@ed.ac.uk> > Should this be considered a bug? > > # (object val virtual c : float method m = c end) # m;; > Segmentation fault Any segmentation fault using no unsafe features is clearly a bug, and should go in the bug database. Should be fixed soon. Jacques Garrigue ^ permalink raw reply [flat|nested] 5+ messages in thread
* virtual instance variables @ 2007-05-18 18:50 micha 0 siblings, 0 replies; 5+ messages in thread From: micha @ 2007-05-18 18:50 UTC (permalink / raw) To: caml-list entering in the toplevel: class virtual c = object val virtual d : int end;; then: class d = object inherit c val d = 9 end;; gives me: Exception: Not_found. What is not found? (compiling works) if I define: class virtual c = object val d = 0 end;; class d = object inherit c val d = 9 end;; gives the warning: Warning V: the instance variable d is overriden. The behaviour changed in ocaml 3.10 (previous behaviour was hiding.) I thought that without the virtual declaration the behaviour is the same as before? cheers, Michael ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-06-28 14:49 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2007-06-28 13:34 virtual instance variables Jeremy Yallop 2007-06-28 13:47 ` [Caml-list] " Jon Harrop 2007-06-28 13:48 ` Vincent Hanquez 2007-06-28 14:48 ` Jacques Garrigue -- strict thread matches above, loose matches on Subject: below -- 2007-05-18 18:50 micha
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox