IDEA-91785 (sometimes extension method is abstract)

This commit is contained in:
Roman Shevchenko
2012-09-19 11:41:52 +02:00
parent d988329fa7
commit 6bbeced3f7
2 changed files with 11 additions and 0 deletions
@@ -235,6 +235,12 @@ public class HighlightUtil {
if (modifierList.hasModifierProperty(incompatible)) {
return incompatible;
}
else if (PsiModifier.ABSTRACT.equals(incompatible)) {
final PsiElement owner = modifierList.getParent();
if (owner instanceof PsiMethod && PsiUtil.isExtensionMethod((PsiMethod)owner)) {
return incompatible;
}
}
}
return null;
}
@@ -47,4 +47,9 @@ class C {
class D {
<error descr="Extension methods can only be used within an interface">void m()</error> default { }
}
interface IllegalMods {
<error descr="Illegal combination of modifiers: 'static' and 'abstract'">static</error> void sm1();
<error descr="Illegal combination of modifiers: 'static' and 'abstract'">static</error> void sm2() default { }
}