Tusker/MyPlayground.playground/Contents.swift

14 lines
194 B
Swift
Raw Normal View History

2018-09-09 01:35:40 +00:00
import UIKit
func test(_ nillable: String?) {
defer {
print("defer")
}
guard let value = nillable else { return }
print(value)
}
test("test")
print("------")
test(nil)