Closed eernstg closed 5 years ago
The declaration class B<X> extends A<F<X>> {}
is an error according to this feature specification.
Said feature has been accepted, but is not yet implemented. But it makes no sense to change an implementation to handle a subtype relationship differently, when one of the types involved will be a compile-time error in itself. So I'll close this issue.
Consider the following program:
Note that
B<Object> <: A<F<Object>>
because of theextends
clause, andA<F<Object>> <: A<F<String>>
becauseF<Object> <: F<String>
because the type argument of the type aliasF
occurs contravariantly (and only contravariantly), so the initialization ofa
is actually an upcast. Still, it is rejected: