mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
27 lines
310 B
Swift
27 lines
310 B
Swift
|
|
public struct Y {}
|
|
|
|
public struct X<U> {
|
|
public var a : U
|
|
|
|
public init(_a : U) {
|
|
a = _a
|
|
}
|
|
|
|
public func doneSomething() {}
|
|
}
|
|
|
|
public class A {
|
|
public var y : Y
|
|
public var x : X<Y>
|
|
|
|
public init() {
|
|
y = Y()
|
|
x = X<Y>(_a: y)
|
|
}
|
|
|
|
public func doSomething() {
|
|
x.doneSomething()
|
|
}
|
|
}
|