mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 03:13:40 +07:00
lambda: void-compatibility check for expression's lambda refined
(cherry picked from commit c59e6beb8c42c48a46550b39725587d3aa8f560a)
This commit is contained in:
+3
@@ -7,6 +7,9 @@ public class Main {
|
||||
String s = "";
|
||||
I<Object> arr1 = <error descr="Incompatible return type String in lambda expression">(t) -> s</error>;
|
||||
I<Object> arr2 = (t) -> s.toString();
|
||||
|
||||
I<Integer> i1 = <error descr="Incompatible return type int in lambda expression">i -> i * 2</error>;
|
||||
I<Integer> i2 = <error descr="Incompatible return type int in lambda expression">i -> 2 * i</error>;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user