From da772e11c2a57db07db2177b9cf1c1773b78b399 Mon Sep 17 00:00:00 2001 From: Valentin Kipyatkov Date: Wed, 18 May 2016 15:52:17 +0300 Subject: [PATCH] Minor changes on code review --- .../idea/intentions/loopToCallChain/baseTransformations.kt | 2 +- .../kotlin/idea/intentions/loopToCallChain/interfaces.kt | 2 +- .../loopToCallChain/result/AddToCollectionTransformation.kt | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/idea/src/org/jetbrains/kotlin/idea/intentions/loopToCallChain/baseTransformations.kt b/idea/src/org/jetbrains/kotlin/idea/intentions/loopToCallChain/baseTransformations.kt index 9e1064c5ab6..d8289fe74a7 100644 --- a/idea/src/org/jetbrains/kotlin/idea/intentions/loopToCallChain/baseTransformations.kt +++ b/idea/src/org/jetbrains/kotlin/idea/intentions/loopToCallChain/baseTransformations.kt @@ -88,7 +88,7 @@ abstract class AssignToVariableResultTransformation( } } -class AssignSequenceTransformationResultTransformation( +class AssignSequenceResultTransformation( private val sequenceTransformation: SequenceTransformation, initialization: VariableInitialization ) : AssignToVariableResultTransformation(sequenceTransformation.loop, initialization) { diff --git a/idea/src/org/jetbrains/kotlin/idea/intentions/loopToCallChain/interfaces.kt b/idea/src/org/jetbrains/kotlin/idea/intentions/loopToCallChain/interfaces.kt index e8a6457f97e..4fd80ff574f 100644 --- a/idea/src/org/jetbrains/kotlin/idea/intentions/loopToCallChain/interfaces.kt +++ b/idea/src/org/jetbrains/kotlin/idea/intentions/loopToCallChain/interfaces.kt @@ -140,7 +140,7 @@ sealed class TransformationMatch(val sequenceTransformations: List) : TransformationMatch(sequenceTransformations) { constructor(resultTransformation: ResultTransformation, vararg sequenceTransformations: SequenceTransformation) - : this(resultTransformation, sequenceTransformations.asList()) + : this(resultTransformation, sequenceTransformations.asList()) override val allTransformations = sequenceTransformations + resultTransformation } diff --git a/idea/src/org/jetbrains/kotlin/idea/intentions/loopToCallChain/result/AddToCollectionTransformation.kt b/idea/src/org/jetbrains/kotlin/idea/intentions/loopToCallChain/result/AddToCollectionTransformation.kt index 6a383713bff..1b62b09a80d 100644 --- a/idea/src/org/jetbrains/kotlin/idea/intentions/loopToCallChain/result/AddToCollectionTransformation.kt +++ b/idea/src/org/jetbrains/kotlin/idea/intentions/loopToCallChain/result/AddToCollectionTransformation.kt @@ -134,7 +134,7 @@ class AddToCollectionTransformation( } else { val mapTransformation = MapTransformation(state.outerLoop, state.inputVariable, null, addOperationArgument, mapNotNull = false) - AssignSequenceTransformationResultTransformation(mapTransformation, collectionInitialization) + AssignSequenceResultTransformation(mapTransformation, collectionInitialization) } return TransformationMatch.Result(transformation) } @@ -354,7 +354,7 @@ class AssignToListTransformation( override fun mergeWithPrevious(previousTransformation: SequenceTransformation): ResultTransformation? { //TODO: can be any SequenceTransformation's that return not List? Also this code needs to be changed when .asSequence() used - return AssignSequenceTransformationResultTransformation(previousTransformation, initialization) + return AssignSequenceResultTransformation(previousTransformation, initialization) } override fun generateCode(chainedCallGenerator: ChainedCallGenerator): KtExpression {