Skip to content

Non-compatibility assumed between concrete types with same constructor #5997

@vicuna

Description

@vicuna

Original bug ID: 5997
Reporter: @gasche
Assigned to: @garrigue
Status: closed (set by @xavierleroy on 2015-12-11T18:18:38Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 4.01.0+dev
Fixed in version: 4.00.2+dev
Category: typing
Related to: #5989
Child of: #5998

Bug description

type (_, _) comp =
| Eq : ('a, 'a) comp
| Diff : ('a, 'b) comp

module U = struct type t = T end

module M : sig
type t = T
val comp : (U.t, t) comp
end = struct
include U
let comp = Eq
end

match M.comp with | Diff -> false;;

  • : bool = false

I checked this example against both the trunk (in particular after the recent "incompatibility check" fixes) and the non-vanishing branch.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions