mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-25 14:25:04 +07:00
new inference: include lifting constraint when parent call is being investigated
(cherry picked from commit aaeafcdce1c8d49512cc1fece17afb3e1705492e)
This commit is contained in:
+15
@@ -0,0 +1,15 @@
|
||||
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<>());
|
||||
}
|
||||
Reference in New Issue
Block a user