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: 6194 Reporter:@mmottl Assigned to:@garrigue Status: closed (set by @xavierleroy on 2015-12-11T18:24:13Z) Resolution: fixed Priority: normal Severity: minor Version: 4.01.0 Fixed in version: 4.01.1+dev Category: ~DO NOT USE (was: OCaml general) Monitored by:@mmottl
Bug description
Lets consider the following code snippet:
module type S = sig val x : bool end
let f = function
| Some (module M : S) when M.x -> ()
| Some _ -> ()
| None -> ()
The compiler will warn that the second match case is unused. This is incorrect, because the first case is guarded. It seems that the warning mistakenly assumes that matching first-class modules in patterns makes them irrefutable even in the presence of guards.
The text was updated successfully, but these errors were encountered:
Original bug ID: 6194
Reporter: @mmottl
Assigned to: @garrigue
Status: closed (set by @xavierleroy on 2015-12-11T18:24:13Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 4.01.0
Fixed in version: 4.01.1+dev
Category: ~DO NOT USE (was: OCaml general)
Monitored by: @mmottl
Bug description
Lets consider the following code snippet:
module type S = sig val x : bool end
let f = function
| Some (module M : S) when M.x -> ()
| Some _ -> ()
| None -> ()
The compiler will warn that the second match case is unused. This is incorrect, because the first case is guarded. It seems that the warning mistakenly assumes that matching first-class modules in patterns makes them irrefutable even in the presence of guards.
The text was updated successfully, but these errors were encountered: