Skip to content

Instantly share code, notes, and snippets.

View joescii's full-sized avatar

Joe Daniel Barnes joescii

  • Open to work
  • United States
View GitHub Profile
@joescii
joescii / gist:9336415
Created March 3, 2014 22:58
Some(null) sucks
import org.scalatest._
import org.scalatest.matchers.ShouldMatchers
class SomeNull extends FlatSpec with ShouldMatchers {
val o:Option[String] = Some(null)
"The option" should "not match Some(a)" in {
o match {
case Some(s) => s should not be (null)
case _ =>