Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006220OCamlOCaml typingpublic2013-11-02 17:482013-11-03 12:51
Reporterlpw25 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusnewResolutionopen 
PlatformOSOS Version
Product Version4.01.0 
Target VersionFixed in Version 
Summary0006220: GADT type information is not used to detect unused match cases
DescriptionIt seems that warning 11 ("this match case is unused") does not take account of the type information of GADTs.

For example:

  # type 'a t = I : int t | F : float t;;
  type 'a t = I : int t | F : float t

  # let f : int t -> int = function
      I -> 1;;
    val f : int t -> int = <fun>

  # let f : int t -> int = function
      I -> 1
    | _ -> 2;;
      val f : int t -> int = <fun>

I would have expected the second declaration of `f` to raise warning 11, but it does not.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2013-11-02 17:48 lpw25 New Issue
2013-11-02 17:49 lpw25 Description Updated View Revisions


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker