Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"compile-time refinement only works with literals" for NonNegBigDecimal when a Double literal is used #883

Open
kubukoz opened this issue Dec 4, 2020 · 0 comments

Comments

@kubukoz
Copy link
Contributor

kubukoz commented Dec 4, 2020

Hi!

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.

@kubukoz 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant