Files
openide/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/unwrapIfStatement/beforePatternRetarget2.java
Tagir Valeev ff15d064cd [java-inspections] SimplifyBooleanExpressionFix: try to move pattern variable to another instanceof when possible
Fixes IDEA-336123 "Constant values" fix produces red code when pattern variable is removed

GitOrigin-RevId: 7faf8dd77569c21d69a9a7226d6db1b0097f9231
2023-11-15 21:43:24 +00:00

10 lines
212 B
Java

// "Simplify 'obj instanceof String str' to true" "true"
class Test {
void test(Object obj) {
if (obj instanceof String) {
if (obj instanceof<caret> String str && str.isEmpty()) {
}
}
}
}