Skip to content

Instantly share code, notes, and snippets.

@arturaz
Created May 16, 2012 10:23
Show Gist options
  • Save arturaz/2709306 to your computer and use it in GitHub Desktop.
Save arturaz/2709306 to your computer and use it in GitHub Desktop.
private def doubleOpt(key: String) = data.double(key) match {
case null => None
case x: Double => Some(x)
}
[error] /home/arturas/work/spacegame/server/vendor/SpaceMule/src/main/scala/spacemule/modules/config/objects/Config.scala:101: type mismatch;
[error] found : Null(null)
[error] required: Double
[error] case null => None
[error] ^
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment