docs.scala-lang
docs.scala-lang copied to clipboard
Update unified-types.md
Add phrase:
Note that
LongtoFloatconversion is deprecated in new versions of Scala, because of the potential precision lost.
I had to visit the web page to understand the issue. I think bishabosha's previous edit .toFloat breaks the text, which is trying to show how easy and wonderful numeric widening is. Instead, it should show the types and also trumpet Scala's "gun buy-back program" for footguns.
Merging since this is strictly an improvement, but it would be nice if a volunteer improved it further, as per above discussion.