Skip to content

Commit

Permalink
Simplify NodeValue append
Browse files Browse the repository at this point in the history
  • Loading branch information
iamgio committed Jun 30, 2024
1 parent 5f19634 commit b865ea5
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,7 @@ class AppendExpressionVisitor(private val other: Expression) : ExpressionVisitor
if (otherEval is VoidValue) return this as InputValue<*>

// A NodeValue, which is only an OutputValue and not an InputValue, is appended to a lazy collection of values.
if (this is NodeValue) {
return visit(GeneralCollectionValue(listOf(this)))
}
if (otherEval is NodeValue && this is OutputValue<*>) {
if (this is OutputValue<*> && (this is NodeValue || otherEval is NodeValue)) {
return visit(GeneralCollectionValue(listOf(this)))
}

Expand Down

0 comments on commit b865ea5

Please sign in to comment.