Code cleanup: "can be constructor property" applied

(cherry picked from commit 6967711)
This commit is contained in:
Mikhail Glukhikh
2016-06-17 16:39:13 +03:00
committed by Mikhail Glukhikh
parent 49aaeb5a38
commit 8d2389d15c
3 changed files with 2 additions and 6 deletions
@@ -39,7 +39,6 @@ abstract class SuppressDiagnosticsByAnnotations(
vararg annotationsFqName: FqName
) : SuppressStringProvider {
private val annotationsFqName = annotationsFqName
private val stringsToSuppress = diagnosticsToSuppress.map { it.name.toLowerCase() }
private val expectedFqNames = annotationsFqName.map { it.toString() }
@@ -46,7 +46,7 @@ class KotlinInplacePropertyIntroducer(
title: String,
doNotChangeVar: Boolean,
exprType: KotlinType?,
extractionResult: ExtractionResult,
private var extractionResult: ExtractionResult,
private val availableTargets: List<ExtractionTarget>
): KotlinInplaceVariableIntroducer<KtProperty>(
property, editor, project, title, KtExpression.EMPTY_ARRAY, null, false, property, false, doNotChangeVar, exprType, false
@@ -55,8 +55,6 @@ class KotlinInplacePropertyIntroducer(
assert(availableTargets.isNotEmpty()) { "No targets available: ${property.getElementTextWithContext()}" }
}
private var extractionResult = extractionResult
private var currentTarget: ExtractionTarget = extractionResult.config.generatorOptions.target
set(value: ExtractionTarget) {
if (value == currentTarget) return
@@ -43,9 +43,8 @@ fun removeUnusedFunctionDefinitions(root: JsNode, functions: Map<JsName, JsFunct
}.accept(root)
}
private class UnusedLocalFunctionsCollector(functions: Map<JsName, JsFunction>) : JsVisitorWithContextImpl() {
private class UnusedLocalFunctionsCollector(private val functions: Map<JsName, JsFunction>) : JsVisitorWithContextImpl() {
private val tracker = ReferenceTracker<JsName, JsFunction>()
private val functions = functions
private val processed = IdentitySet<JsFunction>()
val removableFunctions: List<JsFunction>