Inlining action: show conflict if replacement variable changes before last read of original variable (IDEA-204546)

This commit is contained in:
Artemiy Sartakov
2019-01-14 15:37:30 +07:00
parent a0477eb7c7
commit d84df5cee5
8 changed files with 112 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
public class AssignmentAndReassignmentInLoop {
public void test() {
for(int i = 0; i < 3; i++) {
String replacement = "foo";
String <caret>original = replacement;
replacement = "bar";
System.out.println(original);
}
}
}