Original bug ID: 7378
Reporter: @alainfrisch
Assigned to: @garrigue
Status: resolved (set by @garrigue on 2016-09-28T10:42:12Z)
Resolution: fixed
Priority: high
Severity: major
Target version: 4.04.0 +dev / +beta1 / +beta2
Fixed in version: 4.04.0 +dev / +beta1 / +beta2
Category: typing
Child of: #5998
Bug description
module X = struct
type t =
| A : 'a * 'b * ('a -> unit) -> t
end
module Y = struct
type t = X.t =
| A : 'a * 'b * ('b -> unit) -> t
end
let () =
match Y.A (1, "", print_string) with
| X.A (x, y, f) -> f x
The definition for Y.t should be rejected, but it's not, leading to a segfault further down.