We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Original bug ID: 7085 Reporter: @nojb Assigned to: @garrigue Status: closed (set by @xavierleroy on 2017-02-16T14:18:13Z) Resolution: fixed Priority: normal Severity: major Target version: 4.03.0+dev / +beta1 Fixed in version: 4.03.0+dev / +beta1 Category: typing
The code (artificial, extracted from a larger code base)
module TypEq = struct type (_, _) t = Eq : ('a, 'a) t end
module type T = sig type _ is_t = Is : ('a, 'b) TypEq.t -> 'a is_t val is_t : unit -> unit is_t option end
module Make (M : T) = struct let _ = match M.is_t () with | None -> 0 | Some _ -> 0 end
gives an (erroneous) warning 56 referring to the Some _ case in the pattern matching:
Warning 56: this match case is unreachable. Consider replacing it with a refutation case ' -> .'
Switching the positions of the None case and the Some _ case makes the warning go away.
The text was updated successfully, but these errors were encountered:
Comment author: @garrigue
The problem has been introduceed by commit 78a7a55. Investigated the cause.
Sorry, something went wrong.
Fixed in trunk at commit e0aec33. Need to copy the type when potentially checking for GADTs. Use the same do_init as for raising levels.
garrigue
No branches or pull requests
Original bug ID: 7085
Reporter: @nojb
Assigned to: @garrigue
Status: closed (set by @xavierleroy on 2017-02-16T14:18:13Z)
Resolution: fixed
Priority: normal
Severity: major
Target version: 4.03.0+dev / +beta1
Fixed in version: 4.03.0+dev / +beta1
Category: typing
Bug description
The code (artificial, extracted from a larger code base)
module TypEq = struct
type (_, _) t = Eq : ('a, 'a) t
end
module type T = sig
type _ is_t = Is : ('a, 'b) TypEq.t -> 'a is_t
val is_t : unit -> unit is_t option
end
module Make (M : T) =
struct
let _ =
match M.is_t () with
| None -> 0
| Some _ -> 0
end
gives an (erroneous) warning 56 referring to the Some _ case in the pattern matching:
Warning 56: this match case is unreachable.
Consider replacing it with a refutation case ' -> .'
Switching the positions of the None case and the Some _ case makes the warning go away.
The text was updated successfully, but these errors were encountered: