Last active
December 26, 2015 13:29
-
-
Save tpolecat/7158601 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Scala widens Char to Int here, rather than unifying to AnyVal | |
scala> List('a', 1) | |
res7: List[Int] = List(97, 1) | |
// And even widens to Double. Nutty | |
scala> List('a', 3.14) | |
res14: List[Double] = List(97.0, 3.14) | |
// I guess it's the same case as this, although I'd really prefer AnyVal here as well | |
scala> List(1, 3.14) | |
res15: List[Double] = List(1.0, 3.14) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment