operator-sum.go: sum of two fraction fixed

This commit is contained in:
Celestino Amoroso 2024-12-23 06:52:10 +01:00
parent 409dc86a92
commit 406bced450

View File

@ -53,6 +53,8 @@ func sumValues(plusTerm *term, leftValue, rightValue any) (v any, err error) {
c := leftDict.clone()
c.merge(rightDict)
v = c
} else if isFraction(leftValue) && isFraction(rightValue) {
v, err = sumAnyFract(leftValue, rightValue)
} else {
err = plusTerm.errIncompatibleTypes(leftValue, rightValue)
}