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 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153
|
@_exported import cake
public protocol P1 {}
public protocol P2 {}
public protocol P3: P2, P1 {}
@frozen
public struct S1: P1 {
public static func foo1() {}
mutating public func foo2() {}
internal func foo3() {}
private func foo4() {}
fileprivate func foo5() {}
public func foo6() -> Void {}
}
extension S1: P2 {}
public class C0<T1, T2, T3> {}
public typealias C0Alias = C0<S1, S1, S1>
public class C1: C0Alias {
open class func foo1() {}
public weak var Ins : C1?
public unowned var Ins2 : C1 = C1()
}
public extension C0 where T1 == S1, T2 == S1, T3 == S1 {
func conditionalFooExt() {}
}
public extension C0 {
func unconditionalFooExt() {}
}
public func foo1(_ a: Int = 1, b: S1) {}
public func foo2(_ a: Int = #line, b: S1) {}
public enum Number: Int {
case one
}
public func foo3(_ a: [Int: String]) {}
public extension Int {
public func foo() {}
}
@frozen
public struct fixedLayoutStruct {
public var a = 1
private var b = 2 { didSet {} willSet(value) {} }
var c = 3
}
extension Int: P1 { public func bar() {} }
public protocol ProWithAssociatedType {
associatedtype A
associatedtype B = Int
}
public protocol SubsContainer {
subscript(getter i: Int) -> Int { get }
subscript(setter i: Int) -> Int { get set }
}
public extension ProWithAssociatedType {
func NonReqFunc() {}
var NonReqVar: Int { return 1 }
typealias NonReqAlias = Int
}
public protocol PSuper {
associatedtype T
func foo()
}
public protocol PSub: PSuper {
associatedtype T
func foo()
}
public let GlobalVar = 1
public extension P1 {
static func +(lhs: Self, rhs: Self) -> Self { return lhs }
}
infix operator ..*..
@usableFromInline
@_fixed_layout
class UsableFromInlineClass {
private var Prop = 1
}
class InternalType {}
extension InternalType {}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public extension PSuper {
func futureFoo() {}
}
public class FutureContainer {
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
public func futureFoo() {}
@available(macOS 10.15, *)
public func NotfutureFoo() {}
}
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
extension FutureContainer: P1 {}
extension FutureContainer: P2 {}
@available(macOS 10.1, iOS 10.2, tvOS 10.3, watchOS 3.4, *)
public class PlatformIntroClass {}
@available(swift, introduced: 5)
public class SwiftIntroClass {}
@objc(NewObjCClass)
public class SwiftObjcClass {
@objc(ObjCFool:ObjCA:ObjCB:)
public func foo(a:Int, b:Int, c: Int) {}
}
@available(iOS 10.2, tvOS 10.3, watchOS 3.4, *)
@available(macOS, unavailable)
public class UnavailableOnMac {}
@available(macOS, unavailable)
extension SwiftObjcClass {
public func functionUnavailableOnMac() {}
}
@_alwaysEmitIntoClient
public func emitIntoClientFunc() {}
@_silgen_name("silgenName")
public func silgenNamedFunc() {}
@available(OSX 10.7, *)
@_originallyDefinedIn(module: "Bread", OSX 10.9)
@_spi(top_secret_1)
@_spi(top_secret_2)
public class SinkingClass {
public init() {}
}
|