- Notifications
You must be signed in to change notification settings - Fork 10.5k
/
Copy pathavailability.swift
664 lines (563 loc) · 46.9 KB
/
availability.swift
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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
// RUN: %empty-directory(%t)
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-module -o %t %s -disable-objc-attr-requires-foundation-module
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -parse-as-library %t/availability.swiftmodule -typecheck -verify -emit-objc-header-path %t/availability.h -import-objc-header %S/../Inputs/empty.h -disable-objc-attr-requires-foundation-module
// RUN: %FileCheck %s < %t/availability.h
// RUN: %check-in-clang %t/availability.h
// REQUIRES: objc_interop
// CHECK-LABEL: @interface Availability{{$}}
// CHECK-NEXT: - (void)alwaysAvailable;
// CHECK-NEXT: - (void)alwaysUnavailable SWIFT_UNAVAILABLE;
// CHECK-NEXT: - (void)alwaysUnavailableTwo SWIFT_UNAVAILABLE_MSG("stuff happened");
// CHECK-NEXT: - (void)alwaysUnavailableThree SWIFT_UNAVAILABLE_MSG("'alwaysUnavailableThree' has been renamed to 'bar'");
// CHECK-NEXT: - (void)alwaysUnavailableFour SWIFT_UNAVAILABLE_MSG("'alwaysUnavailableFour' has been renamed to 'baz': whatever");
// CHECK-NEXT: - (void)alwaysDeprecated SWIFT_DEPRECATED;
// CHECK-NEXT: - (void)alwaysDeprecatedTwo SWIFT_DEPRECATED_MSG("it's old");
// CHECK-NEXT: - (void)alwaysDeprecatedThree SWIFT_DEPRECATED_MSG("", "qux");
// CHECK-NEXT: - (void)alwaysDeprecatedFour SWIFT_DEPRECATED_MSG("use something else", "quux");
// CHECK-NEXT: - (void)escapeMessage SWIFT_DEPRECATED_MSG("one\ntwo\tthree\rfour\\ \"five\"{U+0000}six");
// CHECK-NEXT: - (void)unicodeMessage SWIFT_DEPRECATED_MSG("über");
// CHECK-NEXT: - (void)singlePlatShorthand SWIFT_AVAILABILITY(macos,introduced=10.10);
// CHECK-NEXT: - (void)multiPlatShorthand
// CHECK-DAG: SWIFT_AVAILABILITY(macos,introduced=10.11)
// CHECK-DAG: SWIFT_AVAILABILITY(ios,introduced=9.0)
// CHECK-DAG: SWIFT_AVAILABILITY(tvos,introduced=9.0)
// CHECK-DAG: SWIFT_AVAILABILITY(watchos,introduced=3.0)
// CHECK-NEXT: - (void)singlePlatIntroduced SWIFT_AVAILABILITY(ios,introduced=9.0);
// CHECK-NEXT: - (void)singlePlatDeprecated SWIFT_AVAILABILITY(macos,deprecated=10.10);
// CHECK-NEXT: - (void)singlePlatDeprecatedTwo SWIFT_AVAILABILITY(macos,deprecated=10.10,message="'singlePlatDeprecatedTwo' has been renamed to 'flubber'");
// CHECK-NEXT: - (void)singlePlatDeprecatedThree SWIFT_AVAILABILITY(macos,deprecated=10.10,message="'singlePlatDeprecatedThree' has been renamed to 'fozzybear': we changed our minds");
// CHECK-NEXT: - (void)singlePlatDeprecatedAlways SWIFT_AVAILABILITY(tvos,deprecated=0.0.1);
// CHECK-NEXT: - (void)singlePlatDeprecatedAlwaysTwo SWIFT_AVAILABILITY(macos,introduced=10.7,deprecated=10.7);
// CHECK-NEXT: - (void)singlePlatUnavailable SWIFT_AVAILABILITY(watchos,unavailable);
// CHECK-NEXT: - (void)singlePlatUnavailableTwo SWIFT_AVAILABILITY(watchos,unavailable);
// CHECK-NEXT: - (void)singlePlatObsoleted SWIFT_AVAILABILITY(ios,obsoleted=8.1);
// CHECK-NEXT: - (void)singlePlatCombined SWIFT_AVAILABILITY(macos,introduced=10.7,deprecated=10.9,obsoleted=10.10);
// CHECK-NEXT: - (void)multiPlatCombined
// CHECK-DAG: SWIFT_AVAILABILITY(macos,introduced=10.6,deprecated=10.8,obsoleted=10.9)
// CHECK-DAG: SWIFT_AVAILABILITY(ios,introduced=7.0,deprecated=9.0,obsoleted=10.0)
// CHECK-NEXT: - (void)platUnavailableMessage SWIFT_AVAILABILITY(macos,unavailable,message="help I'm trapped in an availability factory");
// CHECK-NEXT: - (void)platUnavailableRename SWIFT_AVAILABILITY(macos,unavailable,message="'platUnavailableRename' has been renamed to 'plea'");
// CHECK-NEXT: - (void)platUnavailableRenameWithMessage SWIFT_AVAILABILITY(macos,unavailable,message="'platUnavailableRenameWithMessage' has been renamed to 'anotherPlea': still trapped");
// CHECK-NEXT: - (void)extensionUnavailable
// CHECK-DAG: SWIFT_AVAILABILITY(macos_app_extension,unavailable)
// CHECK-DAG: SWIFT_AVAILABILITY(ios_app_extension,unavailable)
// CHECK-DAG: SWIFT_AVAILABILITY(tvos_app_extension,unavailable)
// CHECK-DAG: SWIFT_AVAILABILITY(watchos_app_extension,unavailable)
// CHECK-SAME: ;
// CHECK-NEXT: - (void)overloadMethodWithFirst:(NSInteger)first second:(NSInteger)second;
// CHECK-NEXT: - (void)deprecatedMethodRenamedToOverloadMethodWithFirst:(NSInteger)first second:(NSInteger)second SWIFT_DEPRECATED_MSG("", "overloadMethodWithFirst:second:");
// CHECK-NEXT: - (void)deprecatedOnMacOSMethodRenamedToOverloadMethodWithFirst:(NSInteger)first second:(NSInteger)second SWIFT_AVAILABILITY(macos,deprecated=0.0.1,message="'deprecatedOnMacOSMethodRenamedToOverloadMethod' has been renamed to 'overloadMethodWithFirst:second:'");
// CHECK-NEXT: - (void)unavailableMethodRenamedToOverloadMethodWithFirst:(NSInteger)first second:(NSInteger)second SWIFT_UNAVAILABLE_MSG("'unavailableMethodRenamedToOverloadMethod' has been renamed to 'overloadMethodWithFirst:second:'");
// CHECK-NEXT: - (void)unavailableOnMacOSMethodRenamedToOverloadMethodWithFirst:(NSInteger)first second:(NSInteger)second SWIFT_AVAILABILITY(macos,unavailable,message="'unavailableOnMacOSMethodRenamedToOverloadMethod' has been renamed to 'overloadMethodWithFirst:second:'");
// CHECK-NEXT: - (void)firstOverloadingMethodWithDifferenceNameWithFirst:(NSInteger)first second:(NSInteger)second;
// CHECK-NEXT: - (void)secondOverloadingMethodWithDifferenceNameWithFirst:(double)first second:(double)second;
// CHECK-NEXT: - (void)deprecatedMethodRenamedToOverloadMethodWithDifferenceNameWithFirst:(NSInteger)first second:(NSInteger)second
// CHECK-SAME: SWIFT_DEPRECATED_MSG("", "firstOverloadingMethodWithDifferenceNameWithFirst:second:");
// CHECK-NEXT: - (void)deprecatedOnMacOSMethodRenamedToOverloadMethodWithDifferenceNameWithFirst:(NSInteger)first second:(NSInteger)second
// CHECK-SAME: SWIFT_AVAILABILITY(macos,deprecated=0.0.1,message="'deprecatedOnMacOSMethodRenamedToOverloadMethodWithDifferenceName' has been renamed to 'firstOverloadingMethodWithDifferenceNameWithFirst:second:'");
// CHECK-NEXT: - (void)unavailableMethodRenamedToOverloadMethodWithDifferenceNameWithFirst:(NSInteger)first second:(NSInteger)second
// CHECK-SAME: SWIFT_UNAVAILABLE_MSG("'unavailableMethodRenamedToOverloadMethodWithDifferenceName' has been renamed to 'firstOverloadingMethodWithDifferenceNameWithFirst:second:'");
// CHECK-NEXT: - (void)unavailableOnMacOSMethodRenamedToOverloadMethodWithDifferenceNameWithFirst:(NSInteger)first second:(NSInteger)second
// CHECK-SAME: SWIFT_AVAILABILITY(macos,unavailable,message="'unavailableOnMacOSMethodRenamedToOverloadMethodWithDifferenceName' has been renamed to 'firstOverloadingMethodWithDifferenceNameWithFirst:second:'");
// CHECK-NEXT: + (void)deprecatedAvailabilityWithValue:(NSInteger)value;
// CHECK-NEXT: - (void)deprecatedInstanceMethodRenamedToClassMethodWithValue:(NSInteger)value
// CHECK-SAME: SWIFT_DEPRECATED_MSG("This method has a renamed attribute point to class method instead of a instance method. It should show the Swift name here", "classMethodWithACustomObjCName(x:)");
// CHECK-NEXT: - (void)deprecatedOnMacOSInstanceMethodRenamedToClassMethodWithValue:(NSInteger)value
// CHECK-SAME: SWIFT_AVAILABILITY(macos,deprecated=0.0.1,message="'deprecatedOnMacOSInstanceMethodRenamedToClassMethod' has been renamed to 'classMethodWithACustomObjCName(x:)': This method has a renamed attribute point to class method instead of a instance method. It should show the Swift name here");
// CHECK-NEXT: - (void)unavailableInstanceMethodRenamedToClassMethodWithValue:(NSInteger)value
// CHECK-SAME: SWIFT_UNAVAILABLE_MSG("'unavailableInstanceMethodRenamedToClassMethod' has been renamed to 'classMethodWithACustomObjCName(x:)': This method has a renamed attribute point to class method instead of a instance method. It should show the Swift name here");
// CHECK-NEXT: - (void)unavailableOnMacOSInstanceMethodRenamedToClassMethodWithValue:(NSInteger)value
// CHECK-SAME: SWIFT_AVAILABILITY(macos,unavailable,message="'unavailableOnMacOSInstanceMethodRenamedToClassMethod' has been renamed to 'classMethodWithACustomObjCName(x:)': This method has a renamed attribute point to class method instead of a instance method. It should show the Swift name here");
// CHECK-NEXT: + (void)deprecatedClassMethodRenamedToInstanceMethodWithValue:(NSInteger)value
// CHECK-SAME: SWIFT_DEPRECATED_MSG("This method has a renamed attribute point to instance method instead of a class method. It should show the Swift name here", "instanceMethodWithACustomObjCName(x:)");
// CHECK-NEXT: + (void)deprecatedOnMacOSClassMethodRenamedToInstanceMethodWithValue:(NSInteger)value
// CHECK-SAME: SWIFT_AVAILABILITY(macos,deprecated=0.0.1,message="'deprecatedOnMacOSClassMethodRenamedToInstanceMethod' has been renamed to 'instanceMethodWithACustomObjCName(x:)': This method has a renamed attribute point to instance method instead of a class method. It should show the Swift name here");
// CHECK-NEXT: + (void)unavailableClassMethodRenamedToInstanceMethodWithValue:(NSInteger)value
// CHECK-SAME: SWIFT_UNAVAILABLE_MSG("'unavailableClassMethodRenamedToInstanceMethod' has been renamed to 'instanceMethodWithACustomObjCName(x:)': This method has a renamed attribute point to instance method instead of a class method. It should show the Swift name here");
// CHECK-NEXT: + (void)unavailableOnMacOSClassMethodRenamedToInstanceMethodWithValue:(NSInteger)value
// CHECK-SAME: SWIFT_AVAILABILITY(macos,unavailable,message="'unavailableOnMacOSClassMethodRenamedToInstanceMethod' has been renamed to 'instanceMethodWithACustomObjCName(x:)': This method has a renamed attribute point to instance method instead of a class method. It should show the Swift name here");
// CHECK-NEXT: - (void)customObjCNameInstanceMethodWithX:(NSInteger)x;
// CHECK-NEXT: + (void)customObjCNameClassMethodWithX:(NSInteger)x;
// CHECK-NEXT: - (void)deprecatedMethodRenamedToMethodNotAvailableToObjC
// CHECK-SAME: SWIFT_DEPRECATED_MSG("", "methodNotAvailableToObjC()");
// CHECK-NEXT: - (void)deprecatedOnMacOSMethodRenamedToMethodNotAvailableToObjC
// CHECK-SAME: SWIFT_AVAILABILITY(macos,deprecated=0.0.1,message="'deprecatedOnMacOSMethodRenamedToMethodNotAvailableToObjC' has been renamed to 'methodNotAvailableToObjC()'");
// CHECK-NEXT: - (void)unavailableMethodRenamedToMethodNotAvailableToObjC
// CHECK-SAME: SWIFT_UNAVAILABLE_MSG("'unavailableMethodRenamedToMethodNotAvailableToObjC' has been renamed to 'methodNotAvailableToObjC()'");
// CHECK-NEXT: - (void)unavailableOnMacOSMethodRenamedToMethodNotAvailableToObjC
// CHECK-SAME: SWIFT_AVAILABILITY(macos,unavailable,message="'unavailableOnMacOSMethodRenamedToMethodNotAvailableToObjC' has been renamed to 'methodNotAvailableToObjC()'");
// CHECK-NEXT: - (void)deprecatedMethodRenamedToSimpleProperty SWIFT_DEPRECATED_MSG("", "simpleProperty");
// CHECK-NEXT: - (void)deprecatedOnMacOSMethodRenamedToSimpleProperty
// CHECK-SAME: SWIFT_AVAILABILITY(macos,deprecated=0.0.1,message="'deprecatedOnMacOSMethodRenamedToSimpleProperty' has been renamed to 'simpleProperty'");
// CHECK-NEXT: - (void)unavailableMethodRenamedToSimpleProperty
// CHECK-SAME: SWIFT_UNAVAILABLE_MSG("'unavailableMethodRenamedToSimpleProperty' has been renamed to 'simpleProperty'");
// CHECK-NEXT: - (void)unavailableOnMacOSMethodRenamedToSimpleProperty
// CHECK-SAME: SWIFT_AVAILABILITY(macos,unavailable,message="'unavailableOnMacOSMethodRenamedToSimpleProperty' has been renamed to 'simpleProperty'");
// CHECK-NEXT: - (NSInteger)methodReturningInt SWIFT_WARN_UNUSED_RESULT;
// CHECK-NEXT: - (NSInteger)methodWithoutCustomObjCNameWithValue:(NSInteger)value SWIFT_WARN_UNUSED_RESULT;
// CHECK-NEXT: - (NSInteger)deprecatedMethodRenamedToMethodWithoutCustomObjCNameWithValue:(NSInteger)value SWIFT_WARN_UNUSED_RESULT
// CHECK-SAME: SWIFT_DEPRECATED_MSG("", "methodWithoutCustomObjCNameWithValue:");
// CHECK-NEXT: - (NSInteger)deprecatedOnMacOSMethodRenamedToMethodWithoutCustomObjCNameWithValue:(NSInteger)value SWIFT_WARN_UNUSED_RESULT
// CHECK-SAME: SWIFT_AVAILABILITY(macos,deprecated=0.0.1,message="'deprecatedOnMacOSMethodRenamedToMethodWithoutCustomObjCName' has been renamed to 'methodWithoutCustomObjCNameWithValue:'");
// CHECK-NEXT: - (NSInteger)unavailableMethodRenamedToMethodWithoutCustomObjCNameWithValue:(NSInteger)value SWIFT_WARN_UNUSED_RESULT
// CHECK-SAME: SWIFT_UNAVAILABLE_MSG("'unavailableMethodRenamedToMethodWithoutCustomObjCName' has been renamed to 'methodWithoutCustomObjCNameWithValue:'");
// CHECK-NEXT: - (NSInteger)unavailableOnMacOSMethodRenamedToMethodWithoutCustomObjCNameWithValue:(NSInteger)value SWIFT_WARN_UNUSED_RESULT
// CHECK-SAME: SWIFT_AVAILABILITY(macos,unavailable,message="'unavailableOnMacOSMethodRenamedToMethodWithoutCustomObjCName' has been renamed to 'methodWithoutCustomObjCNameWithValue:'");
// CHECK-NEXT: + (void)unavailableAvailabilityWithValue:(NSInteger)value;
// CHECK-NEXT: + (void)makeDeprecatedAvailabilityWithValue:(NSInteger)value
// CHECK-SAME: SWIFT_DEPRECATED_MSG("use something else", "deprecatedAvailabilityWithValue:");
// CHECK-NEXT: + (void)makeDeprecatedOnMacOSAvailabilityWithValue:(NSInteger)value
// CHECK-SAME: SWIFT_AVAILABILITY(macos,deprecated=0.0.1,message="'__makeDeprecatedOnMacOSAvailability' has been renamed to 'deprecatedAvailabilityWithValue:': use something else");
// CHECK-NEXT: + (void)makeUnavailableAvailabilityWithValue:(NSInteger)value
// CHECK-SAME: SWIFT_UNAVAILABLE_MSG("'__makeUnavailableAvailability' has been renamed to 'unavailableAvailabilityWithValue:': use something else");
// CHECK-NEXT: + (void)makeUnavailableOnMacOSAvailabilityWithValue:(NSInteger)value
// CHECK-SAME: SWIFT_AVAILABILITY(macos,unavailable,message="'__makeUnavailableOnMacOSAvailability' has been renamed to 'unavailableAvailabilityWithValue:': use something else");
// CHECK-NEXT: - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
// CHECK-NEXT: - (nonnull instancetype)initWithX:(NSInteger)x OBJC_DESIGNATED_INITIALIZER SWIFT_AVAILABILITY(macos,introduced=10.10);
// CHECK-NEXT: - (nonnull instancetype)initWithFirst:(NSInteger)first second:(NSInteger)second OBJC_DESIGNATED_INITIALIZER;
// CHECK-NEXT: - (nonnull instancetype)initWithDeprecatedFirst:(NSInteger)first second:(NSInteger)second OBJC_DESIGNATED_INITIALIZER
// CHECK-SAME: SWIFT_DEPRECATED_MSG("", "initWithFirst:second:");
// CHECK-NEXT: - (nonnull instancetype)initWithDeprecatedOnMacOSFirst:(NSInteger)first second:(NSInteger)second OBJC_DESIGNATED_INITIALIZER
// CHECK-SAME: SWIFT_AVAILABILITY(macos,deprecated=0.0.1,message="'init' has been renamed to 'initWithFirst:second:'");
// CHECK-NEXT: - (nonnull instancetype)initWithUnavailableFirst:(NSInteger)first second:(NSInteger)second OBJC_DESIGNATED_INITIALIZER
// CHECK-SAME: SWIFT_UNAVAILABLE_MSG("'init' has been renamed to 'initWithFirst:second:'");
// CHECK-NEXT: - (nonnull instancetype)initWithUnavailableOnMacOSFirst:(NSInteger)first second:(NSInteger)second OBJC_DESIGNATED_INITIALIZER
// CHECK-SAME: SWIFT_AVAILABILITY(macos,unavailable,message="'init' has been renamed to 'initWithFirst:second:'");
// CHECK-NEXT: @property (nonatomic, readonly) NSInteger simpleProperty;
// CHECK-NEXT: @property (nonatomic) NSInteger alwaysUnavailableProperty SWIFT_UNAVAILABLE_MSG("'alwaysUnavailableProperty' has been renamed to 'baz': whatever");
// CHECK-NEXT: @property (nonatomic, readonly) NSInteger alwaysDeprecatedProperty SWIFT_DEPRECATED_MSG("use something else", "quux");
// CHECK-NEXT: @property (nonatomic, readonly) NSInteger replaceForDeprecatedObjCProperty;
// CHECK-NEXT: @property (nonatomic, readonly) NSInteger numberOfReplaceableDeprecatedObjCProperty
// CHECK-SAME: SWIFT_DEPRECATED_MSG("use something else", "replaceForDeprecatedObjCProperty");
// CHECK-NEXT: @property (nonatomic, readonly) NSInteger numberOfReplaceableDeprecatedOnMacOSObjCProperty
// CHECK-SAME: SWIFT_AVAILABILITY(macos,deprecated=0.0.1,message="'replaceableDeprecatedOnMacOSObjCProperty' has been renamed to 'replaceForDeprecatedObjCProperty': use something else");
// CHECK-NEXT: @property (nonatomic, readonly) NSInteger replaceForUnavailableObjCProperty;
// CHECK-NEXT: @property (nonatomic, readonly) NSInteger numberOfReplaceableUnavailableObjCProperty
// CHECK-SAME: SWIFT_UNAVAILABLE_MSG("'replaceableUnavailableObjCProperty' has been renamed to 'replaceForUnavailableObjCProperty': use something else");
// CHECK-NEXT: @property (nonatomic, readonly) NSInteger numberOfReplaceableUnavailableOnMacOSObjCProperty
// CHECK-SAME: SWIFT_AVAILABILITY(macos,unavailable,message="'replaceableUnavailableOnMacOSObjCProperty' has been renamed to 'replaceForUnavailableObjCProperty': use something else");
// CHECK-NEXT: @property (nonatomic, readonly, strong) Availability * _Null_unspecified singlePlatCombinedPropertyClass
// CHECK-SAME: SWIFT_AVAILABILITY(macos,introduced=10.7,deprecated=10.9,obsoleted=10.10);
// CHECK-NEXT: @property (nonatomic, readonly) NSInteger platformUnavailableRenameWithMessageProperty
// CHECK-SAME: SWIFT_AVAILABILITY(macos,unavailable,message="'platformUnavailableRenameWithMessageProperty' has been renamed to 'anotherPlea': still trapped");
// CHECK-NEXT: @property (nonatomic, readonly) NSInteger deprecatedPropertyRenamedToMethod
// CHECK-SAME: SWIFT_DEPRECATED_MSG("", "simpleMethodReturningInt()");
// CHECK-NEXT: @property (nonatomic, readonly) NSInteger deprecatedOnMacOSPropertyRenamedToMethod
// CHECK-SAME: SWIFT_AVAILABILITY(macos,deprecated=0.0.1,message="'deprecatedOnMacOSPropertyRenamedToMethod' has been renamed to 'simpleMethodReturningInt()'");
// CHECK-NEXT: @property (nonatomic, readonly) NSInteger unavailablePropertyRenamedToMethod
// CHECK-SAME: SWIFT_UNAVAILABLE_MSG("'unavailablePropertyRenamedToMethod' has been renamed to 'simpleMethodReturningInt()'");
// CHECK-NEXT: @property (nonatomic, readonly) NSInteger unavailableOnMacOSPropertyRenamedToMethod
// CHECK-SAME: SWIFT_AVAILABILITY(macos,unavailable,message="'unavailableOnMacOSPropertyRenamedToMethod' has been renamed to 'simpleMethodReturningInt()'");
// CHECK-NEXT: @end
// CHECK-LABEL: {{^}}SWIFT_AVAILABILITY(macos,introduced=999){{$}}
// CHECK-NEXT: @interface Availability (SWIFT_EXTENSION(availability))
// CHECK-NEXT: - (void)extensionAvailability:(WholeClassAvailability * _Nonnull)_;
// CHECK-NEXT: @property (nonatomic, readonly) NSInteger propertyDeprecatedInsideExtension SWIFT_AVAILABILITY(macos,deprecated=10.10);
// CHECK-NEXT: @end
// CHECK-LABEL: @interface AvailabilitySub
// CHECK-NEXT: - (nonnull instancetype)init SWIFT_UNAVAILABLE;
// CHECK-NEXT: + (nonnull instancetype)new SWIFT_DEPRECATED_MSG("-init is unavailable");
// CHECK-NEXT: - (nonnull instancetype)initWithX:(NSInteger)x SWIFT_UNAVAILABLE;
// CHECK-NEXT: - (nonnull instancetype)initWithDeprecatedZ:(NSInteger)deprecatedZ OBJC_DESIGNATED_INITIALIZER SWIFT_DEPRECATED_MSG("init(deprecatedZ:) was deprecated. Use the new one instead", "initWithNewZ:")
// CHECK-NEXT: - (nonnull instancetype)initWithNewZ:(NSInteger)z OBJC_DESIGNATED_INITIALIZER;
// CHECK-NEXT: - (nonnull instancetype)initWithFirst:(NSInteger)first second:(NSInteger)second SWIFT_UNAVAILABLE;
// CHECK-NEXT: - (nonnull instancetype)initWithDeprecatedFirst:(NSInteger)first second:(NSInteger)second SWIFT_UNAVAILABLE;
// CHECK-NEXT: - (nonnull instancetype)initWithDeprecatedOnMacOSFirst:(NSInteger)first second:(NSInteger)second SWIFT_UNAVAILABLE;
// CHECK: @end
// CHECK-LABEL: SWIFT_AVAILABILITY(macos,deprecated=0.0.1,message="'DeprecatedAvailability' has been renamed to 'SWTReplacementAvailable'")
// CHECK-LABEL: @interface DeprecatedAvailability
// CHECK-NEXT: - (void)deprecatedMethodInDeprecatedClassWithPrimitiveParametersWithFirst:(NSInteger)first second:(NSInteger)second
// CHECK-SAME: SWIFT_DEPRECATED_MSG("use method in another class instead", "ReplacementAvailable.methodReplacingInReplacementClassWithPrimitiveParameters(first:second:)")
// CHECK-NEXT: - (void)deprecatedOnMacOSMethodInDeprecatedClassWithPrimitiveParametersWithFirst:(NSInteger)first second:(NSInteger)second
// CHECK-SAME: SWIFT_AVAILABILITY(macos,deprecated=0.0.1,message="'deprecatedOnMacOSMethodInDeprecatedClassWithPrimitiveParameters' has been renamed to 'ReplacementAvailable.methodReplacingInReplacementClassWithPrimitiveParameters(first:second:)': use method in another class instead");
// CHECK-NEXT: - (void)deprecatedMethodInDeprecatedClassWithClassObjectParametersWithFirst:(SWTReplacementAvailable * _Nonnull)first second:(SWTReplacementAvailable * _Nonnull)second
// CHECK-SAME: SWIFT_DEPRECATED_MSG("use method in another class instead", "ReplacementAvailable.methodReplacingInReplacementClassWithClassObjectParameters(first:second:)")
// CHECK-NEXT: - (void)deprecatedOnMacOSMethodInDeprecatedClassWithClassObjectParametersWithFirst:(SWTReplacementAvailable * _Nonnull)first second:(SWTReplacementAvailable * _Nonnull)second
// CHECK-SAME: SWIFT_AVAILABILITY(macos,deprecated=0.0.1,message="'deprecatedOnMacOSMethodInDeprecatedClassWithClassObjectParameters' has been renamed to 'ReplacementAvailable.methodReplacingInReplacementClassWithClassObjectParameters(first:second:)': use method in another class instead");
// CHECK-NEXT: @end
// CHECK-LABEL: SWIFT_AVAILABILITY(macos,deprecated=0.0.1,message="'DeprecatedAvailabilityProtocol' has been renamed to 'SWTReplacementAvailableProtocol'")
// CHECK-LABEL: @protocol DeprecatedAvailabilityProtocol
// CHECK-NEXT: - (void)deprecatedMethodInDeprecatedClassWithPrimitiveParametersWithFirst:(NSInteger)first second:(NSInteger)second
// CHECK-SAME: SWIFT_DEPRECATED_MSG("use method in another class instead", "ReplacementAvailable.methodReplacingInReplacementClassWithPrimitiveParameters(first:second:)")
// CHECK-NEXT: - (void)deprecatedOnMacOSMethodInDeprecatedClassWithPrimitiveParametersWithFirst:(NSInteger)first second:(NSInteger)second
// CHECK-SAME: SWIFT_AVAILABILITY(macos,deprecated=0.0.1,message="'deprecatedOnMacOSMethodInDeprecatedClassWithPrimitiveParameters' has been renamed to 'ReplacementAvailableProtocol.methodReplacingInReplacementProtocol(first:second:)': use method in another class instead");
// CHECK-NEXT: @end
// CHECK-LABEL: @interface SWTReplacementAvailable
// CHECK-NEXT: - (void)replacingMethodInReplacementClassWithPrimitiveParametersWithFirst:(NSInteger)first second:(NSInteger)second;
// CHECK-NEXT: - (void)replacingMethodInReplacementClassWithClassObjectParametersWithFirst:(SWTReplacementAvailable * _Nonnull)first second:(SWTReplacementAvailable * _Nonnull)second;
// CHECK-NEXT: - (void)deprecatedMethodReplacingInReplacementClassWithPrimitiveParametersWithFirst:(NSInteger)first second:(NSInteger)second
// CHECK-SAME: SWIFT_DEPRECATED_MSG("Deprecated method with the Context name in the renamed attribute - ContextName is self",
// CHECK-SAME: "replacingMethodInReplacementClassWithPrimitiveParametersWithFirst:second:")
// CHECK-NEXT: - (void)deprecatedmethodReplacingInReplacementClassWithClassObjectParametersWithFirst:(SWTReplacementAvailable * _Nonnull)first second:(SWTReplacementAvailable * _Nonnull)second
// CHECK-SAME: SWIFT_DEPRECATED_MSG("Deprecated method with the Context name in the renamed attribute - ContextName is self",
// CHECK-SAME: "replacingMethodInReplacementClassWithClassObjectParametersWithFirst:second:")
// CHECK-NEXT: @end
// CHECK-LABEL: @protocol SWTReplacementAvailableProtocol
// CHECK-NEXT: - (void)replacingMethodInReplacementProtocolWithFirst:(NSInteger)first second:(NSInteger)second;
// CHECK-NEXT: @end
// CHECK-LABEL: SWIFT_AVAILABILITY(macos,unavailable,message="'UnavailableAvailability' has been renamed to 'SWTReplacementAvailable'")
// CHECK-LABEL: @interface UnavailableAvailability
// CHECK-NEXT: - (void)unavailableMethodInUnavailableClassWithPrimitiveParametersWithFirst:(NSInteger)first second:(NSInteger)second
// CHECK-SAME: SWIFT_UNAVAILABLE_MSG("'unavailableMethodInUnavailableClassWithPrimitiveParameters' has been renamed to 'ReplacementAvailable.methodReplacingInReplacementClassWithPrimitiveParameters(first:second:)': use method in another class instead")
// CHECK-NEXT: - (void)unavailableOnMacOSMethodInUnavailableClassWithPrimitiveParametersWithFirst:(NSInteger)first second:(NSInteger)second
// CHECK-SAME: SWIFT_AVAILABILITY(macos,unavailable,message="'unavailableOnMacOSMethodInUnavailableClassWithPrimitiveParameters' has been renamed to 'ReplacementAvailable.methodReplacingInReplacementClassWithPrimitiveParameters(first:second:)': use method in another class instead");
// CHECK-NEXT: - (void)unavailableMethodInUnavailableClassWithClassObjectParametersWithFirst:(SWTReplacementAvailable * _Nonnull)first second:(SWTReplacementAvailable * _Nonnull)second
// CHECK-SAME: SWIFT_UNAVAILABLE_MSG("'unavailableMethodInUnavailableClassWithClassObjectParameters' has been renamed to 'ReplacementAvailable.methodReplacingInReplacementClassWithClassObjectParameters(first:second:)': use method in another class instead")
// CHECK-NEXT: - (void)unavailableOnMacOSMethodInUnavailableClassWithClassObjectParametersWithFirst:(SWTReplacementAvailable * _Nonnull)first second:(SWTReplacementAvailable * _Nonnull)second
// CHECK-SAME: SWIFT_AVAILABILITY(macos,unavailable,message="'unavailableOnMacOSMethodInUnavailableClassWithClassObjectParameters' has been renamed to 'ReplacementAvailable.methodReplacingInReplacementClassWithClassObjectParameters(first:second:)': use method in another class instead");
// CHECK-NEXT: @end
// CHECK-LABEL: SWIFT_AVAILABILITY(macos,unavailable,message="'UnavailableAvailabilityProtocol' has been renamed to 'SWTReplacementAvailableProtocol'")
// CHECK-LABEL: @protocol UnavailableAvailabilityProtocol
// CHECK-NEXT: - (void)unavailableMethodInUnavailableClassWithPrimitiveParametersWithFirst:(NSInteger)first second:(NSInteger)second
// CHECK-SAME: SWIFT_UNAVAILABLE_MSG("'unavailableMethodInUnavailableClassWithPrimitiveParameters' has been renamed to 'ReplacementAvailable.methodReplacingInReplacementClassWithPrimitiveParameters(first:second:)': use method in another class instead")
// CHECK-NEXT: - (void)unavailableOnMacOSMethodInUnavailableClassWithPrimitiveParametersWithFirst:(NSInteger)first second:(NSInteger)second
// CHECK-SAME: SWIFT_AVAILABILITY(macos,unavailable,message="'unavailableOnMacOSMethodInUnavailableClassWithPrimitiveParameters' has been renamed to 'ReplacementAvailableProtocol.methodReplacingInReplacementProtocol(first:second:)': use method in another class instead");
// CHECK-NEXT: @end
// CHECK-LABEL: SWIFT_CLASS("{{.+}}WholeClassAvailability")
// CHECK-SAME: SWIFT_AVAILABILITY(macos,introduced=999)
// CHECK-NEXT: @interface WholeClassAvailability
// CHECK-NEXT: - (void)wholeClassAvailability:(id <WholeProtoAvailability> _Nonnull)_;
// CHECK-NEXT: - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
// CHECK-NEXT: @end
// CHECK-LABEL: SWIFT_PROTOCOL("{{.+}}WholeProtoAvailability{{.*}}")
// CHECK-SAME: SWIFT_AVAILABILITY(macos,introduced=999)
// CHECK-NEXT: @protocol WholeProtoAvailability
// CHECK-NEXT: - (void)wholeProtoAvailability:(WholeClassAvailability * _Nonnull)_;
// CHECK-NEXT: @end
@objcclassAvailability{
@objcfunc alwaysAvailable(){}
@available(*, unavailable)
@objcfunc alwaysUnavailable(){}
@available(*, unavailable, message:"stuff happened")
@objcfunc alwaysUnavailableTwo(){}
@available(*, unavailable, renamed:"bar")
@objcfunc alwaysUnavailableThree(){}
@available(*, unavailable, message:"whatever", renamed:"baz")
@objcfunc alwaysUnavailableFour(){}
@available(*, deprecated)
@objcfunc alwaysDeprecated(){}
@available(*, deprecated, message:"it's old")
@objcfunc alwaysDeprecatedTwo(){}
@available(*, deprecated, renamed:"qux")
@objcfunc alwaysDeprecatedThree(){}
@available(*, deprecated, message:"use something else", renamed:"quux")
@objcfunc alwaysDeprecatedFour(){}
@available(*, deprecated, message:"one\ntwo\tthree\rfour\\\"five\"\0six")
@objcfunc escapeMessage(){}
@available(*, deprecated, message:"über")
@objcfunc unicodeMessage(){}
@available(macOS 10.10,*)
@objcfunc singlePlatShorthand(){}
@available(macOS 10.11, iOS 9.0, tvOS 9.0, watchOS 3.0,*)
@objcfunc multiPlatShorthand(){}
@available(iOS, introduced:9.0)
@objcfunc singlePlatIntroduced(){}
@available(macOS, deprecated:10.10)
@objcfunc singlePlatDeprecated(){}
@available(macOS, deprecated:10.10, renamed:"flubber")
@objcfunc singlePlatDeprecatedTwo(){}
@available(macOS, deprecated:10.10, message:"we changed our minds", renamed:"fozzybear")
@objcfunc singlePlatDeprecatedThree(){}
@available(tvOS, deprecated)
@objcfunc singlePlatDeprecatedAlways(){}
@available(macOS, introduced:10.7, deprecated)
@objcfunc singlePlatDeprecatedAlwaysTwo(){}
@available(watchOS, unavailable)
@objcfunc singlePlatUnavailable(){}
@available(watchOS, introduced:2.0, unavailable)
@objcfunc singlePlatUnavailableTwo(){}
@available(iOS, obsoleted:8.1)
@objcfunc singlePlatObsoleted(){}
@available(macOS, introduced:10.7, deprecated:10.9, obsoleted:10.10)
@objcfunc singlePlatCombined(){}
@available(macOS, introduced:10.6, deprecated:10.8, obsoleted:10.9)
@available(iOS, introduced:7.0, deprecated:9.0, obsoleted:10.0)
@objcfunc multiPlatCombined(){}
@available(macOS, unavailable, message:"help I'm trapped in an availability factory")
@objcfunc platUnavailableMessage(){}
@available(macOS, unavailable, renamed:"plea")
@objcfunc platUnavailableRename(){}
@available(macOS, unavailable, renamed:"anotherPlea", message:"still trapped")
@objcfunc platUnavailableRenameWithMessage(){}
@available(macOSApplicationExtension, unavailable)
@available(iOSApplicationExtension, unavailable)
@available(tvOSApplicationExtension, unavailable)
@available(watchOSApplicationExtension, unavailable)
@objcfunc extensionUnavailable(){}
@objcfunc overloadMethod(first:Int, second:Int){}
func overloadMethod(first:Double, second:Double){}
@available(*, deprecated, renamed:"overloadMethod(first:second:)")
@objcfunc deprecatedMethodRenamedToOverloadMethod(first:Int, second:Int){}
@available(macOS, deprecated, renamed:"overloadMethod(first:second:)")
@objcfunc deprecatedOnMacOSMethodRenamedToOverloadMethod(first:Int, second:Int){}
@available(*, unavailable, renamed:"overloadMethod(first:second:)")
@objcfunc unavailableMethodRenamedToOverloadMethod(first:Int, second:Int){}
@available(macOS, unavailable, renamed:"overloadMethod(first:second:)")
@objcfunc unavailableOnMacOSMethodRenamedToOverloadMethod(first:Int, second:Int){}
@objc(firstOverloadingMethodWithDifferenceNameWithFirst:second:)
func overloadMethodWithDifferenceObjCName(first:Int, second:Int){}
@objc(secondOverloadingMethodWithDifferenceNameWithFirst:second:)
func overloadMethodWithDifferenceObjCName(first:Double, second:Double){}
@available(*, deprecated, renamed:"overloadMethodWithDifferenceObjCName(first:second:)")
@objcfunc deprecatedMethodRenamedToOverloadMethodWithDifferenceName(first:Int, second:Int){}
@available(macOS, deprecated, renamed:"overloadMethodWithDifferenceObjCName(first:second:)")
@objcfunc deprecatedOnMacOSMethodRenamedToOverloadMethodWithDifferenceName(first:Int, second:Int){}
@available(*, unavailable, renamed:"overloadMethodWithDifferenceObjCName(first:second:)")
@objcfunc unavailableMethodRenamedToOverloadMethodWithDifferenceName(first:Int, second:Int){}
@available(macOS, unavailable, renamed:"overloadMethodWithDifferenceObjCName(first:second:)")
@objcfunc unavailableOnMacOSMethodRenamedToOverloadMethodWithDifferenceName(first:Int, second:Int){}
@objc(deprecatedAvailabilityWithValue:)
publicclassfunc makeDeprecatedAvailability(withValue value:Int){}
@available(*, deprecated, message:"This method has a renamed attribute point to class method instead of a instance method. It should show the Swift name here", renamed:"classMethodWithACustomObjCName(x:)")
@objcpublicfunc deprecatedInstanceMethodRenamedToClassMethod(value:Int){}
@available(macOS, deprecated, message:"This method has a renamed attribute point to class method instead of a instance method. It should show the Swift name here", renamed:"classMethodWithACustomObjCName(x:)")
@objcpublicfunc deprecatedOnMacOSInstanceMethodRenamedToClassMethod(value:Int){}
@available(*, unavailable, message:"This method has a renamed attribute point to class method instead of a instance method. It should show the Swift name here", renamed:"classMethodWithACustomObjCName(x:)")
@objcpublicfunc unavailableInstanceMethodRenamedToClassMethod(value:Int){}
@available(macOS, unavailable, message:"This method has a renamed attribute point to class method instead of a instance method. It should show the Swift name here", renamed:"classMethodWithACustomObjCName(x:)")
@objcpublicfunc unavailableOnMacOSInstanceMethodRenamedToClassMethod(value:Int){}
@available(*, deprecated, message:"This method has a renamed attribute point to instance method instead of a class method. It should show the Swift name here", renamed:"instanceMethodWithACustomObjCName(x:)")
@objcpublicclassfunc deprecatedClassMethodRenamedToInstanceMethod(value:Int){}
@available(macOS, deprecated, message:"This method has a renamed attribute point to instance method instead of a class method. It should show the Swift name here", renamed:"instanceMethodWithACustomObjCName(x:)")
@objcpublicclassfunc deprecatedOnMacOSClassMethodRenamedToInstanceMethod(value:Int){}
@available(*, unavailable, message:"This method has a renamed attribute point to instance method instead of a class method. It should show the Swift name here", renamed:"instanceMethodWithACustomObjCName(x:)")
@objcpublicclassfunc unavailableClassMethodRenamedToInstanceMethod(value:Int){}
@available(macOS, unavailable, message:"This method has a renamed attribute point to instance method instead of a class method. It should show the Swift name here", renamed:"instanceMethodWithACustomObjCName(x:)")
@objcpublicclassfunc unavailableOnMacOSClassMethodRenamedToInstanceMethod(value:Int){}
@objc(customObjCNameInstanceMethodWithX:)
publicfunc instanceMethodWithACustomObjCName(x:Int){}
@objc(customObjCNameClassMethodWithX:)
publicclassfunc classMethodWithACustomObjCName(x:Int){}
@nonobjcfunc methodNotAvailableToObjC(){}
@available(*, deprecated, renamed:"methodNotAvailableToObjC()")
@objcpublicfunc deprecatedMethodRenamedToMethodNotAvailableToObjC(){}
@available(macOS, deprecated, renamed:"methodNotAvailableToObjC()")
@objcpublicfunc deprecatedOnMacOSMethodRenamedToMethodNotAvailableToObjC(){}
@available(*, unavailable, renamed:"methodNotAvailableToObjC()")
@objcpublicfunc unavailableMethodRenamedToMethodNotAvailableToObjC(){}
@available(macOS, unavailable, renamed:"methodNotAvailableToObjC()")
@objcpublicfunc unavailableOnMacOSMethodRenamedToMethodNotAvailableToObjC(){}
@available(*, deprecated, renamed:"simpleProperty")
@objcpublicfunc deprecatedMethodRenamedToSimpleProperty(){}
@available(macOS, deprecated, renamed:"simpleProperty")
@objcpublicfunc deprecatedOnMacOSMethodRenamedToSimpleProperty(){}
@available(*, unavailable, renamed:"simpleProperty")
@objcpublicfunc unavailableMethodRenamedToSimpleProperty(){}
@available(macOS, unavailable, renamed:"simpleProperty")
@objcpublicfunc unavailableOnMacOSMethodRenamedToSimpleProperty(){}
@objc(methodReturningInt)publicfunc simpleMethodReturningInt()->Int{return-1}
@objcpublicfunc methodWithoutCustomObjCName(value:Int)->Int{return-1}
@available(*, deprecated, renamed:"methodWithoutCustomObjCName(value:)")
@objcpublicfunc deprecatedMethodRenamedToMethodWithoutCustomObjCName(value:Int)->Int{return-1}
@available(macOS, deprecated, renamed:"methodWithoutCustomObjCName(value:)")
@objcpublicfunc deprecatedOnMacOSMethodRenamedToMethodWithoutCustomObjCName(value:Int)->Int{return-1}
@available(*, unavailable, renamed:"methodWithoutCustomObjCName(value:)")
@objcpublicfunc unavailableMethodRenamedToMethodWithoutCustomObjCName(value:Int)->Int{return-1}
@available(macOS, unavailable, renamed:"methodWithoutCustomObjCName(value:)")
@objcpublicfunc unavailableOnMacOSMethodRenamedToMethodWithoutCustomObjCName(value:Int)->Int{return-1}
@objc(unavailableAvailabilityWithValue:)
publicclassfunc makeUnavailableAvailability(withValue value:Int){}
@available(*, deprecated,
message:"use something else",
renamed:"makeDeprecatedAvailability(withValue:)")
@objc(makeDeprecatedAvailabilityWithValue:)publicclassfunc __makeDeprecatedAvailability(withValue value:Int){}
@available(macOS, deprecated,
message:"use something else",
renamed:"makeDeprecatedAvailability(withValue:)")
@objc(makeDeprecatedOnMacOSAvailabilityWithValue:)publicclassfunc __makeDeprecatedOnMacOSAvailability(withValue value:Int){}
@available(*, unavailable,
message:"use something else",
renamed:"makeUnavailableAvailability(withValue:)")
@objc(makeUnavailableAvailabilityWithValue:)publicclassfunc __makeUnavailableAvailability(withValue value:Int){}
@available(macOS, unavailable,
message:"use something else",
renamed:"makeUnavailableAvailability(withValue:)")
@objc(makeUnavailableOnMacOSAvailabilityWithValue:)publicclassfunc __makeUnavailableOnMacOSAvailability(withValue value:Int){}
@objcinit(){}
@available(macOS 10.10,*)
@objcinit(x:Int){}
@objcinit(first:Int, second:Int){}
init(first:Double, second:Double){}
@available(*, deprecated, renamed:"init(first:second:)")
@objcinit(deprecatedFirst first:Int, second:Int){}
@available(macOS, deprecated, renamed:"init(first:second:)")
@objcinit(deprecatedOnMacOSFirst first:Int, second:Int){}
@available(*, unavailable, renamed:"init(first:second:)")
@objcinit(unavailableFirst first:Int, second:Int){}
@available(macOS, unavailable, renamed:"init(first:second:)")
@objcinit(unavailableOnMacOSFirst first:Int, second:Int){}
@objcvarsimpleProperty:Int{
get{
return100
}
}
@available(*, unavailable, message:"whatever", renamed:"baz")
@objcvaralwaysUnavailableProperty:Int{
get{
return100
}
set{
}
}
@available(*, deprecated, message:"use something else", renamed:"quux")
@objcvaralwaysDeprecatedProperty:Int{
get{
return-1
}
}
@objc(replaceForDeprecatedObjCProperty)var__replaceForDeprecatedObjCProperty:Int{
get{
return-1
}
}
@available(*, deprecated, message:"use something else", renamed:"__replaceForDeprecatedObjCProperty")
@objc(numberOfReplaceableDeprecatedObjCProperty)varreplaceableDeprecatedObjCProperty:Int{
get{
return-1
}
}
@available(macOS, deprecated, message:"use something else", renamed:"__replaceForDeprecatedObjCProperty")
@objc(numberOfReplaceableDeprecatedOnMacOSObjCProperty)varreplaceableDeprecatedOnMacOSObjCProperty:Int{
get{
return-1
}
}
@objc(replaceForUnavailableObjCProperty)var__replaceForUnavailableObjCProperty:Int{
get{
return-1
}
}
@available(*, unavailable, message:"use something else", renamed:"__replaceForUnavailableObjCProperty")
@objc(numberOfReplaceableUnavailableObjCProperty)varreplaceableUnavailableObjCProperty:Int{
get{
return-1
}
}
@available(macOS, unavailable, message:"use something else", renamed:"__replaceForUnavailableObjCProperty")
@objc(numberOfReplaceableUnavailableOnMacOSObjCProperty)varreplaceableUnavailableOnMacOSObjCProperty:Int{
get{
return-1
}
}
@available(macOS, introduced:10.7, deprecated:10.9, obsoleted:10.10)
@objcvarsinglePlatCombinedPropertyClass:Availability!{
get{
returnnil
}
}
@available(macOS, unavailable, renamed:"anotherPlea", message:"still trapped")
@objcvarplatformUnavailableRenameWithMessageProperty:Int{
get{
return-1
}
}
@available(*, deprecated, renamed:"simpleMethodReturningInt()")
@objcvardeprecatedPropertyRenamedToMethod:Int{
get{
return-1
}
}
@available(macOS, deprecated, renamed:"simpleMethodReturningInt()")
@objcvardeprecatedOnMacOSPropertyRenamedToMethod:Int{
get{
return-1
}
}
@available(*, unavailable, renamed:"simpleMethodReturningInt()")
@objcvarunavailablePropertyRenamedToMethod:Int{
get{
return-1
}
}
@available(macOS, unavailable, renamed:"simpleMethodReturningInt()")
@objcvarunavailableOnMacOSPropertyRenamedToMethod:Int{
get{
return-1
}
}
}
// Deliberately a high number that the default deployment target will not reach.
@available(macOS 999,*)
extensionAvailability{
@objcfunc extensionAvailability(_:WholeClassAvailability){}
@available(macOS, deprecated:10.10)
@objcvarpropertyDeprecatedInsideExtension:Int{
get{
return0
}
}
}
@objcclassAvailabilitySub:Availability{
privateoverrideinit(){ super.init()}
@available(macOS 10.10,*)
privateoverrideinit(x:Int){ super.init()}
@available(*, deprecated, message:"init(deprecatedZ:) was deprecated. Use the new one instead", renamed:"init(z:)")
@objcinit(deprecatedZ:Int){ super.init()}
@objc(initWithNewZ:)init(z:Int){ super.init()}
}
@available(macOS 999,*)
@objc@objcMembersclassWholeClassAvailability{
func wholeClassAvailability(_:WholeProtoAvailability){}
}
@available(macOS 999,*)
@objcprotocolWholeProtoAvailability{
func wholeProtoAvailability(_:WholeClassAvailability)
}
@objc(SWTReplacementAvailable)classReplacementAvailable{
@objc(replacingMethodInReplacementClassWithPrimitiveParametersWithFirst:second:)
func methodReplacingInReplacementClassWithPrimitiveParameters(first:Int, second:Int)->Void{}
@objc(replacingMethodInReplacementClassWithClassObjectParametersWithFirst:second:)
func methodReplacingInReplacementClassWithClassObjectParameters(first:ReplacementAvailable, second:ReplacementAvailable)->Void{}
@available(*, deprecated,
message:"Deprecated method with the Context name in the renamed attribute - ContextName is self",
renamed:"ReplacementAvailable.methodReplacingInReplacementClassWithPrimitiveParameters(first:second:)")
@objcfunc deprecatedMethodReplacingInReplacementClassWithPrimitiveParameters(first:Int, second:Int)->Void{}
@available(*, deprecated,
message:"Deprecated method with the Context name in the renamed attribute - ContextName is self",
renamed:"ReplacementAvailable.methodReplacingInReplacementClassWithClassObjectParameters(first:second:)")
@objcfunc deprecatedmethodReplacingInReplacementClassWithClassObjectParameters(first:ReplacementAvailable, second:ReplacementAvailable)->Void{}
}
@available(macOS, deprecated, renamed:"ReplacementAvailable")
@objcclassDeprecatedAvailability{
@available(*, deprecated, message:"use method in another class instead",
renamed:"ReplacementAvailable.methodReplacingInReplacementClassWithPrimitiveParameters(first:second:)")
@objcfunc deprecatedMethodInDeprecatedClassWithPrimitiveParameters(first:Int, second:Int)->Void{}
@available(macOS, deprecated, message:"use method in another class instead",
renamed:"ReplacementAvailable.methodReplacingInReplacementClassWithPrimitiveParameters(first:second:)")
@objcfunc deprecatedOnMacOSMethodInDeprecatedClassWithPrimitiveParameters(first:Int, second:Int)->Void{}
@available(*, deprecated, message:"use method in another class instead",
renamed:"ReplacementAvailable.methodReplacingInReplacementClassWithClassObjectParameters(first:second:)")
@objcfunc deprecatedMethodInDeprecatedClassWithClassObjectParameters(first:ReplacementAvailable, second:ReplacementAvailable)->Void{}
@available(macOS, deprecated, message:"use method in another class instead",
renamed:"ReplacementAvailable.methodReplacingInReplacementClassWithClassObjectParameters(first:second:)")
@objcfunc deprecatedOnMacOSMethodInDeprecatedClassWithClassObjectParameters(first:ReplacementAvailable, second:ReplacementAvailable)->Void{}
}
@available(macOS, unavailable, renamed:"ReplacementAvailable")
@objcclassUnavailableAvailability{
@available(*, unavailable, message:"use method in another class instead", renamed:"ReplacementAvailable.methodReplacingInReplacementClassWithPrimitiveParameters(first:second:)")
@objcfunc unavailableMethodInUnavailableClassWithPrimitiveParameters(first:Int, second:Int)->Void{}
@available(macOS, unavailable, message:"use method in another class instead", renamed:"ReplacementAvailable.methodReplacingInReplacementClassWithPrimitiveParameters(first:second:)")
@objcfunc unavailableOnMacOSMethodInUnavailableClassWithPrimitiveParameters(first:Int, second:Int)->Void{}
@available(*, unavailable, message:"use method in another class instead", renamed:"ReplacementAvailable.methodReplacingInReplacementClassWithClassObjectParameters(first:second:)")
@objcfunc unavailableMethodInUnavailableClassWithClassObjectParameters(first:ReplacementAvailable, second:ReplacementAvailable)->Void{}
@available(macOS, unavailable, message:"use method in another class instead", renamed:"ReplacementAvailable.methodReplacingInReplacementClassWithClassObjectParameters(first:second:)")
@objcfunc unavailableOnMacOSMethodInUnavailableClassWithClassObjectParameters(first:ReplacementAvailable, second:ReplacementAvailable)->Void{}
}
@objc(SWTReplacementAvailableProtocol)protocolReplacementAvailableProtocol{
@objc(replacingMethodInReplacementProtocolWithFirst:second:)
func methodReplacingInReplacementProtocol(first:Int, second:Int)->Void
}
@available(macOS, deprecated, renamed:"ReplacementAvailableProtocol")
@objcprotocolDeprecatedAvailabilityProtocol{
@available(*, deprecated, message:"use method in another class instead", renamed:"ReplacementAvailable.methodReplacingInReplacementClassWithPrimitiveParameters(first:second:)")
@objcfunc deprecatedMethodInDeprecatedClassWithPrimitiveParameters(first:Int, second:Int)->Void
@available(macOS, deprecated, message:"use method in another class instead", renamed:"ReplacementAvailableProtocol.methodReplacingInReplacementProtocol(first:second:)")
@objcfunc deprecatedOnMacOSMethodInDeprecatedClassWithPrimitiveParameters(first:Int, second:Int)->Void
}
@available(macOS, unavailable, renamed:"ReplacementAvailableProtocol")
@objcprotocolUnavailableAvailabilityProtocol{
@available(*, unavailable, message:"use method in another class instead", renamed:"ReplacementAvailable.methodReplacingInReplacementClassWithPrimitiveParameters(first:second:)")
@objcfunc unavailableMethodInUnavailableClassWithPrimitiveParameters(first:Int, second:Int)->Void
@available(macOS, unavailable, message:"use method in another class instead", renamed:"ReplacementAvailableProtocol.methodReplacingInReplacementProtocol(first:second:)")
@objcfunc unavailableOnMacOSMethodInUnavailableClassWithPrimitiveParameters(first:Int, second:Int)->Void
}