mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-25 19:29:30 +07:00
side effects in for stmt declaration (IDEA-172700)
transformation should be added before for stmt
This commit is contained in:
+17
@@ -0,0 +1,17 @@
|
||||
// "Remove redundant initializer" "true"
|
||||
class A {
|
||||
void testFor() {
|
||||
if (true) {
|
||||
read();
|
||||
for(int i;; i++) {
|
||||
i = 10;
|
||||
System.out.println("Hello!");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static int read() {
|
||||
System.out.println();
|
||||
return 0;
|
||||
}}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
// "Remove redundant initializer" "true"
|
||||
class A {
|
||||
void testFor() {
|
||||
if (true)
|
||||
for(int i = re<caret>ad();;i++) {
|
||||
i = 10;
|
||||
System.out.println("Hello!");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static int read() {
|
||||
System.out.println();
|
||||
return 0;
|
||||
}}
|
||||
Reference in New Issue
Block a user