From fc55b532d4d0601d7d217fc49e531344bebbd366 Mon Sep 17 00:00:00 2001 From: Nikolay Krasko Date: Tue, 4 Apr 2017 19:06:11 +0300 Subject: [PATCH] Store only string in closure instead of full type --- .../introduceVariable/KotlinVariableInplaceIntroducer.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/idea/src/org/jetbrains/kotlin/idea/refactoring/introduce/introduceVariable/KotlinVariableInplaceIntroducer.kt b/idea/src/org/jetbrains/kotlin/idea/refactoring/introduce/introduceVariable/KotlinVariableInplaceIntroducer.kt index 7764b00e207..18c809ed13c 100644 --- a/idea/src/org/jetbrains/kotlin/idea/refactoring/introduce/introduceVariable/KotlinVariableInplaceIntroducer.kt +++ b/idea/src/org/jetbrains/kotlin/idea/refactoring/introduce/introduceVariable/KotlinVariableInplaceIntroducer.kt @@ -86,6 +86,7 @@ class KotlinVariableInplaceIntroducer( } if (expressionType != null && !noTypeInference) { + val renderedType = IdeDescriptorRenderers.SOURCE_CODE_SHORT_NAMES_IN_TYPES.renderType(expressionType) expressionTypeCheckBox = NonFocusableCheckBox("Specify type explicitly").apply { isSelected = false setMnemonic('t') @@ -93,7 +94,6 @@ class KotlinVariableInplaceIntroducer( runWriteCommandAndRestart { updateVariableName() if (isSelected) { - val renderedType = IdeDescriptorRenderers.SOURCE_CODE_SHORT_NAMES_IN_TYPES.renderType(expressionType) addedVariable.typeReference = KtPsiFactory(myProject).createType(renderedType) } else {