mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-09 20:42:52 +07:00
new inference: stop at first common supertypes pair during incorporation of upper bounds (IDEA-147393)
This commit is contained in:
+13
@@ -0,0 +1,13 @@
|
||||
interface I<T>{}
|
||||
abstract class A<T> implements I<A<T>>{}
|
||||
class Factory {
|
||||
static <T extends A<?>> T get(Class<T> c){
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
class Impl extends A<Impl> {
|
||||
static Impl get() {
|
||||
return Factory.get(Impl.class);
|
||||
}
|
||||
}
|
||||
+4
@@ -311,6 +311,10 @@ public class GraphInferenceHighlightingTest extends LightDaemonAnalyzerTestCase
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testAcceptFirstPairOfCommonSupertypesDuringUpUpIncorporation() throws Exception {
|
||||
doTest();
|
||||
}
|
||||
|
||||
private void doTest() throws Exception {
|
||||
doTest(false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user