mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
introduce variable: distinguish lambda parameters but allow param free expressions (IDEA-163785)
This commit is contained in:
+15
@@ -0,0 +1,15 @@
|
||||
import java.util.function.UnaryOperator;
|
||||
|
||||
class Main {
|
||||
public static void main(String[] args) {
|
||||
UnaryOperator<String> f1 = s -> {
|
||||
System.out.println("foo");
|
||||
String temp = s.trim();
|
||||
return temp;
|
||||
};
|
||||
UnaryOperator<String> f2 = s -> {
|
||||
System.out.println("foo");
|
||||
return s.trim();
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
import java.util.function.UnaryOperator;
|
||||
|
||||
class Main {
|
||||
public static void main(String[] args) {
|
||||
UnaryOperator<String> f1 = s -> {
|
||||
System.out.println("foo");
|
||||
return <selection>s.trim()</selection>;
|
||||
};
|
||||
UnaryOperator<String> f2 = s -> {
|
||||
System.out.println("foo");
|
||||
return s.trim();
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user