another fix for too eager casting in completion

This commit is contained in:
peter
2012-03-15 17:20:43 +04:00
parent c0dcdcd22c
commit d165428546
4 changed files with 51 additions and 13 deletions
@@ -0,0 +1,18 @@
public class Util2 {
void foo(XmlAttribute o ) {
if (o instanceof XmlAttributeImpl) {
o.getpar<caret>
}
}
}
interface PsiElement {
PsiElement getParent();
}
interface XmlAttribute extends PsiElement {}
class XmlAttributeImpl implements XmlAttribute {
@Override
public PsiElement getParent() {
return null;
}
}
@@ -0,0 +1,18 @@
public class Util2 {
void foo(XmlAttribute o ) {
if (o instanceof XmlAttributeImpl) {
o.getParent()<caret>
}
}
}
interface PsiElement {
PsiElement getParent();
}
interface XmlAttribute extends PsiElement {}
class XmlAttributeImpl implements XmlAttribute {
@Override
public PsiElement getParent() {
return null;
}
}