mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-10 18:09:38 +07:00
IDEA-179557 Merge nested if's removes comment
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
// "Merge nested 'if's" "true"
|
||||
|
||||
class Test {
|
||||
// IDEA-179557
|
||||
public static void main(String[] args) {
|
||||
long abc = 0;
|
||||
do {
|
||||
// comment
|
||||
if (abc++ == 71 && abc++ >= 999) {
|
||||
System.out.println(88);
|
||||
if (abc++ < 23) {
|
||||
System.err.println("Log nonsense");
|
||||
}
|
||||
}
|
||||
} while( abc++ < 7 );
|
||||
if ( abc++ < 47 ) {
|
||||
System.out.println(abc);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
// "Merge nested 'if's" "true"
|
||||
|
||||
class Test {
|
||||
public static void main(String[] args) {
|
||||
/*comment1*/
|
||||
// comment3
|
||||
if (args.length > 0 && args[/*comment2*/0].equals("foo")) {
|
||||
System.out.println("oops");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
// "Merge nested 'if's" "true"
|
||||
|
||||
class Test {
|
||||
// IDEA-179557
|
||||
public static void main(String[] args) {
|
||||
long abc = 0;
|
||||
do {
|
||||
i<caret>f ( abc++ == 71 ) {
|
||||
// comment
|
||||
if ( abc++ >= 999 ) {
|
||||
System.out.println(88);
|
||||
if ( abc++ < 23 ) {
|
||||
System.err.println( "Log nonsense" );
|
||||
}
|
||||
}
|
||||
}
|
||||
} while( abc++ < 7 );
|
||||
if ( abc++ < 47 ) {
|
||||
System.out.println(abc);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
// "Merge nested 'if's" "true"
|
||||
|
||||
class Test {
|
||||
public static void main(String[] args) {
|
||||
i<caret>f(args.length > 0/*comment1*/)
|
||||
// comment3
|
||||
if(args[/*comment2*/0].equals("foo")) {
|
||||
System.out.println("oops");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user