Minor changes on code review
This commit is contained in:
+1
-1
@@ -88,7 +88,7 @@ abstract class AssignToVariableResultTransformation(
|
||||
}
|
||||
}
|
||||
|
||||
class AssignSequenceTransformationResultTransformation(
|
||||
class AssignSequenceResultTransformation(
|
||||
private val sequenceTransformation: SequenceTransformation,
|
||||
initialization: VariableInitialization
|
||||
) : AssignToVariableResultTransformation(sequenceTransformation.loop, initialization) {
|
||||
|
||||
@@ -140,7 +140,7 @@ sealed class TransformationMatch(val sequenceTransformations: List<SequenceTrans
|
||||
*/
|
||||
class Result(val resultTransformation: ResultTransformation, sequenceTransformations: List<SequenceTransformation>) : TransformationMatch(sequenceTransformations) {
|
||||
constructor(resultTransformation: ResultTransformation, vararg sequenceTransformations: SequenceTransformation)
|
||||
: this(resultTransformation, sequenceTransformations.asList())
|
||||
: this(resultTransformation, sequenceTransformations.asList())
|
||||
|
||||
override val allTransformations = sequenceTransformations + resultTransformation
|
||||
}
|
||||
|
||||
+2
-2
@@ -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<T>? Also this code needs to be changed when .asSequence() used
|
||||
return AssignSequenceTransformationResultTransformation(previousTransformation, initialization)
|
||||
return AssignSequenceResultTransformation(previousTransformation, initialization)
|
||||
}
|
||||
|
||||
override fun generateCode(chainedCallGenerator: ChainedCallGenerator): KtExpression {
|
||||
|
||||
Reference in New Issue
Block a user