From 9d9b2b2a58f6225eba68568412113994a19f299a Mon Sep 17 00:00:00 2001 From: Mikhail Glukhikh Date: Thu, 18 Jan 2018 17:21:08 +0300 Subject: [PATCH] Fix stub inconsistency in "inline type parameter fix" Fixes one quick-fix test --- .../kotlin/idea/quickfix/InlineTypeParameterFix.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/idea/src/org/jetbrains/kotlin/idea/quickfix/InlineTypeParameterFix.kt b/idea/src/org/jetbrains/kotlin/idea/quickfix/InlineTypeParameterFix.kt index 942a523ed7c..03cf823b5d9 100644 --- a/idea/src/org/jetbrains/kotlin/idea/quickfix/InlineTypeParameterFix.kt +++ b/idea/src/org/jetbrains/kotlin/idea/quickfix/InlineTypeParameterFix.kt @@ -34,11 +34,11 @@ class InlineTypeParameterFix(val typeReference: KtTypeReference) : KotlinQuickFi val parameterListOwner = typeReference.getStrictParentOfType() ?: return val context = parameterListOwner.analyzeFully() val parameterDescriptor = context[BindingContext.TYPE_PARAMETER, parameter] ?: return - parameterListOwner.forEachDescendantOfType { - val typeElement = it.typeElement - val type = context[BindingContext.TYPE, it] + parameterListOwner.forEachDescendantOfType { 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) } }