mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 00:11:26 +07:00
don't open capture if reference expression is returned from lambda expression (IDEA-139089)
This commit is contained in:
+14
@@ -0,0 +1,14 @@
|
||||
import java.util.function.Function;
|
||||
|
||||
interface I<T>{
|
||||
void foo(Function<T, T> f);
|
||||
}
|
||||
|
||||
class C {
|
||||
void bar(I<?> x) {
|
||||
x.foo(a -> {
|
||||
x.foo(y -> <error descr="Bad return type in lambda expression: capture of ? cannot be converted to capture of ?">a</error>);
|
||||
return a;
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user