| Anonymous | Login | Signup for a new account | 2013-05-21 20:12 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 | |||
| 0004478 | OCaml | OCaml general | public | 2008-01-13 17:43 | 2010-05-21 05:38 | |||
| Reporter | dra | |||||||
| Assigned To | garrigue | |||||||
| Priority | normal | Severity | feature | Reproducibility | always | |||
| Status | closed | Resolution | fixed | |||||
| Platform | OS | OS Version | ||||||
| Product Version | 3.09.3 | |||||||
| Target Version | Fixed in Version | 3.12.0+dev | ||||||
| Summary | 0004478: Type error message when constructors are mis-ordered could be clearer | |||||||
| Description | Foo.ml: type t = A | B Foo.mli type t = B | A Running ocamlc -c t.mli t.ml correctly reports that... The implementation t.ml does not match the interface t.cmi: Type declarations do not match: type t = B | A is not included in type t = A | B However, the mismatch is only because the constructors are misordered. This is a slightly cryptic error unless you know about the internals of OCaml - perhaps in this instance, ocamlc could note that the types would be compatible if the constructors were in the same order? | |||||||
| Additional Information | I was being daft here and wrote an mli file with my brain switched off. Although I know from writing C stubs that the constructors must obviously be in the same order for the types to be the same, it took quite me some time to realise my stupidity because the type I was dealing with was much longer. The additional warning would be most useful! I presume 3.10.1 behaves the same way... | |||||||
| Tags | No tags attached. | |||||||
| Attached Files | ||||||||
Notes |
|
|
(0005480) garrigue (manager) 2010-05-21 05:38 |
Error messages concerning type declaration mismatches have been greatly improved for 3.12. |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2008-01-13 17:43 | dra | New Issue | |
| 2008-01-18 15:37 | doligez | Status | new => acknowledged |
| 2010-04-30 07:25 | garrigue | Status | acknowledged => assigned |
| 2010-04-30 07:25 | garrigue | Assigned To | => garrigue |
| 2010-05-21 05:38 | garrigue | Note Added: 0005480 | |
| 2010-05-21 05:38 | garrigue | Status | assigned => closed |
| 2010-05-21 05:38 | garrigue | Resolution | open => fixed |
| 2010-05-21 05:38 | garrigue | Fixed in Version | => 3.12.0+dev |
| 2010-05-21 05:51 | garrigue | Relationship added | related to 0004819 |
| Copyright © 2000 - 2011 MantisBT Group |