mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-30 18:28:55 +07:00
[java-inspections] ReplaceWithConstantValueFix: suggest to extract side effects when applicable
Fixes IDEA-323618 Side-effect ignored by code assist GitOrigin-RevId: 6206743a4af64948f95d722708e42caf05dda2f3
This commit is contained in:
committed by
intellij-monorepo-bot
parent
37ac327415
commit
cf2584bfdd
@@ -0,0 +1,12 @@
|
||||
// "Replace with '0'" "true-preview"
|
||||
import java.util.stream.*;
|
||||
|
||||
class Test {
|
||||
public static void method() {
|
||||
int a = 1;
|
||||
int b = 0;
|
||||
|
||||
b = a;
|
||||
a = 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
// "Replace with '0'" "true-preview"
|
||||
import java.util.stream.*;
|
||||
|
||||
class Test {
|
||||
public static void method() {
|
||||
int a = 1;
|
||||
int b = 0;
|
||||
|
||||
a = (a + b)<caret> - (b = a);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user