You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to make a NonNegBigDecimal at compile-time. The auto._ import didn't work, so I tried it by hand:
NonNegBigDecimal(1.01)
but I get "compile-time refinement only works with literals". I understand this might be because Scala has no literals for BigDecimal, but a case like this should probably be allowed.
The text was updated successfully, but these errors were encountered:
kubukoz
changed the title
"compile-time refinement only works with literals" when a literal is used
"compile-time refinement only works with literals" for NonNegBigDecimal when a Double literal is used
Dec 4, 2020
Hi!
I'm trying to make a
NonNegBigDecimal
at compile-time. Theauto._
import didn't work, so I tried it by hand:but I get
"compile-time refinement only works with literals"
. I understand this might be because Scala has no literals forBigDecimal
, but a case like this should probably be allowed.The text was updated successfully, but these errors were encountered: