Minor
This commit is contained in:
+1
-1
@@ -84,7 +84,7 @@ class StaticMembers(
|
|||||||
val matcher: (ExpectedInfo) -> ExpectedInfoMatch
|
val matcher: (ExpectedInfo) -> ExpectedInfoMatch
|
||||||
if (descriptor is CallableDescriptor) {
|
if (descriptor is CallableDescriptor) {
|
||||||
val returnType = descriptor.fuzzyReturnType() ?: return
|
val returnType = descriptor.fuzzyReturnType() ?: return
|
||||||
matcher = { expectedInfo -> returnType.classifyExpectedInfo(expectedInfo) }
|
matcher = { expectedInfo -> returnType.matchExpectedInfo(expectedInfo) }
|
||||||
}
|
}
|
||||||
else if (DescriptorUtils.isEnumEntry(descriptor) && !enumEntriesToSkip.contains(descriptor)) {
|
else if (DescriptorUtils.isEnumEntry(descriptor) && !enumEntriesToSkip.contains(descriptor)) {
|
||||||
matcher = { ExpectedInfoMatch.match(TypeSubstitutor.EMPTY) } /* we do not need to check type of enum entry because it's taken from proper enum */
|
matcher = { ExpectedInfoMatch.match(TypeSubstitutor.EMPTY) } /* we do not need to check type of enum entry because it's taken from proper enum */
|
||||||
|
|||||||
@@ -156,7 +156,7 @@ fun Collection<FuzzyType>.matchExpectedInfo(expectedInfo: ExpectedInfo): Expecte
|
|||||||
return ExpectedInfoMatch.noMatch
|
return ExpectedInfoMatch.noMatch
|
||||||
}
|
}
|
||||||
|
|
||||||
fun FuzzyType.classifyExpectedInfo(expectedInfo: ExpectedInfo) = listOf(this).matchExpectedInfo(expectedInfo)
|
fun FuzzyType.matchExpectedInfo(expectedInfo: ExpectedInfo) = listOf(this).matchExpectedInfo(expectedInfo)
|
||||||
|
|
||||||
fun<TDescriptor: DeclarationDescriptor?> MutableCollection<LookupElement>.addLookupElements(
|
fun<TDescriptor: DeclarationDescriptor?> MutableCollection<LookupElement>.addLookupElements(
|
||||||
descriptor: TDescriptor,
|
descriptor: TDescriptor,
|
||||||
@@ -290,7 +290,7 @@ fun DeclarationDescriptor.fuzzyTypesForSmartCompletion(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (this is CallableDescriptor) {
|
if (this is CallableDescriptor) {
|
||||||
var returnType = fuzzyReturnType() ?: return emptyList()
|
val returnType = fuzzyReturnType() ?: return emptyList()
|
||||||
// skip declarations of type Nothing or of generic parameter type which has no real bounds
|
// skip declarations of type Nothing or of generic parameter type which has no real bounds
|
||||||
if (returnType.type.isNothing() || returnType.isAlmostEverything()) return emptyList()
|
if (returnType.type.isNothing() || returnType.isAlmostEverything()) return emptyList()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user