mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
static in interfaces before 1.8 (IDEA-123252)
This commit is contained in:
+2
-1
@@ -760,7 +760,8 @@ public class HighlightVisitorImpl extends JavaElementVisitor implements Highligh
|
||||
if (!myHolder.hasErrorResults() && method.isConstructor()) {
|
||||
myHolder.add(HighlightClassUtil.checkThingNotAllowedInInterface(method, aClass));
|
||||
}
|
||||
if (!myHolder.hasErrorResults() && method.hasModifierProperty(PsiModifier.DEFAULT)) {
|
||||
if (!myHolder.hasErrorResults() && (method.hasModifierProperty(PsiModifier.DEFAULT) ||
|
||||
aClass != null && aClass.isInterface() && method.hasModifierProperty(PsiModifier.STATIC))) {
|
||||
myHolder.add(HighlightUtil.checkExtensionMethodsFeature(method, myLanguageLevel, myFile));
|
||||
}
|
||||
|
||||
|
||||
+1
@@ -45,5 +45,6 @@ class UnsupportedFeatures {
|
||||
|
||||
interface I {
|
||||
<error descr="Extension methods are not supported at this language level">default void m() { }</error>
|
||||
<error descr="Extension methods are not supported at this language level">static void m() { }</error>
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user