-
-
Save jorgeortiz85/1656964 to your computer and use it in GitHub Desktop.
scala.collection.JavaConversions is evil
This file contains hidden or 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
import scala.collection.JavaConversions._ | |
case class Foo(s: String) | |
val map: Map[Foo, String] = | |
Map( | |
Foo("a") -> "a", | |
Foo("b") -> "b") | |
val v = map.get("a") // should be a type error, actually returns null |
paulp
commented
Mar 21, 2012
JavaConverters the sane alternative?
By the way, thanks for providing a hit for the search "JavaConversions is evil".
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment