Files
openide/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/unwrapIfStatement/beforeDoWhileWithSideEffects.java
Tagir Valeev 49f4397ba0 [java-intentions] More preview tests
GitOrigin-RevId: 4d6a5487576dbbc4aca9c89b067eec8218aff686
2022-07-29 17:55:15 +00:00

16 lines
375 B
Java

// "Unwrap 'do-while' statement (may change semantics)" "true-preview"
import org.jetbrains.annotations.Contract;
class X {
@Contract("_ -> true")
boolean test(Object obj) {
return true;
}
void doSmth(Object obj) {
do {
System.out.println("aaahh");
}
while(obj <caret>!= null && test(obj) && obj == null);
}
}