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
Welcome to Scala.next (pre-alpha, git-hash: unknown) (JavaHotSpot(TM) 64-BitServerVM, Java1.8.0_121).
Type in expressions to have them evaluated.
Type:help for more information.
scala>valx=123456789Lvalx:Long=123456789
scala>valy=0Fvaly:Float=0.0f
scala> x - (if (true) x else y)
valres0:Float=-3.0f
The text was updated successfully, but these errors were encountered:
Isn't that as spec'ed? Current Scala gives the same result, one thing we specifically do not want to do is change the runtime behavior of dotty as compared to Scala.
Another possibility would be to never convert Long to Double and Int to Float, and instead use union types. I suspect this won't affect too much code since Long and Float are rarely used compared to Int and Double (where you can convert without losing precision).
The text was updated successfully, but these errors were encountered: