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: 4004 Reporter: mattiasw Assigned to:@maranget Status: closed (set by @maranget on 2006-09-21T14:37:13Z) Resolution: fixed Priority: normal Severity: text Version: 3.08.4 Category: ~DO NOT USE (was: OCaml general)
Bug description
I would assume the following two functions are equivalent. However, I get a warning "Warning: this pattern is unused." for the first for the row with (1|2).
let f str =
match str with
| "dec2bin", 1 -> ()
| "dec2bin", (1|2) -> ()
| _ -> ()
;;
let f2 str =
match str with
| "dec2bin", 1 -> ()
| "dec2bin", 2 -> ()
| _ -> ()
;;
The text was updated successfully, but these errors were encountered:
After looking into this, I think that the only thing that is needed to improve the error message. When I got the message "Warning: this pattern is unused." I though the whole line was ignored. However, this isn't the case, so maybe something like ""Warning: this SUBpattern is unused." would be enough.
Original bug ID: 4004
Reporter: mattiasw
Assigned to: @maranget
Status: closed (set by @maranget on 2006-09-21T14:37:13Z)
Resolution: fixed
Priority: normal
Severity: text
Version: 3.08.4
Category: ~DO NOT USE (was: OCaml general)
Bug description
I would assume the following two functions are equivalent. However, I get a warning "Warning: this pattern is unused." for the first for the row with (1|2).
let f str =
match str with
| "dec2bin", 1 -> ()
| "dec2bin", (1|2) -> ()
| _ -> ()
;;
let f2 str =
match str with
| "dec2bin", 1 -> ()
| "dec2bin", 2 -> ()
| _ -> ()
;;
The text was updated successfully, but these errors were encountered: