Type equality broken for conjunctive polymorphic variant tags #5927
Original bug ID: 5927
I think that the following behaviour is a bug:
type 'a foo = 'a constraint 'a = [< `Tag of & int];;
Error: Type declarations do not match:
I've attached a patch that seems to fix it.
The text was updated successfully, but these errors were encountered:
Comment author: @garrigue
Actually, the failure in this case is intentional, as this conjunction is clearly impossible.
Comment author: @lpw25
Even if the conjunction is impossible, the type itself is valid and should at least be considered equivalent to itself.
Also, the current error is unclear and only occurs during module inclusion checks. For example:
module type S = sig type 'a foo constraint 'a = [< `Tag of & int ] end;;
Error: Module type declarations do not match: