insert cast/local variable from instanceof: check if written expression equals operand in instanceof before replacement (IDEA-97941)

This commit is contained in:
anna
2012-12-27 22:22:49 +01:00
parent acc6bbe48a
commit 2fe641dad6
4 changed files with 24 additions and 6 deletions
@@ -0,0 +1,9 @@
// "Cast to 'A'" "true"
class A {
void foo(Object foo) {
if(foo instanceof A) {
((A) foo)
System.out.println("");
}
}
}
@@ -0,0 +1,8 @@
// "Cast to 'A'" "true"
class A {
void foo(Object foo) {
if(foo insta<caret>nceof A) {
System.out.println("");
}
}
}