completed list-type to array-type conversion and fixed common test module

This commit is contained in:
2026-07-13 10:42:17 +02:00
parent 77f36642b4
commit 072fd9af39
39 changed files with 160 additions and 318 deletions
+4 -3
View File
@@ -41,7 +41,7 @@ func sumValues(plusTerm *scan.Term, leftValue, rightValue any) (v any, err error
rightInt, _ := rightValue.(int64)
v = leftInt + rightInt
}
} else if array.IsList(leftValue) && array.IsList(rightValue) {
} else if array.IsArray(leftValue) && array.IsArray(rightValue) {
var leftList, rightList *array.ArrayType
leftList, _ = leftValue.(*array.ArrayType)
rightList, _ = rightValue.(*array.ArrayType)
@@ -59,7 +59,8 @@ func sumValues(plusTerm *scan.Term, leftValue, rightValue any) (v any, err error
} else if dict.IsDict(leftValue) && dict.IsDict(rightValue) {
leftDict, _ := leftValue.(*dict.DictType)
rightDict, _ := rightValue.(*dict.DictType)
c := leftDict.Clone()
clone := leftDict.Clone()
c := clone.(*dict.DictType)
c.Merge(rightDict)
v = c
} else if fract.IsFraction(leftValue) && fract.IsFraction(rightValue) {
@@ -103,7 +104,7 @@ func diffValues(minusTerm *scan.Term, leftValue, rightValue any) (v any, err err
rightInt, _ := rightValue.(int64)
v = leftInt - rightInt
}
} else if array.IsList(leftValue) && array.IsList(rightValue) {
} else if array.IsArray(leftValue) && array.IsArray(rightValue) {
leftList, _ := leftValue.(*array.ArrayType)
rightList, _ := rightValue.(*array.ArrayType)
diffList := make(array.ArrayType, 0, len(*leftList)-len(*rightList))