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
2
2
// RUN: %target-build-swift -O %s -o %t/a.out.optimized
3
3
// RUN: %target-codesign %t/a.out.optimized
4
4
// RUN: %target-run %t/a.out.optimized | %FileCheck %s
@@ -132,18 +132,14 @@ anyClassToCOrE(D()).print() // CHECK: D!
132
132
anyClassToCOrE ( X ( ) ) . print ( ) // CHECK: E!
133
133
134
134
protocol P { }
135
- @objc protocol PObjC { }
136
135
struct PS : P { }
137
136
enum PE : P { }
138
- class PC : P , PObjC { }
137
+ class PC : P { }
139
138
class PCSub : PC { }
140
139
141
140
func nongenericAnyIsP( type: Any . Type ) -> Bool {
142
141
return type is P . Type
143
142
}
144
- func nongenericAnyIsPObjC( type: Any . Type ) -> Bool {
145
- return type is PObjC . Type
146
- }
147
143
func nongenericAnyIsPAndAnyObject( type: Any . Type ) -> Bool {
148
144
return type is ( P & AnyObject ) . Type
149
145
}
@@ -164,17 +160,6 @@ print(genericAnyIs(type: PC.self, to: P.self)) // CHECK-ONONE: true
164
160
print ( nongenericAnyIsP ( type: PCSub . self) ) // CHECK: true
165
161
print ( genericAnyIs ( type: PCSub . self, to: P . self) ) // CHECK-ONONE: true
166
162
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
-
178
163
// CHECK-LABEL: casting types to protocol & AnyObject existentials:
179
164
print ( " casting types to protocol & AnyObject existentials: " )
180
165
print ( nongenericAnyIsPAndAnyObject ( type: PS . self) ) // CHECK: false
0 commit comments