Skip to content

Instantly share code, notes, and snippets.

@tpolecat
Last active December 26, 2015 13:29
Show Gist options
  • Save tpolecat/7158601 to your computer and use it in GitHub Desktop.
Save tpolecat/7158601 to your computer and use it in GitHub Desktop.
// 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