| Anonymous | Login | Signup for a new account | 2013-05-19 06:43 CEST | ![]() |
| Main | My View | View Issues | Change Log | Roadmap |
| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | |||
| 0004426 | OCaml | OCaml general | public | 2007-10-20 03:04 | 2007-10-29 07:57 | |||
| Reporter | jm | |||||||
| Assigned To | ||||||||
| Priority | normal | Severity | major | Reproducibility | always | |||
| Status | closed | Resolution | fixed | |||||
| Platform | i686 | OS | Debian | OS Version | Sid | |||
| Product Version | 3.10+dev | |||||||
| Target Version | Fixed in Version | 3.10+dev | ||||||
| Summary | 0004426: Unexpected memorization of an optional label. | |||||||
| Description | In the example below, the optional argument ?l of class ko shouldn't be memorized at the first instantiation. | |||||||
| Steps To Reproduce | % ocaml Objective Caml version 3.10.1+dev0 (2007-05-21) # class i ?(l=fun () -> 0) () = object val v = l () method v = v initializer prerr_endline ("v="^string_of_int v) end;; class i : ?l:(unit -> int) -> unit -> object val v : int method v : int end # class ko ?l = i ~l: (fun () -> (object inherit i () ?l end)#v + 1) class ok ?l = i ~l: ((fun ?l () -> (object inherit i () ?l end)#v + 1) ?l) ;; class ko : ?l:(unit -> int) -> unit -> i class ok : ?l:(unit -> int) -> unit -> i # new ko () ~l: (fun _ -> 42);; v=42 v=43 - : ko = <obj> # new ko ();; v=42 v=43 - : ko = <obj> # new ko () ~l: (fun _ -> 24);; v=42 v=43 - : ko = <obj> # new ok () ~l: (fun _ -> 42);; v=42 v=43 - : ok = <obj> # new ok ();; v=0 v=1 - : ok = <obj> # new ok () ~l: (fun _ -> 24);; v=24 v=25 - : ok = <obj> | |||||||
| Tags | No tags attached. | |||||||
| Attached Files | ||||||||
Notes |
|
|
(0004214) garrigue (manager) 2007-10-29 04:24 |
I see no attached example... |
|
(0004215) jm (reporter) 2007-10-29 04:44 |
It is because the example is inside the field "Steps to reproduce" hidden in the advanced view: http://caml.inria.fr/mantis/bug_view_advanced_page.php?bug_id=4426 [^] |
|
(0004217) garrigue (manager) 2007-10-29 07:57 |
Fixed in branch release310 (typing/typeclass.ml) Environment declared by class functions was incorrect. |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2007-10-20 03:04 | jm | New Issue | |
| 2007-10-29 04:24 | garrigue | Note Added: 0004214 | |
| 2007-10-29 04:28 | garrigue | Status | new => feedback |
| 2007-10-29 04:44 | jm | Note Added: 0004215 | |
| 2007-10-29 07:57 | garrigue | Status | feedback => closed |
| 2007-10-29 07:57 | garrigue | Note Added: 0004217 | |
| 2007-10-29 07:57 | garrigue | Resolution | open => fixed |
| 2007-10-29 07:57 | garrigue | Fixed in Version | => 3.10+dev |
| Copyright © 2000 - 2011 MantisBT Group |