mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
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:
+24
@@ -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 {}
|
||||
Reference in New Issue
Block a user