Store only string in closure instead of full type
This commit is contained in:
+1
-1
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user