mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
super expression rules should not apply to this expressions (IDEA-163303)
This commit is contained in:
+1
-1
@@ -1541,7 +1541,7 @@ public class HighlightUtil extends HighlightUtilBase {
|
||||
}
|
||||
}
|
||||
|
||||
if (qualifier != null && aClass.isInterface() && languageLevel.isAtLeast(LanguageLevel.JDK_1_8)) {
|
||||
if (qualifier != null && aClass.isInterface() && expr instanceof PsiSuperExpression && languageLevel.isAtLeast(LanguageLevel.JDK_1_8)) {
|
||||
//15.12.1 for method invocation expressions; 15.13 for method references
|
||||
//If TypeName denotes an interface, I, then let T be the type declaration immediately enclosing the method reference expression.
|
||||
//It is a compile-time error if I is not a direct superinterface of T,
|
||||
|
||||
+16
@@ -65,3 +65,19 @@ class Test {
|
||||
}
|
||||
}
|
||||
|
||||
class InsideThisRxpression {
|
||||
interface Foo {
|
||||
void fooMethod();
|
||||
|
||||
default Bar toBar() {
|
||||
return new Bar() {
|
||||
@Override
|
||||
public void fooMethod() {
|
||||
Foo.this.fooMethod();
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
public interface Bar extends Foo {}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user