-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
Milestone
Description
Original bug ID: 6220
Reporter: @lpw25
Assigned to: @garrigue
Status: closed (set by @garrigue on 2015-12-04T00:46:13Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 4.01.0
Target version: 4.03.0+dev / +beta1
Fixed in version: 4.03.0+dev / +beta1
Category: typing
Child of: #5998 #6437
Monitored by: @gasche @hcarty
Bug description
It 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.