| Anonymous | Login | Signup for a new account | 2013-06-20 06:25 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 | |||
| 0004350 | OCaml | OCaml general | public | 2007-07-26 18:25 | 2007-10-29 05:41 | |||
| Reporter | jm | |||||||
| Assigned To | ||||||||
| Priority | normal | Severity | major | Reproducibility | always | |||
| Status | closed | Resolution | fixed | |||||
| Platform | OS | OS Version | ||||||
| Product Version | 3.10+dev | |||||||
| Target Version | Fixed in Version | 3.10+dev | ||||||
| Summary | 0004350: Polymorphism failure on polymorphic variants inside a record through a local and open function. | |||||||
| Description | $ocamlc -v The Objective Caml compiler, version 3.10.1+dev0 (2007-05-21) ... $cat file.ml module Ok = struct type 'a t = [ `A of 'a | `B ] let fuun = function `A _ -> () | _ -> () let ook (t: 'a t) = fuun t let ok (t: 'a t) = (function `A _ -> () | `B -> ()) t let ko (t: 'a t) = (function `A _ -> () | _ -> ()) t end module Ko = struct type 'a s = [ `A of 'a | `B ] type 'a t = { s : 'a s } let fuun = function `A _ -> () | _ -> () let ook (t: 'a t) = fuun t.s let ok (t: 'a t) = (function `A _ -> () | `B -> ()) t.s let ko (t: 'a t) = (function `A _ -> () | _ -> ()) t.s end $ocamlc -c -i file.ml module Ok : sig type 'a t = [ `A of 'a | `B ] val fuun : [> `A of 'a ] -> unit val ook : 'a t -> unit val ok : 'a t -> unit val ko : 'a t -> unit end module Ko : sig type 'a s = [ `A of 'a | `B ] type 'a t = { s : 'a s; } val fuun : [> `A of 'a ] -> unit val ook : 'a t -> unit val ok : 'a t -> unit val ko : '_a t -> unit end To my mind, Ko.ko should have the signature: 'a t -> unit, as it has with ocamlc 3.09.2 for instance. | |||||||
| Tags | No tags attached. | |||||||
| Attached Files | ||||||||
Notes |
|
|
(0004216) garrigue (manager) 2007-10-29 05:41 |
Delayed checks were changing type levels... Fixed in branch release310 (typing/typecore.ml) |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2007-07-26 18:25 | jm | New Issue | |
| 2007-10-29 05:41 | garrigue | Status | new => closed |
| 2007-10-29 05:41 | garrigue | Note Added: 0004216 | |
| 2007-10-29 05:41 | garrigue | Resolution | open => fixed |
| 2007-10-29 05:41 | garrigue | Fixed in Version | => 3.10+dev |
| Copyright © 2000 - 2011 MantisBT Group |