finos / morphir-elm

Tools to work with the Morphir IR in Elm.
https://package.elm-lang.org/packages/finos/morphir-elm/latest
Apache License 2.0
45 stars 63 forks source link

Decimal IR for DivWithDefault has the wrong return type #1130

Open michelchan opened 8 months ago

michelchan commented 8 months ago

The SDK doesn't match the IR for Decimal.divideWithDefault. This is causing issues when implementing it properly in Morphir-Scala because it doesn't match.

DivWithDefault SDK implementation that returns Decimal: https://github.com/finos/morphir-elm/blob/cdccf45ce8e10803e5e4b4de4229f86aed1fd928/src/Morphir/SDK/Decimal.elm#L238-L242

DivWithDefault IR that returns Maybe Decimal: https://github.com/finos/morphir-elm/blob/cdccf45ce8e10803e5e4b4de4229f86aed1fd928/src/Morphir/IR/SDK/Decimal.elm#L49

It should be Decimal.