IDEA-173298 Type inference doesn't properly find return type when it is more restricted in interface than abstract class

This commit is contained in:
peter
2017-05-26 14:42:42 +02:00
parent d30a552fcb
commit b15f49ac7a
3 changed files with 40 additions and 5 deletions
@@ -0,0 +1,24 @@
class Test {
public static void main(String[] args) {
MyCar myCar=new MyCar();
myCar.get<caret>
}
}
class MyCar<C extends MyDoor> extends AbstractCar<C> implements Car{ }
abstract class AbstractCar<C extends Door> {
public C get() {}
}
interface Car {
public CarDoor get();
}
interface MyDoor extends CarDoor{}
interface CarDoor extends Door{}
interface Door {}