| Anonymous | Login | Signup for a new account | 2013-05-24 22: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 | ||||||
| 0005061 | OCaml | OCaml general | public | 2010-05-27 16:54 | 2011-06-01 22:55 | ||||||
| Reporter | montagu | ||||||||||
| Assigned To | |||||||||||
| Priority | normal | Severity | feature | Reproducibility | always | ||||||
| Status | acknowledged | Resolution | open | ||||||||
| Platform | OS | OS Version | |||||||||
| Product Version | |||||||||||
| Target Version | Fixed in Version | ||||||||||
| Summary | 0005061: mutiple value components in signatures should produce a warning or an error | ||||||||||
| Description | module type S = sig val x : int val x : int end as well as module type S = sig val x : int val x : bool end is accepted and keeps the last value component since 3.12. It should produce a warning or an error. The same remark applies with inclusion of signatures. | ||||||||||
| Tags | No tags attached. | ||||||||||
| Attached Files | |||||||||||
Relationships |
||||||||||||||||
|
||||||||||||||||
Notes |
|
|
(0005521) montagu (reporter) 2010-05-27 16:55 |
Related to PR#5037 |
|
(0005522) garrigue (manager) 2010-05-28 05:33 |
Both of those behaviours are intended. I.e., if you write let x = 1 let x = "hello" this is perfectly valid ocaml, and the visible result is a value x of type string (the first definition gets hidden). The same behaviour is now available for signatures. I'm not sure what kind of error a warning would help catch. |
|
(0005524) Julien Signoles (reporter) 2010-05-28 09:48 |
I fully disagree with this feature wish. Dear ocaml developers, please keep the current behavior (keeping the last declaration): do not warn nor fail since it will break many existing codes which intensively override signatures using "include <module type>". |
|
(0005525) montagu (reporter) 2010-05-28 11:09 |
I suggest this warning should be configurable by a command-line flag and switched off by default. |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2010-05-27 16:54 | montagu | New Issue | |
| 2010-05-27 16:55 | montagu | Note Added: 0005521 | |
| 2010-05-27 17:01 | xclerc | Relationship added | related to 0004487 |
| 2010-05-28 05:33 | garrigue | Note Added: 0005522 | |
| 2010-05-28 09:48 | Julien Signoles | Note Added: 0005524 | |
| 2010-05-28 11:09 | montagu | Note Added: 0005525 | |
| 2010-05-28 17:22 | frisch | Relationship added | related to 0004974 |
| 2011-06-01 22:54 | doligez | Relationship added | related to 0005037 |
| 2011-06-01 22:55 | doligez | Severity | minor => feature |
| 2011-06-01 22:55 | doligez | Status | new => acknowledged |
| Copyright © 2000 - 2011 MantisBT Group |