A quick-fix is suggested to rename the variable.
Example:
class Pointless {
Point p = new Point();
public void test(Object a) {
if (a instanceof Point p) {
System.out.print("a is a point (" + p.x + ", " + p.y + ')');
} else {
System.out.print("p is a point (" + p.x + ", " + p.y + ')');
}
}
}
New in 2022.2