mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
22 lines
357 B
Plaintext
22 lines
357 B
Plaintext
struct S1 {}
|
|
func foo1(a: S1) {}
|
|
class new_c1 {}
|
|
func foo2(c : new_c1) {}
|
|
enum E1 {}
|
|
func foo3(e : E1) {}
|
|
func foo4(a : S1, b : new_c1, c: E1) { foo4(a: a, b: b, c :c) }
|
|
|
|
func test() {
|
|
struct SLocal {
|
|
init(x: S1) {}
|
|
}
|
|
func local(a: SLocal) {}
|
|
local(a: SLocal(x: S1()))
|
|
}
|
|
|
|
guard let top = Optional.some("top") else {
|
|
fatalError()
|
|
}
|
|
print(top)
|
|
|