Unnecessary variable: do not start inlining in write action

So #KT-19110 Fixed

(cherry picked from commit 6325fb1)
This commit is contained in:
Mikhail Glukhikh
2017-07-20 12:12:48 +03:00
committed by Mikhail Glukhikh
parent e38aaf3e07
commit bdc44ff4cf
@@ -87,6 +87,8 @@ class UnnecessaryVariableInspection : AbstractKotlinInspection() {
override fun getFamilyName() = name
override fun startInWriteAction() = false
override fun applyFix(project: Project, descriptor: ProblemDescriptor) {
val property = descriptor.psiElement.getParentOfType<KtProperty>(strict = true) ?: return
KotlinInlineValHandler().inlineElement(project, property.findExistingEditor(), property)