Segfault from bug in GADT/module typing #6992
Original bug ID: 6992
The following program is incorrectly accepted by OCaml 4.02.3 and causes a segfault:
type (_, _) eq = Eq : ('a, 'a) eq
module Fix (F : sig type 'a f end) = struct
module FixId = Fix (struct type 'a f = 'a end)
The module type of "Fix" states than an arbitrary type constructor has at most one fixpoint, and "bad" uses this to conclude that string and int, both being fixpoints of the identity type constructor, must therefore be equal.
Incidentally, 4.02.1 with -rectypes correctly rejects this program. 4.02.1 without -rectypes, and 4.02.2/3 with or without -rectypes all accept this program and segfault.