mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-10 18:09:38 +07:00
fix assertion with code block lambda
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
// "Replace with lambda" "true"
|
||||
class A {
|
||||
{
|
||||
bar(() -> foo());
|
||||
}
|
||||
|
||||
private <T> void bar(ThrowableComputable<T, Exception> throwableComputable) {}
|
||||
|
||||
private <K> K foo() throws Exception {
|
||||
return null;
|
||||
}
|
||||
|
||||
interface ThrowableComputable<T, T1 extends Throwable> {
|
||||
T compute() throws T1;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
// "Replace with lambda" "true"
|
||||
class A {
|
||||
{
|
||||
bar(new Throwabl<caret>eComputable<String, Exception>() {
|
||||
@Override
|
||||
public String compute() throws Exception {
|
||||
return foo();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private <T> void bar(ThrowableComputable<T, Exception> throwableComputable) {}
|
||||
|
||||
private <K> K foo() throws Exception {
|
||||
return null;
|
||||
}
|
||||
|
||||
interface ThrowableComputable<T, T1 extends Throwable> {
|
||||
T compute() throws T1;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user