Skip to content

Fasta accepts conflicting interface type arguments when contravariant #34574

Closed
@askeksa-google

Description

@askeksa-google
class I<T> {}

class A {}

class B extends A {}

class X implements I<B> {}

class Y extends X implements I<A> {}

Is invalid, since Y implements two different generic instantiations of I. But Fasta does not report an error. If A and B are swapped, an error is correctly reported.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions