Smart completion fixed filtering of non-suitable generic inheritors

This commit is contained in:
Valentin Kipyatkov
2014-11-27 20:15:00 +03:00
parent bf130676a8
commit 8bc7cf3d18
@@ -298,11 +298,10 @@ class TypeInstantiationItems(
reconstructionResult.getResultingType() ?: continue
}
else {
val type = descriptor.getDefaultType()
// check if derived type matches type arguments for base
if (baseHasTypeArgs && !type.isSubtypeOf(expectedType)) continue
type
descriptor.getDefaultType()
}
// check if derived type matches type arguments for base
if (baseHasTypeArgs && !resultingType.isSubtypeOf(expectedType)) continue
val lookupElement = createTypeInstantiationItem(descriptor, resultingType.getArguments(), tail) ?: continue
consumer(lookupElement.assignSmartCompletionPriority(SmartCompletionItemPriority.INHERITOR_INSTANTIATION))