@@ -49,7 +49,9 @@ extension Int8 : _ObjectiveCBridgeable {
49
49
}
50
50
51
51
public static func _forceBridgeFromObjectiveC( _ x: NSNumber , result: inout Int8 ? ) {
52
- result = _unconditionallyBridgeFromObjectiveC ( x)
52
+ if !_conditionallyBridgeFromObjectiveC( x, result: & result) {
53
+ fatalError ( " Unable to bridge \( type ( of: x) ) to \( self ) " )
54
+ }
53
55
}
54
56
55
57
public static func _conditionallyBridgeFromObjectiveC( _ x: NSNumber , result: inout Int8 ? ) -> Bool {
@@ -87,7 +89,9 @@ extension UInt8 : _ObjectiveCBridgeable {
87
89
}
88
90
89
91
public static func _forceBridgeFromObjectiveC( _ x: NSNumber , result: inout UInt8 ? ) {
90
- result = _unconditionallyBridgeFromObjectiveC ( x)
92
+ if !_conditionallyBridgeFromObjectiveC( x, result: & result) {
93
+ fatalError ( " Unable to bridge \( type ( of: x) ) to \( self ) " )
94
+ }
91
95
}
92
96
93
97
public static func _conditionallyBridgeFromObjectiveC( _ x: NSNumber , result: inout UInt8 ? ) -> Bool {
@@ -125,7 +129,9 @@ extension Int16 : _ObjectiveCBridgeable {
125
129
}
126
130
127
131
public static func _forceBridgeFromObjectiveC( _ x: NSNumber , result: inout Int16 ? ) {
128
- result = _unconditionallyBridgeFromObjectiveC ( x)
132
+ if !_conditionallyBridgeFromObjectiveC( x, result: & result) {
133
+ fatalError ( " Unable to bridge \( type ( of: x) ) to \( self ) " )
134
+ }
129
135
}
130
136
131
137
public static func _conditionallyBridgeFromObjectiveC( _ x: NSNumber , result: inout Int16 ? ) -> Bool {
@@ -163,7 +169,9 @@ extension UInt16 : _ObjectiveCBridgeable {
163
169
}
164
170
165
171
public static func _forceBridgeFromObjectiveC( _ x: NSNumber , result: inout UInt16 ? ) {
166
- result = _unconditionallyBridgeFromObjectiveC ( x)
172
+ if !_conditionallyBridgeFromObjectiveC( x, result: & result) {
173
+ fatalError ( " Unable to bridge \( type ( of: x) ) to \( self ) " )
174
+ }
167
175
}
168
176
169
177
public static func _conditionallyBridgeFromObjectiveC( _ x: NSNumber , result: inout UInt16 ? ) -> Bool {
@@ -201,7 +209,9 @@ extension Int32 : _ObjectiveCBridgeable {
201
209
}
202
210
203
211
public static func _forceBridgeFromObjectiveC( _ x: NSNumber , result: inout Int32 ? ) {
204
- result = _unconditionallyBridgeFromObjectiveC ( x)
212
+ if !_conditionallyBridgeFromObjectiveC( x, result: & result) {
213
+ fatalError ( " Unable to bridge \( type ( of: x) ) to \( self ) " )
214
+ }
205
215
}
206
216
207
217
public static func _conditionallyBridgeFromObjectiveC( _ x: NSNumber , result: inout Int32 ? ) -> Bool {
@@ -239,7 +249,9 @@ extension UInt32 : _ObjectiveCBridgeable {
239
249
}
240
250
241
251
public static func _forceBridgeFromObjectiveC( _ x: NSNumber , result: inout UInt32 ? ) {
242
- result = _unconditionallyBridgeFromObjectiveC ( x)
252
+ if !_conditionallyBridgeFromObjectiveC( x, result: & result) {
253
+ fatalError ( " Unable to bridge \( type ( of: x) ) to \( self ) " )
254
+ }
243
255
}
244
256
245
257
public static func _conditionallyBridgeFromObjectiveC( _ x: NSNumber , result: inout UInt32 ? ) -> Bool {
@@ -277,7 +289,9 @@ extension Int64 : _ObjectiveCBridgeable {
277
289
}
278
290
279
291
public static func _forceBridgeFromObjectiveC( _ x: NSNumber , result: inout Int64 ? ) {
280
- result = _unconditionallyBridgeFromObjectiveC ( x)
292
+ if !_conditionallyBridgeFromObjectiveC( x, result: & result) {
293
+ fatalError ( " Unable to bridge \( type ( of: x) ) to \( self ) " )
294
+ }
281
295
}
282
296
283
297
public static func _conditionallyBridgeFromObjectiveC( _ x: NSNumber , result: inout Int64 ? ) -> Bool {
@@ -315,7 +329,9 @@ extension UInt64 : _ObjectiveCBridgeable {
315
329
}
316
330
317
331
public static func _forceBridgeFromObjectiveC( _ x: NSNumber , result: inout UInt64 ? ) {
318
- result = _unconditionallyBridgeFromObjectiveC ( x)
332
+ if !_conditionallyBridgeFromObjectiveC( x, result: & result) {
333
+ fatalError ( " Unable to bridge \( type ( of: x) ) to \( self ) " )
334
+ }
319
335
}
320
336
321
337
public static func _conditionallyBridgeFromObjectiveC( _ x: NSNumber , result: inout UInt64 ? ) -> Bool {
@@ -353,7 +369,9 @@ extension Int : _ObjectiveCBridgeable {
353
369
}
354
370
355
371
public static func _forceBridgeFromObjectiveC( _ x: NSNumber , result: inout Int ? ) {
356
- result = _unconditionallyBridgeFromObjectiveC ( x)
372
+ if !_conditionallyBridgeFromObjectiveC( x, result: & result) {
373
+ fatalError ( " Unable to bridge \( type ( of: x) ) to \( self ) " )
374
+ }
357
375
}
358
376
359
377
public static func _conditionallyBridgeFromObjectiveC( _ x: NSNumber , result: inout Int ? ) -> Bool {
@@ -391,7 +409,9 @@ extension UInt : _ObjectiveCBridgeable {
391
409
}
392
410
393
411
public static func _forceBridgeFromObjectiveC( _ x: NSNumber , result: inout UInt ? ) {
394
- result = _unconditionallyBridgeFromObjectiveC ( x)
412
+ if !_conditionallyBridgeFromObjectiveC( x, result: & result) {
413
+ fatalError ( " Unable to bridge \( type ( of: x) ) to \( self ) " )
414
+ }
395
415
}
396
416
397
417
public static func _conditionallyBridgeFromObjectiveC( _ x: NSNumber , result: inout UInt ? ) -> Bool {
@@ -437,7 +457,9 @@ extension Float : _ObjectiveCBridgeable {
437
457
}
438
458
439
459
public static func _forceBridgeFromObjectiveC( _ x: NSNumber , result: inout Float ? ) {
440
- result = _unconditionallyBridgeFromObjectiveC ( x)
460
+ if !_conditionallyBridgeFromObjectiveC( x, result: & result) {
461
+ fatalError ( " Unable to bridge \( type ( of: x) ) to \( self ) " )
462
+ }
441
463
}
442
464
443
465
public static func _conditionallyBridgeFromObjectiveC( _ x: NSNumber , result: inout Float ? ) -> Bool {
@@ -488,7 +510,9 @@ extension Double : _ObjectiveCBridgeable {
488
510
}
489
511
490
512
public static func _forceBridgeFromObjectiveC( _ x: NSNumber , result: inout Double ? ) {
491
- result = _unconditionallyBridgeFromObjectiveC ( x)
513
+ if !_conditionallyBridgeFromObjectiveC( x, result: & result) {
514
+ fatalError ( " Unable to bridge \( type ( of: x) ) to \( self ) " )
515
+ }
492
516
}
493
517
494
518
public static func _conditionallyBridgeFromObjectiveC( _ x: NSNumber , result: inout Double ? ) -> Bool {
@@ -533,7 +557,9 @@ extension Bool : _ObjectiveCBridgeable {
533
557
}
534
558
535
559
public static func _forceBridgeFromObjectiveC( _ x: NSNumber , result: inout Bool ? ) {
536
- result = _unconditionallyBridgeFromObjectiveC ( x)
560
+ if !_conditionallyBridgeFromObjectiveC( x, result: & result) {
561
+ fatalError ( " Unable to bridge \( type ( of: x) ) to \( self ) " )
562
+ }
537
563
}
538
564
539
565
public static func _conditionallyBridgeFromObjectiveC( _ x: NSNumber , result: inout Bool ? ) -> Bool {
0 commit comments