Fix stub inconsistency in "inline type parameter fix"
Fixes one quick-fix test
This commit is contained in:
@@ -34,11 +34,11 @@ class InlineTypeParameterFix(val typeReference: KtTypeReference) : KotlinQuickFi
|
||||
val parameterListOwner = typeReference.getStrictParentOfType<KtTypeParameterListOwner>() ?: return
|
||||
val context = parameterListOwner.analyzeFully()
|
||||
val parameterDescriptor = context[BindingContext.TYPE_PARAMETER, parameter] ?: return
|
||||
parameterListOwner.forEachDescendantOfType<KtTypeReference> {
|
||||
val typeElement = it.typeElement
|
||||
val type = context[BindingContext.TYPE, it]
|
||||
parameterListOwner.forEachDescendantOfType<KtTypeReference> { typeReference ->
|
||||
val typeElement = typeReference.typeElement
|
||||
val type = context[BindingContext.TYPE, typeReference]
|
||||
if (typeElement != null && type != null && type.constructor.declarationDescriptor == parameterDescriptor) {
|
||||
typeElement.replace(bound)
|
||||
typeReference.replace(bound)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user