mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 15:27:45 +07:00
StreamApiMigration: disallow reassigning counting loop variable
This commit is contained in:
+14
@@ -0,0 +1,14 @@
|
||||
// "Replace with collect" "false"
|
||||
|
||||
public class Test {
|
||||
public void test(int n) {
|
||||
for(int <caret>i=0; i<n; i++) {
|
||||
i = i * 2;
|
||||
System.out.println(i);
|
||||
}
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
new Test().test(20);
|
||||
}
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
// "Replace with collect" "false"
|
||||
|
||||
public class Test {
|
||||
public void test(int n) {
|
||||
for(int <caret>i=0; i<n; i++) {
|
||||
for(int j=0; j<i; j++) {
|
||||
j = j * 2;
|
||||
System.out.println(j);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
new Test().test(20);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user