new inference: testdata

(cherry picked from commit 6f0f160f905ae275a2eeaca58343a176df1a42c8)
This commit is contained in:
anna
2013-11-21 13:03:05 +01:00
parent a6e99dd587
commit 693eddf5d8
2 changed files with 24 additions and 0 deletions

View File

@@ -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);
}
}

View File

@@ -112,6 +112,10 @@ public class NewMethodRefHighlightingTest extends LightDaemonAnalyzerTestCase {
doTest();
}
public void testAfterBounds() throws Exception {
doTest();
}
private void doTest() {
doTest(false);
}