mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-166167 Idea should not suggest AbstractClass::new for lambda
This commit is contained in:
+1
-1
@@ -150,7 +150,7 @@ public class FunctionalExpressionCompletionProvider extends CompletionProvider<C
|
||||
|
||||
Consumer<PsiType> consumer = eachReturnType -> {
|
||||
PsiClass psiClass = PsiUtil.resolveClassInType(eachReturnType);
|
||||
if (psiClass == null || psiClass instanceof PsiTypeParameter) return;
|
||||
if (psiClass == null || psiClass instanceof PsiTypeParameter || psiClass.hasModifierProperty(PsiModifier.ABSTRACT)) return;
|
||||
|
||||
if (eachReturnType.getArrayDimensions() == 0) {
|
||||
PsiMethod[] constructors = psiClass.getConstructors();
|
||||
|
||||
+1
@@ -104,6 +104,7 @@ public class SmartType18CompletionTest extends LightFixtureCompletionTestCase {
|
||||
myFixture.addClass("package foo; public class ImplBar implements intf.Intf<String> {}");
|
||||
myFixture.addClass("package foo; public class ImplFoo<T> implements intf.Intf<T> {}");
|
||||
myFixture.addClass("package foo; public class ImplIncompatible implements intf.Intf<Integer> {}");
|
||||
myFixture.addClass("package foo; public abstract class ImplAbstract implements intf.Intf<String> { public ImplAbstract() {} }");
|
||||
myFixture.addClass("package foo; class ImplInaccessible implements intf.Intf<String> {}");
|
||||
|
||||
configureByTestName();
|
||||
|
||||
Reference in New Issue
Block a user