|
6 | 6 | // RUN: %target-typecheck-verify-swift -sdk %clang-importer-sdk -I %S/Inputs/custom-modules -I %t
|
7 | 7 | // REQUIRES: objc_interop
|
8 | 8 |
|
9 |
| -// PRINT-LABEL: struct ErrorDomain : RawRepresentable, _SwiftNewtypeWrapper, Equatable, Hashable, Comparable, _ObjectiveCBridgeable { |
| 9 | +// PRINT-LABEL: struct ErrorDomain : RawRepresentable, _SwiftNewtypeWrapper, Equatable, Hashable, _ObjectiveCBridgeable { |
10 | 10 | // PRINT-NEXT: init(_ rawValue: String)
|
11 | 11 | // PRINT-NEXT: init(rawValue: String)
|
12 | 12 | // PRINT-NEXT: var _rawValue: NSString
|
|
28 | 28 | // PRINT-NEXT: extension Food {
|
29 | 29 | // PRINT-NEXT: static let err: ErrorDomain
|
30 | 30 | // PRINT-NEXT: }
|
31 |
| -// PRINT-NEXT: struct ClosedEnum : RawRepresentable, _SwiftNewtypeWrapper, Equatable, Hashable, Comparable, _ObjectiveCBridgeable { |
| 31 | +// PRINT-NEXT: struct ClosedEnum : RawRepresentable, _SwiftNewtypeWrapper, Equatable, Hashable, _ObjectiveCBridgeable { |
32 | 32 | // PRINT-NEXT: init(rawValue: String)
|
33 | 33 | // PRINT-NEXT: var _rawValue: NSString
|
34 | 34 | // PRINT-NEXT: var rawValue: String { get }
|
|
40 | 40 | // PRINT-NEXT: static let secondEntry: ClosedEnum
|
41 | 41 | // PRINT-NEXT: static let thirdEntry: ClosedEnum
|
42 | 42 | // PRINT-NEXT: }
|
43 |
| -// PRINT-NEXT: struct IUONewtype : RawRepresentable, _SwiftNewtypeWrapper, Equatable, Hashable, Comparable, _ObjectiveCBridgeable { |
| 43 | +// PRINT-NEXT: struct IUONewtype : RawRepresentable, _SwiftNewtypeWrapper, Equatable, Hashable, _ObjectiveCBridgeable { |
44 | 44 | // PRINT-NEXT: init(_ rawValue: String)
|
45 | 45 | // PRINT-NEXT: init(rawValue: String)
|
46 | 46 | // PRINT-NEXT: var _rawValue: NSString
|
47 | 47 | // PRINT-NEXT: var rawValue: String { get }
|
48 | 48 | // PRINT-NEXT: typealias RawValue = String
|
49 | 49 | // PRINT-NEXT: typealias _ObjectiveCType = NSString
|
50 | 50 | // PRINT-NEXT: }
|
51 |
| -// PRINT-NEXT: struct MyFloat : RawRepresentable, _SwiftNewtypeWrapper, Equatable, Hashable, Comparable { |
| 51 | +// PRINT-NEXT: struct MyFloat : RawRepresentable, _SwiftNewtypeWrapper, Equatable, Hashable { |
52 | 52 | // PRINT-NEXT: init(_ rawValue: Float)
|
53 | 53 | // PRINT-NEXT: init(rawValue: Float)
|
54 | 54 | // PRINT-NEXT: let rawValue: Float
|
|
60 | 60 | // PRINT-NEXT: static let version: MyFloat{{$}}
|
61 | 61 | // PRINT-NEXT: }
|
62 | 62 | //
|
63 |
| -// PRINT-LABEL: struct MyInt : RawRepresentable, _SwiftNewtypeWrapper, Equatable, Hashable, Comparable { |
| 63 | +// PRINT-LABEL: struct MyInt : RawRepresentable, _SwiftNewtypeWrapper, Equatable, Hashable { |
64 | 64 | // PRINT-NEXT: init(_ rawValue: Int32)
|
65 | 65 | // PRINT-NEXT: init(rawValue: Int32)
|
66 | 66 | // PRINT-NEXT: let rawValue: Int32
|
|
118 | 118 | // PRINT-NEXT: func takeMyABIOldType(_: MyABIOldType!)
|
119 | 119 | // PRINT-NEXT: func takeMyABINewTypeNonNull(_: MyABINewType)
|
120 | 120 | // PRINT-NEXT: func takeMyABIOldTypeNonNull(_: MyABIOldType)
|
121 |
| -// PRINT-NEXT: struct MyABINewTypeNS : RawRepresentable, _SwiftNewtypeWrapper, Equatable, Hashable, Comparable, _ObjectiveCBridgeable { |
| 121 | +// PRINT-NEXT: struct MyABINewTypeNS : RawRepresentable, _SwiftNewtypeWrapper, Equatable, Hashable, _ObjectiveCBridgeable { |
122 | 122 | // PRINT-NEXT: init(_ rawValue: String)
|
123 | 123 | // PRINT-NEXT: init(rawValue: String)
|
124 | 124 | // PRINT-NEXT: var _rawValue: NSString
|
|
138 | 138 | // PRINT-NEXT: init(i: Int32)
|
139 | 139 | // PRINT-NEXT: }
|
140 | 140 | // PRINT-NEXT: extension NSSomeContext {
|
141 |
| -// PRINT-NEXT: struct Name : RawRepresentable, _SwiftNewtypeWrapper, Equatable, Hashable, Comparable, _ObjectiveCBridgeable { |
| 141 | +// PRINT-NEXT: struct Name : RawRepresentable, _SwiftNewtypeWrapper, Equatable, Hashable, _ObjectiveCBridgeable { |
142 | 142 | // PRINT-NEXT: init(_ rawValue: String)
|
143 | 143 | // PRINT-NEXT: init(rawValue: String)
|
144 | 144 | // PRINT-NEXT: var _rawValue: NSString
|
@@ -179,14 +179,12 @@ func tests() {
|
179 | 179 | func acceptSwiftNewtypeWrapper<T : _SwiftNewtypeWrapper>(_ t: T) { }
|
180 | 180 | func acceptEquatable<T : Equatable>(_ t: T) { }
|
181 | 181 | func acceptHashable<T : Hashable>(_ t: T) { }
|
182 |
| -func acceptComparable<T : Hashable>(_ t: T) { } |
183 | 182 | func acceptObjectiveCBridgeable<T : _ObjectiveCBridgeable>(_ t: T) { }
|
184 | 183 |
|
185 | 184 | func testConformances(ed: ErrorDomain) {
|
186 | 185 | acceptSwiftNewtypeWrapper(ed)
|
187 | 186 | acceptEquatable(ed)
|
188 | 187 | acceptHashable(ed)
|
189 |
| - acceptComparable(ed) |
190 | 188 | acceptObjectiveCBridgeable(ed)
|
191 | 189 | }
|
192 | 190 |
|
|
0 commit comments