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: 242 Reporter: administrator Status: closed Resolution: fixed Priority: normal Severity: minor Category: ~DO NOT USE (was: OCaml general)
Bug description
Hello,
It seems that inexhaustive matches with polymorphic variants are not
correctly reported:
The following piece of code
let green = List.hd [ red; `green ] ;;
gives this incorrect warning message:
Warning: this pattern-matching is not exhaustive.
Here is an example of a value that is not matched:
(green|red)
But this example
type colour = Red | Green ;;
let Green = List.hd [ Red; Green ] ;;
gives a correct warning message:
Warning: this pattern-matching is not exhaustive.
Here is an example of a value that is not matched:
Red
Original bug ID: 242
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)
Bug description
Hello,
It seems that inexhaustive matches with polymorphic variants are not
correctly reported:
The following piece of code
let
green = List.hd [
red; `green ] ;;gives this incorrect warning message:
Warning: this pattern-matching is not exhaustive.
Here is an example of a value that is not matched:
(
green|
red)But this example
type colour = Red | Green ;;
let Green = List.hd [ Red; Green ] ;;
gives a correct warning message:
Warning: this pattern-matching is not exhaustive.
Here is an example of a value that is not matched:
Red
--
Markus Mottl, mottl@miss.wu-wien.ac.at, http://miss.wu-wien.ac.at/~mottl
The text was updated successfully, but these errors were encountered: