Code cleanup: "can be constructor property" applied
(cherry picked from commit 6967711)
This commit is contained in:
committed by
Mikhail Glukhikh
parent
49aaeb5a38
commit
8d2389d15c
-1
@@ -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() }
|
||||
|
||||
|
||||
+1
-3
@@ -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
|
||||
|
||||
+1
-2
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user