Skip to content

Instantly share code, notes, and snippets.

@jorgeortiz85
Forked from seanparsons/gist:1656555
Created January 22, 2012 12:44
Show Gist options
  • Save jorgeortiz85/1656964 to your computer and use it in GitHub Desktop.
Save jorgeortiz85/1656964 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
@schmmd
Copy link

schmmd commented Dec 18, 2013

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