mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-07 05:09:37 +07:00
new inference: testdata
(cherry picked from commit 6f0f160f905ae275a2eeaca58343a176df1a42c8)
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import java.util.List;
|
||||
class Test {
|
||||
|
||||
interface I<T> {
|
||||
T foo();
|
||||
}
|
||||
|
||||
static class Foo<X> {
|
||||
static <T> Foo<T> foo() { return null; }
|
||||
}
|
||||
|
||||
<T, S extends Foo<T>> List<T> meth(I<S> p) { return null; }
|
||||
|
||||
void test() {
|
||||
List<?> l1 = meth(Foo::new);
|
||||
List<?> l2 = meth(Foo::foo);
|
||||
List<String> l3 = meth(Foo::new);
|
||||
List<String> l4 = meth(Foo::foo);
|
||||
}
|
||||
}
|
||||
@@ -112,6 +112,10 @@ public class NewMethodRefHighlightingTest extends LightDaemonAnalyzerTestCase {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testAfterBounds() throws Exception {
|
||||
doTest();
|
||||
}
|
||||
|
||||
private void doTest() {
|
||||
doTest(false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user