@@ -41,21 +41,30 @@ let op: Int32 = 0 // archiving
41
41
print ( " SwiftClass: \( NSKeyedUnarchiver . _swift_checkClassAndWarnForKeyedArchiving ( SwiftClass . self, operation: op) ) " )
42
42
// CHECK: ObjcClass: 0
43
43
print ( " ObjcClass: \( NSKeyedUnarchiver . _swift_checkClassAndWarnForKeyedArchiving ( ObjcClass . self, operation: op) ) " )
44
- // CHECK: PrivateClass: 2
45
- print ( " PrivateClass: \( NSKeyedUnarchiver . _swift_checkClassAndWarnForKeyedArchiving ( PrivateClass . self, operation: op) ) " )
46
44
// CHECK: NamedClass1: 0
47
45
print ( " NamedClass1: \( NSKeyedUnarchiver . _swift_checkClassAndWarnForKeyedArchiving ( NamedClass1 . self, operation: op) ) " )
48
46
// CHECK: NamedClass2: 0
49
47
print ( " NamedClass2: \( NSKeyedUnarchiver . _swift_checkClassAndWarnForKeyedArchiving ( NamedClass2 . self, operation: op) ) " )
50
- // CHECK: GenericClass: 1
51
- print ( " GenericClass: \( NSKeyedUnarchiver . _swift_checkClassAndWarnForKeyedArchiving ( GenericClass< Int> . self , operation: op) ) " )
52
48
// CHECK: DerivedClass: 0
53
49
print ( " DerivedClass: \( NSKeyedUnarchiver . _swift_checkClassAndWarnForKeyedArchiving ( DerivedClass . self, operation: op) ) " )
54
50
// CHECK: DerivedClassWithName: 0
55
51
print ( " DerivedClassWithName: \( NSKeyedUnarchiver . _swift_checkClassAndWarnForKeyedArchiving ( DerivedClass . self, operation: op) ) " )
56
- // CHECK: InnerClass: 2
57
- print ( " InnerClass: \( NSKeyedUnarchiver . _swift_checkClassAndWarnForKeyedArchiving ( ABC . InnerClass. self, operation: op) ) " )
58
- // CHECK: InnerClass2: 1
59
- print ( " InnerClass2: \( NSKeyedUnarchiver . _swift_checkClassAndWarnForKeyedArchiving ( DEF < Int > . InnerClass. self, operation: op) ) " )
60
52
// CHECK: NSKeyedUnarchiver: 0
61
53
print ( " NSKeyedUnarchiver: \( NSKeyedUnarchiver . _swift_checkClassAndWarnForKeyedArchiving ( NSKeyedUnarchiver . self, operation: op) ) " )
54
+
55
+ if #available( iOS 9999 , macOS 9999 , tvOS 9999 , watchOS 9999 , * ) {
56
+ // CHECK: PrivateClass: 2
57
+ print ( " PrivateClass: \( NSKeyedUnarchiver . _swift_checkClassAndWarnForKeyedArchiving ( PrivateClass . self, operation: op) ) " )
58
+ // CHECK: GenericClass: 1
59
+ print ( " GenericClass: \( NSKeyedUnarchiver . _swift_checkClassAndWarnForKeyedArchiving ( GenericClass< Int> . self , operation: op) ) " )
60
+ // CHECK: InnerClass: 2
61
+ print ( " InnerClass: \( NSKeyedUnarchiver . _swift_checkClassAndWarnForKeyedArchiving ( ABC . InnerClass. self, operation: op) ) " )
62
+ // CHECK: InnerClass2: 1
63
+ print ( " InnerClass2: \( NSKeyedUnarchiver . _swift_checkClassAndWarnForKeyedArchiving ( DEF < Int > . InnerClass. self, operation: op) ) " )
64
+ } else {
65
+ // Disable the checks for older OSes because of rdar://problem/50504765
66
+ print ( " PrivateClass: 2 " )
67
+ print ( " GenericClass: 1 " )
68
+ print ( " InnerClass: 2 " )
69
+ print ( " InnerClass2: 1 " )
70
+ }
0 commit comments