mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-13 21:55:01 +07:00
DeleteSideEffectsAwareFix: do not remove message for non-expression-statement
The fix is still useful if invoked for if condition/switch expression/etc. Fixes IDEA-180372.
This commit is contained in:
+11
@@ -0,0 +1,11 @@
|
||||
// "Extract side effect" "true"
|
||||
class Test {
|
||||
void test(int x) {
|
||||
foo(x, 2);
|
||||
}
|
||||
|
||||
boolean foo(int x, int y) {
|
||||
System.out.println(x);
|
||||
return x > y;
|
||||
}
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
// "Extract side effect" "true"
|
||||
class Test {
|
||||
void test(int x) {
|
||||
i<caret>f(foo(x, 2)) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
boolean foo(int x, int y) {
|
||||
System.out.println(x);
|
||||
return x > y;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user