Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004765OCamlOCaml generalpublic2009-04-06 15:472012-08-02 08:58
Reportertill 
Assigned To 
PrioritynormalSeverityfeatureReproducibilityalways
StatusacknowledgedResolutionopen 
PlatformOSOS Version
Product Version3.11.0 
Target Version4.01.0+devFixed in Version 
Summary0004765: Structural equality should treat exception specifically
Descriptionlet e = Not_found
let eq = function Not_found -> true | _ -> false
exception Not_found
let _ = e = Not_found (* True *)
let _ = eq Not_found (* False *)
Additional InformationIMHO 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.
TagsNo tags attached.
Attached Files

- Relationships

-  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
Powered by Mantis Bugtracker