Skip to content

Instantly share code, notes, and snippets.

@SeanTAllen
Last active August 29, 2015 14:14
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 SeanTAllen/21748bafece40847765e to your computer and use it in GitHub Desktop.
Save SeanTAllen/21748bafece40847765e to your computer and use it in GitHub Desktop.
case class Foo(a: Option[String])
Foo(Some("string")) match {
case Foo(None) => "compiles w/o warning"
}
val z: Option[String] = None
z match {
case None => "doesn't compile w/o warning"
}
// Why does the first not fail exhaustive-ness check like the second?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment