Minor changes on code review

This commit is contained in:
Valentin Kipyatkov
2016-05-18 15:52:17 +03:00
parent d658d3b9cf
commit da772e11c2
3 changed files with 4 additions and 4 deletions
@@ -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
}
@@ -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 {