mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
13 lines
249 B
Swift
13 lines
249 B
Swift
// RUN: %target-swift-frontend -emit-sil -verify %s
|
|
|
|
// REQUIRES: objc_interop
|
|
|
|
import Foundation
|
|
|
|
func mutateText(_ rawText: NSString?) -> String {
|
|
guard let text = consume rawText else {
|
|
return "text unavailable"
|
|
}
|
|
return String(text)
|
|
}
|