1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
|
@_weakLinked
public func fn() {}
@_weakLinked
public var globalStored = 0
@_weakLinked
public var globalComputed: Int {
get { return 1 }
set {}
}
public struct S {
@_weakLinked
public func fn() {}
@_weakLinked
public var storedProp = 0
@_weakLinked
public var computedProp: Int {
get { return 1 }
set {}
}
@_weakLinked
public init() {}
@_weakLinked
public subscript(_: Int) -> Int {
get { return 1 }
set {}
}
}
public enum E {
case strong
@_weakLinked
case weak
case strongAssoc(Int)
@_weakLinked
case weakAssoc(Int)
}
open class C {
@_weakLinked
open func fn() {}
@_weakLinked
open var storedProp = 0
@_weakLinked
open var computedProp: Int {
get { return 1 }
set {}
}
@_weakLinked
public init() {}
@_weakLinked
open subscript(_: Int) -> Int {
get { return 1 }
set {}
}
}
public protocol P {
@_weakLinked
func fn()
@_weakLinked
var prop: Int { get set }
@_weakLinked
init()
@_weakLinked
subscript(_: Int) -> Int { get set }
}
@_weakLinked
public struct WeakS {
public init() {}
public func weakMember() {}
}
@_weakLinked
public enum WeakE {}
@_weakLinked
open class WeakC {
public init() {}
}
@_weakLinked
public protocol WeakP {}
@_weakLinked
public struct GenericS<T> {}
@_weakLinked
public enum GenericE<T> {}
@_weakLinked
open class GenericC<T> {
public init() {}
}
public protocol OtherProtocol {}
public struct ConcreteType : OtherProtocol {}
public protocol ProtocolWithWeakMembers {
@_weakLinked associatedtype T : OtherProtocol = ConcreteType
@_weakLinked func f()
}
extension ProtocolWithWeakMembers {
@_weakLinked public func f() {}
}
public protocol BaseP {}
@_weakLinked extension S : BaseP {}
|