Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xuwei-k/8870ea35c4bb6a4de05c to your computer and use it in GitHub Desktop.
Save xuwei-k/8870ea35c4bb6a4de05c to your computer and use it in GitHub Desktop.
scala.collection.JavaConversions is evil
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment