Skip to content

Instantly share code, notes, and snippets.

@teancom
Created June 8, 2014 19:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save teancom/f34de64dedd58e76a95a to your computer and use it in GitHub Desktop.
Save teancom/f34de64dedd58e76a95a to your computer and use it in GitHub Desktop.
let foo:Bool = true
switch foo {
case true:
println("got here")
case false:
println("won't get here")
case foo == nil:
println("am I exhaustive now?")
default:
println("grr")
}
@teancom
Copy link
Author

teancom commented Jun 8, 2014

Deleting the default case results in an error (in my playground, at least)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment