Files
swift-mirror/test/Interpreter/SDK/objc_currying.swift
Ted Kremenek fad874708e Adjust test cases.
Swift SVN r17964
2014-05-12 22:01:52 +00:00

21 lines
444 B
Swift

// RUN: %target-run-simple-swift | FileCheck %s
import Foundation
func foo(f: String! -> String!) {
println(f(", "))
println(f(""))
}
let x: NSArray = ["foo", "bar", "bas"]
foo(x.componentsJoinedByString)
// CHECK: foo, bar, bas
// CHECK: foo bar bas
let a: AnyObject = x
if let componentsJoinedByString = a.componentsJoinedByString {
foo(componentsJoinedByString)
}
// CHECK: foo, bar, bas
// CHECK: foo bar bas