| Anonymous | Login | Signup for a new account | 2013-05-25 23: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 | ||||||
| 0004765 | OCaml | OCaml general | public | 2009-04-06 15:47 | 2012-08-02 08:58 | ||||||
| Reporter | till | ||||||||||
| Assigned To | |||||||||||
| Priority | normal | Severity | feature | Reproducibility | always | ||||||
| Status | acknowledged | Resolution | open | ||||||||
| Platform | OS | OS Version | |||||||||
| Product Version | 3.11.0 | ||||||||||
| Target Version | 4.01.0+dev | Fixed in Version | |||||||||
| Summary | 0004765: Structural equality should treat exception specifically | ||||||||||
| Description | let e = Not_found let eq = function Not_found -> true | _ -> false exception Not_found let _ = e = Not_found (* True *) let _ = eq Not_found (* False *) | ||||||||||
| Additional Information | IMHO The pattern matching behaviour seems to be the correct one. I guess the fix would be to change the equality function to handle exceptions specifically (i.e. do pointer equality on the first field). This might require adding a new tag number for exceptions to be able to tell them apart at run time. | ||||||||||
| Tags | No tags attached. | ||||||||||
| Attached Files | |||||||||||
Notes |
|
|
(0007864) xleroy (administrator) 2012-08-02 08:58 |
As the reporter says, significant changes in the representation of exceptions are required to address this issue: either reserve a new tag for by-address comparison, or use Object-tagged blocks for exceptions. Postponing to the next major release (optimistically). |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2009-04-06 15:47 | till | New Issue | |
| 2009-04-29 15:52 | doligez | Status | new => acknowledged |
| 2012-07-11 14:55 | doligez | Target Version | => 4.01.0+dev |
| 2012-07-31 13:36 | doligez | Target Version | 4.01.0+dev => 4.00.1+dev |
| 2012-08-02 08:58 | xleroy | Note Added: 0007864 | |
| 2012-08-02 08:58 | xleroy | Severity | minor => feature |
| 2012-08-02 08:58 | xleroy | Target Version | 4.00.1+dev => 4.01.0+dev |
| Copyright © 2000 - 2011 MantisBT Group |