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: 7504 Reporter:@johnwhitington Assigned to:@Octachron Status: resolved (set by @gasche on 2017-03-14T23:16:34Z) Resolution: fixed Priority: normal Severity: tweak Version: 4.04.0 Target version: 4.05.0 +dev/beta1/beta2/beta3/rc1 Fixed in version: 4.05.0 +dev/beta1/beta2/beta3/rc1 Category: language features Related to:#7169
Bug description
Consider:
type t =
{a : int;
b : string}
let f x y =
match x with {a = c}, 0 -> 0
Which gives:
Warning 8: this pattern-matching is not exhaustive.
Here is an example of a case that is not matched:
({}, 1)
{} isn't legal pattern match syntax. Shouldn't it read "(_, 1)"?
The text was updated successfully, but these errors were encountered:
I have memories of working on a very similar issue in the recent months -- maybe of having already changed the formulation in 4.05+dev. (Is this just jetlag?)
Yes, exactly, thanks. We should have noticed the current issue if we had been more careful thinking about the corner cases of the last patch.
(I think one could argue that "{ _ }" should be accepted by the language when no field is matched upon, and that using it there could make the code more regular, but your patch is just fine.)
Original bug ID: 7504
Reporter: @johnwhitington
Assigned to: @Octachron
Status: resolved (set by @gasche on 2017-03-14T23:16:34Z)
Resolution: fixed
Priority: normal
Severity: tweak
Version: 4.04.0
Target version: 4.05.0 +dev/beta1/beta2/beta3/rc1
Fixed in version: 4.05.0 +dev/beta1/beta2/beta3/rc1
Category: language features
Related to: #7169
Bug description
Consider:
type t =
{a : int;
b : string}
let f x y =
match x with {a = c}, 0 -> 0
Which gives:
Warning 8: this pattern-matching is not exhaustive.
Here is an example of a case that is not matched:
({}, 1)
{} isn't legal pattern match syntax. Shouldn't it read "(_, 1)"?
The text was updated successfully, but these errors were encountered: