allow override in interfaces (IDEA-109506)

This commit is contained in:
Anna Kozlova
2013-06-25 16:00:50 +04:00
parent 57ed7c65d0
commit 6c3d6d2caa
4 changed files with 19 additions and 1 deletions

View File

@@ -30,7 +30,7 @@ public class OverrideImplementExploreUtil {
@NotNull
public static Collection<MethodSignature> getMethodSignaturesToOverride(@NotNull PsiClass aClass) {
if (aClass.isInterface()) return Collections.emptySet();
if (aClass.isAnnotationType()) return Collections.emptySet();
return getMapToOverrideImplement(aClass, false).keySet();
}

View File

@@ -0,0 +1,8 @@
interface A {
void foo();
}
interface B extends A {
@Override
void foo();
}

View File

@@ -0,0 +1,7 @@
interface A {
void foo();
}
interface B extends A {
<caret>
}

View File

@@ -71,6 +71,9 @@ public class OverrideImplementTest extends LightCodeInsightTestCase {
public void testOverrideExtensionMethods() { doTest8(false, false); }
public void testDoNotImplementExtensionMethods() { doTest8(false, true); }
public void testOverrideInInterface() { doTest8(false, false); }
public void testLongFinalParameterList() {
CodeStyleSettings codeStyleSettings = CodeStyleSettingsManager.getSettings(getProject()).clone();
try {