From 406bced45068e1be9f90a8bcc5a1e7996d37094d Mon Sep 17 00:00:00 2001 From: Celestino Amoroso Date: Mon, 23 Dec 2024 06:52:10 +0100 Subject: [PATCH] operator-sum.go: sum of two fraction fixed --- operator-sum.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/operator-sum.go b/operator-sum.go index 1a4cc6d..31ccdbf 100644 --- a/operator-sum.go +++ b/operator-sum.go @@ -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) }