Files
Tagir Valeev a8914e5c86 [java-inspections] IDEA-338478 Pattern variable can be used: support more narrow casts
Also, support the same in SimplifyBooleanExpressionFix (IDEA-336123)

GitOrigin-RevId: 240383f6ca67d8b7734ac51a6fe8781538e4f254
2023-11-22 20:31:30 +00:00

8 lines
175 B
Java

// "Simplify 'obj instanceof CharSequence cs' to true" "true"
class X {
void test(Object obj) {
if (obj instanceof String cs) {
if (cs.length() > 0) {}
}
}
}