Files
openide/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newLambda/IncludeConstraintsWhenParentMethodIsDuringCalculation.java
anna fc58e5e0af new inference: include lifting constraint when parent call is being investigated
(cherry picked from commit aaeafcdce1c8d49512cc1fece17afb3e1705492e)
2013-11-25 16:48:11 +01:00

15 lines
475 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="Type parameter 'java.lang.String' is not within its bound; should extend 'java.lang.Number'"></error>>());
SuperFoo<Integer> li = foo(() -> new Foo<>());
SuperFoo<?> lw = foo(() -> new Foo<>());
}