mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
inline: expand expression lambda to code block for return-inline (IDEA-180888)
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
|
||||
import java.util.Comparator;
|
||||
|
||||
class InlineLambda {
|
||||
private static int compare(Integer i, Integer j) {
|
||||
if (i > j) {
|
||||
return 1;
|
||||
}
|
||||
if (j > i) {
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
private static Comparator<Integer> COMP = (o1, o2) -> com<caret>pare(o1, o2);
|
||||
}
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
|
||||
import java.util.Comparator;
|
||||
|
||||
class InlineLambda {
|
||||
private static int compare(Integer i, Integer j) {
|
||||
if (i > j) {
|
||||
return 1;
|
||||
}
|
||||
if (j > i) {
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
private static Comparator<Integer> COMP = (o1, o2) -> {
|
||||
if (o1 > o2) {
|
||||
return 1;
|
||||
}
|
||||
if (o2 > o1) {
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user