Skip to content

Instantly share code, notes, and snippets.

@maiha
Created November 15, 2010 17:18
Show Gist options
  • Save maiha/700622 to your computer and use it in GitHub Desktop.
Save maiha/700622 to your computer and use it in GitHub Desktop.
scala> val map = Map[String,Any]("a"->1)
map: scala.collection.immutable.Map[String,Any] = Map((a,1))
scala> map("a")
res0: Any = 1
scala> val x:Int = map("a")
<console>:6: error: type mismatch;
found : Any
required: Int
val x:Int = map("a")
^
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment