mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-13 21:55:01 +07:00
IDEA-175681 Duplicate "void" suggestion
This commit is contained in:
+1
-1
@@ -60,7 +60,7 @@ class MethodReturnTypeProvider extends CompletionProvider<CompletionParameters>
|
||||
@Nullable
|
||||
@Override
|
||||
public PsiType visitType(PsiType type) {
|
||||
if (myProcessed.add(type)) {
|
||||
if (!(type instanceof PsiPrimitiveType) && myProcessed.add(type)) {
|
||||
int priority = type.equalsToText(CommonClassNames.JAVA_LANG_OBJECT) ? 1 : 1000 - myProcessed.size();
|
||||
consumer.consume(PrioritizedLookupElement.withPriority(PsiTypeLookupItem.createLookupItem(type, position), priority));
|
||||
}
|
||||
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
class Foo {
|
||||
voi<caret>d foo() {
|
||||
return;
|
||||
}
|
||||
}
|
||||
+4
@@ -678,6 +678,10 @@ public class ListUtils {
|
||||
configure()
|
||||
assert myFixture.lookupElementStrings == ['boolean', 'byte']
|
||||
}
|
||||
void testNoExpectedVoidReturnTypeDuplication() {
|
||||
configure()
|
||||
assert myFixture.lookupElementStrings == ['void']
|
||||
}
|
||||
|
||||
void testMethodReturnType() throws Throwable {
|
||||
doTest()
|
||||
|
||||
Reference in New Issue
Block a user