1- // RUN: %target-run-simple-swift | %FileCheck --check-prefix CHECK --check-prefix CHECK-ONONE %s
1+ // RUN: %target-run-simple-swift | %FileCheck --check-prefix CHECK --check-prefix CHECK-ONONE --dump-input fail %s
22// RUN: %target-build-swift -O %s -o %t/a.out.optimized
33// RUN: %target-codesign %t/a.out.optimized
44// RUN: %target-run %t/a.out.optimized | %FileCheck %s
@@ -132,18 +132,14 @@ anyClassToCOrE(D()).print() // CHECK: D!
132132anyClassToCOrE ( X ( ) ) . print ( ) // CHECK: E!
133133
134134protocol P { }
135- @objc protocol PObjC { }
136135struct PS : P { }
137136enum PE : P { }
138- class PC : P , PObjC { }
137+ class PC : P { }
139138class PCSub : PC { }
140139
141140func nongenericAnyIsP( type: Any . Type ) -> Bool {
142141 return type is P . Type
143142}
144- func nongenericAnyIsPObjC( type: Any . Type ) -> Bool {
145- return type is PObjC . Type
146- }
147143func nongenericAnyIsPAndAnyObject( type: Any . Type ) -> Bool {
148144 return type is ( P & AnyObject ) . Type
149145}
@@ -164,17 +160,6 @@ print(genericAnyIs(type: PC.self, to: P.self)) // CHECK-ONONE: true
164160print ( nongenericAnyIsP ( type: PCSub . self) ) // CHECK: true
165161print ( genericAnyIs ( type: PCSub . self, to: P . self) ) // CHECK-ONONE: true
166162
167- // CHECK-LABEL: casting types to ObjC protocols with generics:
168- print ( " casting types to ObjC protocols with generics: " )
169- print ( nongenericAnyIsPObjC ( type: PS . self) ) // CHECK: false
170- print ( genericAnyIs ( type: PS . self, to: PObjC . self) ) // CHECK: false
171- print ( nongenericAnyIsPObjC ( type: PE . self) ) // CHECK: false
172- print ( genericAnyIs ( type: PE . self, to: PObjC . self) ) // CHECK: false
173- print ( nongenericAnyIsPObjC ( type: PC . self) ) // CHECK: true
174- print ( genericAnyIs ( type: PC . self, to: PObjC . self) ) // CHECK-ONONE: true
175- print ( nongenericAnyIsPObjC ( type: PCSub . self) ) // CHECK: true
176- print ( genericAnyIs ( type: PCSub . self, to: PObjC . self) ) // CHECK-ONONE: true
177-
178163// CHECK-LABEL: casting types to protocol & AnyObject existentials:
179164print ( " casting types to protocol & AnyObject existentials: " )
180165print ( nongenericAnyIsPAndAnyObject ( type: PS . self) ) // CHECK: false
0 commit comments