mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
do not warn about reference to super member before call to super (IDEA-57259)
This commit is contained in:
@@ -2011,7 +2011,7 @@ public class HighlightUtil extends HighlightUtilBase {
|
||||
@Nullable
|
||||
public static HighlightInfo checkImplicitThisReferenceBeforeSuper(@NotNull PsiClass aClass) {
|
||||
if (JavaVersionService.getInstance().isAtLeast(aClass, JavaSdkVersion.JDK_1_7)) return null;
|
||||
if (aClass instanceof PsiAnonymousClass) return null;
|
||||
if (aClass instanceof PsiAnonymousClass || aClass instanceof PsiTypeParameter) return null;
|
||||
PsiClass superClass = aClass.getSuperClass();
|
||||
if (superClass == null || !PsiUtil.isInnerClass(superClass)) return null;
|
||||
PsiClass outerClass = superClass.getContainingClass();
|
||||
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
class A<T extends A.B> {
|
||||
class B extends A<B> {}
|
||||
}
|
||||
|
||||
class C<T> {
|
||||
class D extends C<T> {}
|
||||
<T extends C<String>.D> void foo(){}
|
||||
}
|
||||
@@ -235,6 +235,7 @@ public class GenericsHighlightingTest extends LightDaemonAnalyzerTestCase {
|
||||
public void testIDEA20573() throws Exception { doTest5(false);}
|
||||
public void testIDEA20244() throws Exception { doTest5(false);}
|
||||
public void testIDEA22005() throws Exception { doTest5(false);}
|
||||
public void testIDEA57259() throws Exception { doTest5(false);}
|
||||
public void testInheritedWithDifferentArgsInTypeParams() throws Exception { doTest5(false);}
|
||||
public void testIllegalForwardReferenceInTypeParameterDefinition() throws Exception { doTest5(false);}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user