| Anonymous | Login | Signup for a new account | 2013-06-18 23:57 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 | |||||||
| 0004531 | OCaml | OCaml general | public | 2008-04-09 13:44 | 2012-01-25 15:01 | |||||||
| Reporter | fpessaux | |||||||||||
| Assigned To | ||||||||||||
| Priority | normal | Severity | major | Reproducibility | always | |||||||
| Status | resolved | Resolution | suspended | |||||||||
| Platform | OS | OS Version | ||||||||||
| Product Version | 3.10.1 | |||||||||||
| Target Version | Fixed in Version | |||||||||||
| Summary | 0004531: Redefinition of exceptions, matching and equality are odd | |||||||||||
| Description | I know, it' evil to re-define things, but... ;) exception Foo of int ;; let x = Foo 0 ;; exception Foo of bool ;; let y = Foo false ;; x = y ;; -----> <true>. Pretty strange since arguments do not have the same type. x == y ;; -----> <false>. Right, mostly satisfactory. match x with | Foo a -> false | whatever -> whatever = x && whatever = y ;; Result is <true>. This means that it appears that the match "knew" that x was defined using the now "masked" constructor Foo, hence do not take the first case. However, the second case when taken, reveals that x is not "matchingly" equal to an (certain) Foo but is equal to ... both. Where am I wrong ? | |||||||||||
| Tags | No tags attached. | |||||||||||
| Attached Files | ||||||||||||
Relationships |
||||||
|
||||||
Notes |
|
|
(0004490) frisch (developer) 2008-04-09 17:01 |
Cf the discussion after bug 0001248. |
|
(0006795) doligez (manager) 2012-01-25 15:01 |
See PR#1248 for the status of this problem. |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2008-04-09 13:44 | fpessaux | New Issue | |
| 2008-04-09 17:01 | frisch | Note Added: 0004490 | |
| 2008-04-10 14:51 | doligez | Relationship added | related to 0001248 |
| 2008-04-10 14:51 | doligez | Status | new => acknowledged |
| 2012-01-25 15:01 | doligez | Relationship replaced | duplicate of 0001248 |
| 2012-01-25 15:01 | doligez | Note Added: 0006795 | |
| 2012-01-25 15:01 | doligez | Status | acknowledged => resolved |
| 2012-01-25 15:01 | doligez | Resolution | open => suspended |
| Copyright © 2000 - 2011 MantisBT Group |