You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 4531 Reporter: fpessaux Status: closed (set by @xavierleroy on 2013-08-31T10:46:09Z) Resolution: suspended Priority: normal Severity: major Version: 3.10.1 Category: ~DO NOT USE (was: OCaml general) Duplicate of:#3441 Monitored by:@glondu
Bug 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 ;;
-----> . Pretty strange since arguments do not have the same type.
x == y ;;
-----> . Right, mostly satisfactory.
match x with
| Foo a -> false
| whatever -> whatever = x && whatever = y
;;
Result is . 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 ?
The text was updated successfully, but these errors were encountered:
Original bug ID: 4531
Reporter: fpessaux
Status: closed (set by @xavierleroy on 2013-08-31T10:46:09Z)
Resolution: suspended
Priority: normal
Severity: major
Version: 3.10.1
Category: ~DO NOT USE (was: OCaml general)
Duplicate of: #3441
Monitored by: @glondu
Bug 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 ;;
-----> . Pretty strange since arguments do not have the same type.
x == y ;;
-----> . Right, mostly satisfactory.
match x with
| Foo a -> false
| whatever -> whatever = x && whatever = y
;;
Result is . 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 ?
The text was updated successfully, but these errors were encountered: