IDEA-67859

This commit is contained in:
anna
2013-01-07 17:50:47 +01:00
parent 286995282d
commit 542009391b
3 changed files with 11 additions and 1 deletions

View File

@@ -95,7 +95,7 @@ public final class PsiUtil extends PsiUtilCore {
@NotNull
public static JavaResolveResult getAccessObjectClass(@NotNull PsiExpression expression) {
if (expression instanceof PsiSuperExpression || expression instanceof PsiThisExpression) return JavaResolveResult.EMPTY;
if (expression instanceof PsiSuperExpression) return JavaResolveResult.EMPTY;
PsiType type = expression.getType();
if (type instanceof PsiClassType) {
return ((PsiClassType)type).resolveGenerics();

View File

@@ -0,0 +1,9 @@
class Outer {
private void foo() {}
class Inner extends Outer {
{
this.<error descr="'foo()' has private access in 'Outer'">foo</error>();
foo();
}
}
}

View File

@@ -194,6 +194,7 @@ public class GenericsHighlightingTest extends LightDaemonAnalyzerTestCase {
public void testMethodCallParamsOnRawType() { doTest5(false); }
public void testIDEA98421() { doTest5(false); }
public void testErasureTypeParameterBound() { doTest5(false); }
public void testThisAsAccessObject() { doTest5(false); }
public void testJavaUtilCollections_NoVerify() throws Exception {
PsiClass collectionsClass = getJavaFacade().findClass("java.util.Collections", GlobalSearchScope.moduleWithLibrariesScope(getModule()));