operator-sum.go: sum of two fraction fixed
This commit is contained in:
parent
409dc86a92
commit
406bced450
@ -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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user