Confusing error message at object type definition #5224
Original bug ID: 5224
type 'x t = < f : 'y. 'y t >
gives me an error. I do not understand why this is rejected, but the reason is not the issue. The problem is the error message:
Error: In the definition of t, type 'a t should be 'b t
This should be printed as type 'y t should be 'x t .
The text was updated successfully, but these errors were encountered:
Comment author: @protz
This is rejected because this type is non-regular, i.e. it is a parameterized structural type where which is instanciated with a different type parameter.
This is also the reason why the code snippet below is rejected:
type 'a foo = [