Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save seshness/ab47f65fb67bc300a6b8 to your computer and use it in GitHub Desktop.
Save seshness/ab47f65fb67bc300a6b8 to your computer and use it in GitHub Desktop.
Causes an error in the playground, which is expected. What's unexpected is the line on which the error occurs.
// Playground - noun: a place where people can play
import Cocoa
var str:String? = "Hello, playground"
str = nil
if let actualStr = str {
println(str)
} else {
println("found nil")
}
let forcedStr = str!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment