mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
Java: Quick fix for missing 'return' in lambda body (IDEA-169551)
This commit is contained in:
+14
@@ -0,0 +1,14 @@
|
||||
// "Add 'return' statement" "true"
|
||||
class C {
|
||||
void foo() {
|
||||
bar(() -> {
|
||||
return 0;
|
||||
});
|
||||
}
|
||||
|
||||
void bar(I i) {}
|
||||
|
||||
interface I {
|
||||
int f();
|
||||
}
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
// "Add 'return' statement" "true"
|
||||
class C {
|
||||
void foo() {
|
||||
bar(() -> {
|
||||
return 1;
|
||||
});
|
||||
}
|
||||
|
||||
void bar(I i) {}
|
||||
|
||||
interface I {
|
||||
int f();
|
||||
}
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
// "Add 'return' statement" "true"
|
||||
class C {
|
||||
void foo() {
|
||||
bar(() -> {
|
||||
return Math.max(1, 2);
|
||||
});
|
||||
}
|
||||
|
||||
void bar(I i) {}
|
||||
|
||||
interface I {
|
||||
int f();
|
||||
}
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
// "Add 'return' statement" "true"
|
||||
class C {
|
||||
void foo() {
|
||||
bar(() -> {
|
||||
return Math.max(1, 2);
|
||||
});
|
||||
}
|
||||
|
||||
void bar(I i) {}
|
||||
|
||||
interface I {
|
||||
int f();
|
||||
}
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
// "Add 'return' statement" "true"
|
||||
class C {
|
||||
void foo() {
|
||||
bar(() -> {
|
||||
return Math.max(1, 2); //comment
|
||||
});
|
||||
}
|
||||
|
||||
void bar(I i) {}
|
||||
|
||||
interface I {
|
||||
int f();
|
||||
}
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
// "Add 'return' statement" "true"
|
||||
class C {
|
||||
void foo() {
|
||||
bar(() -> {
|
||||
return Math.max(1,/*comment*/ 2);
|
||||
});
|
||||
}
|
||||
|
||||
void bar(I i) {}
|
||||
|
||||
interface I {
|
||||
int f();
|
||||
}
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
// "Add 'return' statement" "true"
|
||||
class C {
|
||||
void foo() {
|
||||
bar(() -> {
|
||||
<caret>});
|
||||
}
|
||||
|
||||
void bar(I i) {}
|
||||
|
||||
interface I {
|
||||
int f();
|
||||
}
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
// "Add 'return' statement" "true"
|
||||
class C {
|
||||
void foo() {
|
||||
bar(() -> {
|
||||
1
|
||||
<caret>});
|
||||
}
|
||||
|
||||
void bar(I i) {}
|
||||
|
||||
interface I {
|
||||
int f();
|
||||
}
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
// "Add 'return' statement" "true"
|
||||
class C {
|
||||
void foo() {
|
||||
bar(() -> {
|
||||
Math.max(1, 2)
|
||||
<caret>});
|
||||
}
|
||||
|
||||
void bar(I i) {}
|
||||
|
||||
interface I {
|
||||
int f();
|
||||
}
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
// "Add 'return' statement" "true"
|
||||
class C {
|
||||
void foo() {
|
||||
bar(() -> {
|
||||
Math.max(1, 2);
|
||||
<caret>});
|
||||
}
|
||||
|
||||
void bar(I i) {}
|
||||
|
||||
interface I {
|
||||
int f();
|
||||
}
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
// "Add 'return' statement" "true"
|
||||
class C {
|
||||
void foo() {
|
||||
bar(() -> {
|
||||
Math.max(1, 2) //comment
|
||||
<caret>});
|
||||
}
|
||||
|
||||
void bar(I i) {}
|
||||
|
||||
interface I {
|
||||
int f();
|
||||
}
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
// "Add 'return' statement" "true"
|
||||
class C {
|
||||
void foo() {
|
||||
bar(() -> {
|
||||
Math.max(1,/*comment*/ 2);
|
||||
<caret>});
|
||||
}
|
||||
|
||||
void bar(I i) {}
|
||||
|
||||
interface I {
|
||||
int f();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user