mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
don't try to complete anonymous outer class method references (IDEA-CR-13773)
This commit is contained in:
+2
@@ -226,6 +226,8 @@ public class FunctionalExpressionCompletionProvider extends CompletionProvider<C
|
||||
|
||||
boolean first = true;
|
||||
for (PsiClass psiClass : instanceClasses) {
|
||||
if (!first && psiClass.getName() == null) continue;
|
||||
|
||||
for (PsiMethod psiMethod : psiClass.getMethods()) {
|
||||
if (!psiMethod.hasModifierProperty(PsiModifier.STATIC) &&
|
||||
hasAppropriateReturnType(expectedReturnType, psiMethod) &&
|
||||
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
class Outer {
|
||||
void foo2(int a){
|
||||
new Object() {
|
||||
void run(int a) {
|
||||
class Inner {
|
||||
void bar() {
|
||||
Runnable r = fo<caret>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void foo() {}
|
||||
};
|
||||
}
|
||||
}
|
||||
+1
@@ -147,6 +147,7 @@ public class SmartType18CompletionTest extends LightFixtureCompletionTestCase {
|
||||
public void testStaticMethodReference() { doTest(false); }
|
||||
|
||||
public void testOuterMethodReference() { doTest(true); }
|
||||
public void testNoAnonymousOuterMethodReference() { doAntiTest(); }
|
||||
|
||||
public void testMethodReferenceOnAncestor() { doTest(true); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user