mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-13 09:19:13 +07:00
IDEA-72851
This commit is contained in:
+5
@@ -229,6 +229,11 @@ public class PsiReferenceExpressionImpl extends ExpressionPsiElement implements
|
||||
? CandidateInfo.RESOLVE_RESULT_FOR_PACKAGE_PREFIX_PACKAGE
|
||||
: JavaResolveResult.EMPTY_ARRAY;
|
||||
}
|
||||
// check that all qualifiers must resolve to package parts, to prevent local vars shadowing corresponding package case
|
||||
PsiExpression qualifier = getQualifierExpression();
|
||||
if (qualifier instanceof PsiReferenceExpression && !(((PsiReferenceExpression)qualifier).resolve() instanceof PsiPackage)) {
|
||||
return JavaResolveResult.EMPTY_ARRAY;
|
||||
}
|
||||
return new JavaResolveResult[]{new CandidateInfo(aPackage, PsiSubstitutor.EMPTY)};
|
||||
}
|
||||
|
||||
|
||||
+15
-8
@@ -1,14 +1,21 @@
|
||||
class E {
|
||||
class Outer {
|
||||
class Outer {
|
||||
class S {
|
||||
public static final int SS = 0;
|
||||
}
|
||||
public static final int SS = 0;
|
||||
}
|
||||
}
|
||||
|
||||
Outer f() {
|
||||
int s = <error descr="Expected class or package">f()</error>.S.SS;
|
||||
int s1 = <error descr="Expected class or package">this</error>.Outer.S.SS;
|
||||
int s2 = Outer.S.SS;
|
||||
return null;
|
||||
Outer f() {
|
||||
int s = <error descr="Expected class or package">f()</error>.S.SS;
|
||||
int s1 = <error descr="Expected class or package">this</error>.Outer.S.SS;
|
||||
int s2 = Outer.S.SS;
|
||||
return null;
|
||||
}
|
||||
|
||||
class opopo {
|
||||
public void main(String[] args) {
|
||||
String java = "bla";
|
||||
java.<error descr="Cannot resolve symbol 'lang'">lang</error>.String.valueOf("");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user