Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000242OCamlOCaml generalpublic2000-12-07 16:512000-12-08 01:58
Reporteradministrator 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000242: Wrong warning in pattern matching
DescriptionHello,

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

--
Markus Mottl, mottl@miss.wu-wien.ac.at, http://miss.wu-wien.ac.at/~mottl [^]

TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0000479)
administrator (administrator)
2000-12-08 01:58

This is already fixed in the CVS (see PR#191).

Thank you for the report.

    Jacques
(0000480)
administrator (administrator)
2000-12-08 01:58

see PR#191

- Issue History
Date Modified Username Field Change
2005-11-18 10:13 administrator New Issue


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker