Files
openide/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newLambda/IncludeConstraintsWhenParentMethodIsDuringCalculation.java

15 lines
406 B
Java

class Test {
static class SuperFoo<X> {}
static class Foo<X extends Number> extends SuperFoo<X> {}
interface I<Y> {
SuperFoo<Y> m();
}
<R> SuperFoo<R> foo(I<R> ax) { return null; }
SuperFoo<String> ls = foo(() -> new Foo<error descr="Cannot infer arguments"><></error>());
SuperFoo<Integer> li = foo(() -> new Foo<>());
SuperFoo<?> lw = foo(() -> new Foo<>());
}