mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-04 04:09:09 +07:00
15 lines
463 B
Java
15 lines
463 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(() -> <error descr="Bad return type in lambda expression: Foo<X> cannot be converted to SuperFoo<R>">new Foo<>()</error>);
|
|
SuperFoo<Integer> li = foo(() -> new Foo<>());
|
|
SuperFoo<?> lw = foo(() -> new Foo<>());
|
|
} |