Files
Tagir Valeev a0a8ed752b [java-intentions] Suggest 'replace with null-check' fix if pattern variable is present but unused
Fixes IDEA-265543 Pattern type is the same as expression type error missing fix

GitOrigin-RevId: a971caf5480cd29e50cfc271ae76891fbc750d6b
2021-04-01 05:52:42 +00:00

9 lines
198 B
Java

// "Replace with a null check" "false"
class Test {
void test(String s) {
Object object = s;
if(object instanceof <caret>String s1) {
System.out.println("always: " + s1);
}
}
}