From f7e3ce85a7ad0b9c090343ed74e7ecdce057140e Mon Sep 17 00:00:00 2001 From: Kazik Pogoda Date: Thu, 5 Dec 2024 20:17:47 +0100 Subject: [PATCH] JvmMoney fix for alignment after plus/minus --- src/jvmMain/kotlin/JvmMoney.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/jvmMain/kotlin/JvmMoney.kt b/src/jvmMain/kotlin/JvmMoney.kt index e31e9e8..b0289ab 100644 --- a/src/jvmMain/kotlin/JvmMoney.kt +++ b/src/jvmMain/kotlin/JvmMoney.kt @@ -24,11 +24,11 @@ import kotlin.times public class JvmMoney(private val value: BigDecimal) : Money { override fun plus(amount: Money): Money = JvmMoney( - value + (amount as JvmMoney).value + (value + (amount as JvmMoney).value).stripTrailingZeros() ) override fun minus(amount: Money): Money = JvmMoney( - value - (amount as JvmMoney).value + (value - (amount as JvmMoney).value).stripTrailingZeros() ) override fun times(amount: Money): Money = JvmMoney(