Files
openide/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/unwrapIfStatement/beforeUnreachableElse.java
Tagir Valeev c78e018f81 DFA: ignore boolean fields initializer if it's true or false literal
Often it's used as a knob to switch program behavior, so it's reasonable to analyze both alternatives
2017-12-29 18:35:29 +07:00

8 lines
160 B
Java

// "Unwrap 'if' statement" "true"
class X {
String m() {
boolean field = true;
if (fiel<caret>d) return "one";
return "two";
}
}