mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
16 lines
217 B
Swift
16 lines
217 B
Swift
public protocol ResilientProto {
|
|
associatedtype T
|
|
func impl()
|
|
}
|
|
|
|
|
|
public struct ResilientStruct<T> : ResilientProto {
|
|
var x : T?
|
|
public init(_ t: T) {
|
|
x = t
|
|
}
|
|
public func impl() {
|
|
print(x)
|
|
}
|
|
}
|