| Anonymous | Login | Signup for a new account | 2013-05-24 18:51 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 | |||
| 0005322 | OCaml | OCaml general | public | 2011-07-28 11:18 | 2011-07-29 03:56 | |||
| Reporter | poluxmoon | |||||||
| Assigned To | ||||||||
| Priority | normal | Severity | minor | Reproducibility | always | |||
| Status | closed | Resolution | fixed | |||||
| Platform | OS | OS Version | ||||||
| Product Version | 3.12.0 | |||||||
| Target Version | Fixed in Version | 3.13.0+dev | ||||||
| Summary | 0005322: Problem with forall and method | |||||||
| Description | Type error on code similar to : ----- type 'par t = 'par let ident v = v class alias = object method alias : 'a . 'a t -> 'a = ident (* type error here *) end ----- Which gives : ----- Error: This expression has type 'a. 'a t -> 'a but an expression was expected of type 'b. 'b t -> 'b Type 'a a = 'a is not compatible with type 'b t = 'b ----- | |||||||
| Additional Information | The problem is related to unification of foralls containing named type in a method. The compiler accepts equivalent code when not using the named type "t" or when not using a method (see attached file). | |||||||
| Tags | No tags attached. | |||||||
| Attached Files | ||||||||
Notes |
|
|
(0006066) garrigue (manager) 2011-07-29 03:56 |
Thanks for your report. Both Ctype.unify3 and Ctype.moregen didn't consider the possibility that a type abbreviation may expand to a universal type variable. This is now fixed in both trunk and 3.12 branch (revision 11159). |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2011-07-28 11:18 | poluxmoon | New Issue | |
| 2011-07-28 11:18 | poluxmoon | File Added: forallclass.ml | |
| 2011-07-29 03:56 | garrigue | Note Added: 0006066 | |
| 2011-07-29 03:56 | garrigue | Status | new => closed |
| 2011-07-29 03:56 | garrigue | Resolution | open => fixed |
| 2011-07-29 03:56 | garrigue | Fixed in Version | => 3.13.0+dev |
| Copyright © 2000 - 2011 MantisBT Group |