Java: Don't fold the whole extracted expression (IDEA-195927)

This commit is contained in:
Pavel Dolgov
2018-07-23 15:40:29 +03:00
parent 3bb763253b
commit c0f7044cd0
7 changed files with 60 additions and 10 deletions
@@ -0,0 +1,19 @@
class C {
int x;
int b(boolean[] b, C[] c, int n) {
int i = n;
while (i >= 0 && (<selection>b[i] || c[n].x == c[i].x</selection>)) {
i--;
}
return i;
}
int a(boolean[] b, C[] c, int n) {
int i = n;
while (i < c.length && (b[i] || c[n].x == c[i].x)) {
i++;
}
return i;
}
}