func-math.go: use of ExtIterator to perform clean operation
This commit is contained in:
parent
a838361ea8
commit
5cf0bfbad4
@ -28,8 +28,8 @@ func doAdd(ctx ExprContext, name string, it Iterator) (result any, err error) {
|
||||
if v, err = doAdd(ctx, name, subIter); err != nil {
|
||||
break
|
||||
}
|
||||
if subIter.HasOperation(cleanName) {
|
||||
if _, err = subIter.CallOperation(cleanName, nil); err != nil {
|
||||
if extIter, ok := v.(ExtIterator); ok && extIter.HasOperation(cleanName) {
|
||||
if _, err = extIter.CallOperation(cleanName, nil); err != nil {
|
||||
return
|
||||
}
|
||||
}
|
||||
@ -103,8 +103,8 @@ func doMul(ctx ExprContext, name string, it Iterator) (result any, err error) {
|
||||
if v, err = doMul(ctx, name, subIter); err != nil {
|
||||
break
|
||||
}
|
||||
if subIter.HasOperation(cleanName) {
|
||||
if _, err = subIter.CallOperation(cleanName, nil); err != nil {
|
||||
if extIter, ok := v.(ExtIterator); ok && extIter.HasOperation(cleanName) {
|
||||
if _, err = extIter.CallOperation(cleanName, nil); err != nil {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user