mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 03:13:40 +07:00
lambda return type inconsistency: highlight all found errors (IDEA-158853)
This commit is contained in:
+15
@@ -0,0 +1,15 @@
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
class Test {
|
||||
public static void bar(boolean f) {
|
||||
foo(() -> {
|
||||
if (f) <error descr="Missing return value">return;</error>
|
||||
if (false) <error descr="Missing return value">return;</error>
|
||||
if (!f) return <error descr="Bad return type in lambda expression: int cannot be converted to String">1</error>;
|
||||
return null;
|
||||
});
|
||||
}
|
||||
|
||||
public static void foo(Supplier<String> consumer) {}
|
||||
}
|
||||
Reference in New Issue
Block a user