@@ -9,9 +9,9 @@ public class NonSendableKlass {}
9
9
// CHECK-LABEL: #if compiler(>=5.3) && $SendingArgsAndResults
10
10
// CHECK-NEXT: public func transferArgTest(_ x: sending test.NonSendableKlass)
11
11
// CHECK-NEXT: #else
12
- // When we suppress, we preserve +1 by marking the parameter as consuming . Otherwise, we
12
+ // When we suppress, we preserve +1 by marking the parameter as __owned . Otherwise, we
13
13
// be breaking ABI.
14
- // CHECK-NEXT: public func transferArgTest(_ x: consuming test.NonSendableKlass)
14
+ // CHECK-NEXT: public func transferArgTest(_ x: __owned test.NonSendableKlass)
15
15
// CHECK-NEXT: #endif
16
16
public func transferArgTest( _ x: sending NonSendableKlass) { }
17
17
@@ -25,14 +25,14 @@ public func transferResultTest() -> sending NonSendableKlass { fatalError() }
25
25
// CHECK-LABEL: #if compiler(>=5.3) && $SendingArgsAndResults
26
26
// CHECK-NEXT: public func transferArgAndResultTest(_ x: test.NonSendableKlass, _ y: sending test.NonSendableKlass, _ z: test.NonSendableKlass) -> sending test.NonSendableKlass
27
27
// CHECK-NEXT: #else
28
- // CHECK-NEXT: public func transferArgAndResultTest(_ x: test.NonSendableKlass, _ y: consuming test.NonSendableKlass, _ z: test.NonSendableKlass) -> test.NonSendableKlass
28
+ // CHECK-NEXT: public func transferArgAndResultTest(_ x: test.NonSendableKlass, _ y: __owned test.NonSendableKlass, _ z: test.NonSendableKlass) -> test.NonSendableKlass
29
29
// CHECK-NEXT: #endif
30
30
public func transferArgAndResultTest( _ x: NonSendableKlass , _ y: sending NonSendableKlass, _ z: NonSendableKlass ) -> sending NonSendableKlass { fatalError ( ) }
31
31
32
32
// CHECK-LABEL: #if compiler(>=5.3) && $SendingArgsAndResults
33
33
// CHECK-NEXT: public func argEmbeddedInType(_ fn: (sending test.NonSendableKlass) -> ())
34
34
// CHECK-NEXT: #else
35
- // CHECK-NEXT: public func argEmbeddedInType(_ fn: (consuming test.NonSendableKlass) -> ())
35
+ // CHECK-NEXT: public func argEmbeddedInType(_ fn: (__owned test.NonSendableKlass) -> ())
36
36
// CHECK-NEXT: #endif
37
37
public func argEmbeddedInType( _ fn: ( sending NonSendableKlass) -> ( ) ) { }
38
38
@@ -46,15 +46,15 @@ public func resultEmbeddedInType(_ fn: () -> sending NonSendableKlass) {}
46
46
// CHECK-LABEL: #if compiler(>=5.3) && $SendingArgsAndResults
47
47
// CHECK-NEXT: public func argAndResultEmbeddedInType(_ fn: (test.NonSendableKlass, sending test.NonSendableKlass, test.NonSendableKlass) -> sending test.NonSendableKlass)
48
48
// CHECK-NEXT: #else
49
- // CHECK-NEXT: public func argAndResultEmbeddedInType(_ fn: (test.NonSendableKlass, consuming test.NonSendableKlass, test.NonSendableKlass) -> test.NonSendableKlass)
49
+ // CHECK-NEXT: public func argAndResultEmbeddedInType(_ fn: (test.NonSendableKlass, __owned test.NonSendableKlass, test.NonSendableKlass) -> test.NonSendableKlass)
50
50
// CHECK-NEXT: #endif
51
51
public func argAndResultEmbeddedInType( _ fn: ( NonSendableKlass , sending NonSendableKlass, NonSendableKlass ) -> sending NonSendableKlass) { }
52
52
53
53
public class TestInKlass {
54
54
// CHECK-LABEL: #if compiler(>=5.3) && $SendingArgsAndResults
55
55
// CHECK-NEXT: public func testKlassArg(_ x: sending test.NonSendableKlass)
56
56
// CHECK-NEXT: #else
57
- // CHECK-NEXT: public func testKlassArg(_ x: consuming test.NonSendableKlass)
57
+ // CHECK-NEXT: public func testKlassArg(_ x: __owned test.NonSendableKlass)
58
58
// CHECK-NEXT: #endif
59
59
public func testKlassArg( _ x: sending NonSendableKlass) { fatalError ( ) }
60
60
@@ -68,7 +68,7 @@ public class TestInKlass {
68
68
// CHECK-LABEL: #if compiler(>=5.3) && $SendingArgsAndResults
69
69
// CHECK-NEXT: public func testKlassArgAndResult(_ x: test.NonSendableKlass, _ y: sending test.NonSendableKlass, z: test.NonSendableKlass) -> sending test.NonSendableKlass
70
70
// CHECK-NEXT: #else
71
- // CHECK-NEXT: public func testKlassArgAndResult(_ x: test.NonSendableKlass, _ y: consuming test.NonSendableKlass, z: test.NonSendableKlass) -> test.NonSendableKlass
71
+ // CHECK-NEXT: public func testKlassArgAndResult(_ x: test.NonSendableKlass, _ y: __owned test.NonSendableKlass, z: test.NonSendableKlass) -> test.NonSendableKlass
72
72
// CHECK-NEXT: #endif
73
73
public func testKlassArgAndResult( _ x: NonSendableKlass , _ y: sending NonSendableKlass, z: NonSendableKlass ) -> sending NonSendableKlass { fatalError ( ) }
74
74
}
@@ -77,7 +77,7 @@ public struct TestInStruct {
77
77
// CHECK-LABEL: #if compiler(>=5.3) && $SendingArgsAndResults
78
78
// CHECK-NEXT: public func testKlassArg(_ x: sending test.NonSendableKlass)
79
79
// CHECK-NEXT: #else
80
- // CHECK-NEXT: public func testKlassArg(_ x: consuming test.NonSendableKlass)
80
+ // CHECK-NEXT: public func testKlassArg(_ x: __owned test.NonSendableKlass)
81
81
// CHECK-NEXT: #endif
82
82
public func testKlassArg( _ x: sending NonSendableKlass) { fatalError ( ) }
83
83
@@ -91,7 +91,7 @@ public struct TestInStruct {
91
91
// CHECK-LABEL: #if compiler(>=5.3) && $SendingArgsAndResults
92
92
// CHECK-NEXT: public func testKlassArgAndResult(_ x: test.NonSendableKlass, _ y: sending test.NonSendableKlass, z: test.NonSendableKlass) -> sending test.NonSendableKlass
93
93
// CHECK-NEXT: #else
94
- // CHECK-NEXT: public func testKlassArgAndResult(_ x: test.NonSendableKlass, _ y: consuming test.NonSendableKlass, z: test.NonSendableKlass) -> test.NonSendableKlass
94
+ // CHECK-NEXT: public func testKlassArgAndResult(_ x: test.NonSendableKlass, _ y: __owned test.NonSendableKlass, z: test.NonSendableKlass) -> test.NonSendableKlass
95
95
// CHECK-NEXT: #endif
96
96
public func testKlassArgAndResult( _ x: NonSendableKlass , _ y: sending NonSendableKlass, z: NonSendableKlass ) -> sending NonSendableKlass { fatalError ( ) }
97
97
@@ -114,7 +114,7 @@ public struct TestInStruct {
114
114
// CHECK-NEXT: internal func testUsableFromInlineKlassArg(_ x: sending test.NonSendableKlass)
115
115
// CHECK-NEXT: #else
116
116
// CHECK-NEXT: @usableFromInline
117
- // CHECK-NEXT: internal func testUsableFromInlineKlassArg(_ x: consuming test.NonSendableKlass)
117
+ // CHECK-NEXT: internal func testUsableFromInlineKlassArg(_ x: __owned test.NonSendableKlass)
118
118
// CHECK-NEXT: #endif
119
119
@usableFromInline func testUsableFromInlineKlassArg( _ x: sending NonSendableKlass) { fatalError ( ) }
120
120
@@ -133,7 +133,7 @@ public struct TestInStruct {
133
133
// CHECK-NEXT: internal func testUsableFromInlineKlassArgAndResult(_ x: test.NonSendableKlass, _ y: sending test.NonSendableKlass, z: test.NonSendableKlass) -> sending test.NonSendableKlass
134
134
// CHECK-NEXT: #else
135
135
// CHECK-NEXT: @usableFromInline
136
- // CHECK-NEXT: internal func testUsableFromInlineKlassArgAndResult(_ x: test.NonSendableKlass, _ y: consuming test.NonSendableKlass, z: test.NonSendableKlass) -> test.NonSendableKlass
136
+ // CHECK-NEXT: internal func testUsableFromInlineKlassArgAndResult(_ x: test.NonSendableKlass, _ y: __owned test.NonSendableKlass, z: test.NonSendableKlass) -> test.NonSendableKlass
137
137
// CHECK-NEXT: #endif
138
138
@usableFromInline
139
139
func testUsableFromInlineKlassArgAndResult( _ x: NonSendableKlass , _ y: sending NonSendableKlass, z: NonSendableKlass ) -> sending NonSendableKlass { fatalError ( ) }
@@ -161,7 +161,7 @@ public struct TestInStruct {
161
161
// CHECK-LABEL: #if compiler(>=5.3) && $SendingArgsAndResults
162
162
// CHECK-NEXT: public var publicVarFieldFunctionArg: (sending test.NonSendableKlass) -> ()
163
163
// CHECK-NEXT: #else
164
- // CHECK-NEXT: public var publicVarFieldFunctionArg: (consuming test.NonSendableKlass) -> ()
164
+ // CHECK-NEXT: public var publicVarFieldFunctionArg: (__owned test.NonSendableKlass) -> ()
165
165
// CHECK-NEXT: #endif
166
166
public var publicVarFieldFunctionArg : ( sending NonSendableKlass) -> ( )
167
167
@@ -170,15 +170,15 @@ public struct TestInStruct {
170
170
// CHECK-NEXT: internal var internalVarFieldFunctionArg: (sending test.NonSendableKlass) -> ()
171
171
// CHECK-NEXT: #else
172
172
// CHECK-NEXT: @usableFromInline
173
- // CHECK-NEXT: internal var internalVarFieldFunctionArg: (consuming test.NonSendableKlass) -> ()
173
+ // CHECK-NEXT: internal var internalVarFieldFunctionArg: (__owned test.NonSendableKlass) -> ()
174
174
// CHECK-NEXT: #endif
175
175
@usableFromInline
176
176
var internalVarFieldFunctionArg : ( sending NonSendableKlass) -> ( )
177
177
178
178
// CHECK-LABEL: #if compiler(>=5.3) && $SendingArgsAndResults
179
179
// CHECK-NEXT: public let publicLetFieldFunctionArg: (sending test.NonSendableKlass) -> ()
180
180
// CHECK-NEXT: #else
181
- // CHECK-NEXT: public let publicLetFieldFunctionArg: (consuming test.NonSendableKlass) -> ()
181
+ // CHECK-NEXT: public let publicLetFieldFunctionArg: (__owned test.NonSendableKlass) -> ()
182
182
// CHECK-NEXT: #endif
183
183
public let publicLetFieldFunctionArg : ( sending NonSendableKlass) -> ( )
184
184
@@ -187,7 +187,7 @@ public struct TestInStruct {
187
187
// CHECK-NEXT: internal let internalLetFieldFunctionArg: (sending test.NonSendableKlass) -> ()
188
188
// CHECK-NEXT: #else
189
189
// CHECK-NEXT: @usableFromInline
190
- // CHECK-NEXT: internal let internalLetFieldFunctionArg: (consuming test.NonSendableKlass) -> ()
190
+ // CHECK-NEXT: internal let internalLetFieldFunctionArg: (__owned test.NonSendableKlass) -> ()
191
191
// CHECK-NEXT: #endif
192
192
@usableFromInline
193
193
let internalLetFieldFunctionArg : ( sending NonSendableKlass) -> ( )
@@ -226,7 +226,7 @@ public struct TestInStruct {
226
226
// CHECK-LABEL: #if compiler(>=5.3) && $SendingArgsAndResults // Suppression Count: 25
227
227
// CHECK-NEXT: public var publicGlobal: (sending test.NonSendableKlass) -> ()
228
228
// CHECK-NEXT: #else
229
- // CHECK-NEXT: public var publicGlobal: (consuming test.NonSendableKlass) -> ()
229
+ // CHECK-NEXT: public var publicGlobal: (__owned test.NonSendableKlass) -> ()
230
230
// CHECK-NEXT: #endif
231
231
public var publicGlobal : ( sending NonSendableKlass) -> ( ) = { x in fatalError ( ) }
232
232
@@ -235,7 +235,7 @@ public var publicGlobal: (sending NonSendableKlass) -> () = { x in fatalError()
235
235
// CHECK-NEXT: internal var usableFromInlineGlobal: (sending test.NonSendableKlass) -> ()
236
236
// CHECK-NEXT: #else
237
237
// CHECK-NEXT: @usableFromInline
238
- // CHECK-NEXT: internal var usableFromInlineGlobal: (consuming test.NonSendableKlass) -> ()
238
+ // CHECK-NEXT: internal var usableFromInlineGlobal: (__owned test.NonSendableKlass) -> ()
239
239
// CHECK-NEXT: #endif
240
240
@usableFromInline
241
241
internal var usableFromInlineGlobal : ( sending NonSendableKlass) -> ( ) = { x in fatalError ( ) }
0 commit comments