mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-30 10:20:15 +07:00
CollapseIntoLoopAction: avoid counting loop for two iterations when step is not +1/-1
GitOrigin-RevId: d8aef85c6d2620a9dd7e9216932388672a049979
This commit is contained in:
committed by
intellij-monorepo-bot
parent
613d4368f1
commit
868aa78cf3
@@ -0,0 +1,8 @@
|
||||
// "Collapse into loop" "true"
|
||||
class X {
|
||||
void test() {
|
||||
for (int i = 12; i <= 22; i += 5) {
|
||||
System.out.println(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// "Collapse into loop" "true"
|
||||
class X {
|
||||
void test() {
|
||||
for (int i : new int[]{12, 17}) {
|
||||
System.out.println(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// "Collapse into loop" "true"
|
||||
class X {
|
||||
void test() {
|
||||
<caret>System.out.println(12);
|
||||
System.out.println(17);
|
||||
System.out.println(22);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// "Collapse into loop" "true"
|
||||
class X {
|
||||
void test() {
|
||||
<caret>System.out.println(12);
|
||||
System.out.println(17);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user