Tusker/MyPlayground.playground/Contents.swift

14 lines
194 B
Swift

import UIKit
func test(_ nillable: String?) {
defer {
print("defer")
}
guard let value = nillable else { return }
print(value)
}
test("test")
print("------")
test(nil)