-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Warning 8 suppresses warning 25 #7059
Copy link
Copy link
Closed
Description
Original bug ID: 7059
Reporter: @johnwhitington
Assigned to: @alainfrisch
Status: closed (set by @xavierleroy on 2017-02-16T14:18:17Z)
Resolution: fixed
Priority: normal
Severity: minor
Target version: 4.03.0+dev / +beta1
Fixed in version: 4.03.0+dev / +beta1
Category: ~DO NOT USE (was: OCaml general)
Duplicate of: #6438
Monitored by: @gasche @hcarty
Bug description
match 1 with 1 when x = y -> 1;;
Warning 25: bad style, all clauses in this pattern-matching are guarded.
- : int = 1
match 1 with 1 -> 1;;
Warning 8: this pattern-matching is not exhaustive.
Here is an example of a value that is not matched:
0
Shouldn't warning 8 be triggered in the first case in addition to warning 25 -- it's more important, isn't it?
Reactions are currently unavailable