Smart completion fixed filtering of non-suitable generic inheritors
This commit is contained in:
@@ -298,11 +298,10 @@ class TypeInstantiationItems(
|
|||||||
reconstructionResult.getResultingType() ?: continue
|
reconstructionResult.getResultingType() ?: continue
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
val type = descriptor.getDefaultType()
|
descriptor.getDefaultType()
|
||||||
// check if derived type matches type arguments for base
|
|
||||||
if (baseHasTypeArgs && !type.isSubtypeOf(expectedType)) continue
|
|
||||||
type
|
|
||||||
}
|
}
|
||||||
|
// check if derived type matches type arguments for base
|
||||||
|
if (baseHasTypeArgs && !resultingType.isSubtypeOf(expectedType)) continue
|
||||||
|
|
||||||
val lookupElement = createTypeInstantiationItem(descriptor, resultingType.getArguments(), tail) ?: continue
|
val lookupElement = createTypeInstantiationItem(descriptor, resultingType.getArguments(), tail) ?: continue
|
||||||
consumer(lookupElement.assignSmartCompletionPriority(SmartCompletionItemPriority.INHERITOR_INSTANTIATION))
|
consumer(lookupElement.assignSmartCompletionPriority(SmartCompletionItemPriority.INHERITOR_INSTANTIATION))
|
||||||
|
|||||||
Reference in New Issue
Block a user