File tree Expand file tree Collapse file tree 2 files changed +25
-7
lines changed Expand file tree Collapse file tree 2 files changed +25
-7
lines changed Original file line number Diff line number Diff line change @@ -229,9 +229,27 @@ class TypeMatcher {
229
229
}
230
230
231
231
TRIVIAL_CASE (ModuleType)
232
- TRIVIAL_CASE (DynamicSelfType)
233
232
TRIVIAL_CASE (ArchetypeType)
234
233
234
+ bool visitDynamicSelfType (CanDynamicSelfType firstDynamicSelf,
235
+ Type secondType,
236
+ Type sugaredFirstType) {
237
+ if (auto secondDynamicSelf = secondType->getAs <DynamicSelfType>()) {
238
+ auto firstBase = firstDynamicSelf->getSelfType ();
239
+ auto secondBase = secondDynamicSelf->getSelfType ();
240
+ auto firstSugaredBase = sugaredFirstType->getAs <DynamicSelfType>()
241
+ ->getSelfType ();
242
+
243
+ if (!this ->visit (CanType (firstBase), secondBase, firstSugaredBase))
244
+ return false ;
245
+
246
+ return true ;
247
+ }
248
+
249
+ return mismatch (firstDynamicSelf.getPointer (), secondType,
250
+ sugaredFirstType);
251
+ }
252
+
235
253
bool visitDependentMemberType (CanDependentMemberType firstType,
236
254
Type secondType,
237
255
Type sugaredFirstType) {
Original file line number Diff line number Diff line change 1
- // RUN: %target-swift-emit-silgen -swift-version 4 %s -disable-objc-attr-requires-foundation-module -enable-objc-interop | %FileCheck %s
2
- // RUN: %target-swift-emit-sil -swift-version 4 -O %s -disable-objc-attr-requires-foundation-module -enable-objc-interop
3
- // RUN: %target-swift-emit-ir -swift-version 4 %s -disable-objc-attr-requires-foundation-module -enable-objc-interop
1
+ // RUN: %target-swift-emit-silgen -swift-version 4 %s -disable-objc-attr-requires-foundation-module -enable-objc-interop -requirement-machine-abstract-signatures=verify | %FileCheck %s
2
+ // RUN: %target-swift-emit-sil -swift-version 4 -O %s -disable-objc-attr-requires-foundation-module -enable-objc-interop -requirement-machine-abstract-signatures=verify
3
+ // RUN: %target-swift-emit-ir -swift-version 4 %s -disable-objc-attr-requires-foundation-module -enable-objc-interop -requirement-machine-abstract-signatures=verify
4
4
5
- // RUN: %target-swift-emit-silgen -swift-version 5 %s -disable-objc-attr-requires-foundation-module -enable-objc-interop | %FileCheck %s
6
- // RUN: %target-swift-emit-sil -swift-version 5 -O %s -disable-objc-attr-requires-foundation-module -enable-objc-interop
7
- // RUN: %target-swift-emit-ir -swift-version 5 %s -disable-objc-attr-requires-foundation-module -enable-objc-interop
5
+ // RUN: %target-swift-emit-silgen -swift-version 5 %s -disable-objc-attr-requires-foundation-module -enable-objc-interop -requirement-machine-abstract-signatures=verify | %FileCheck %s
6
+ // RUN: %target-swift-emit-sil -swift-version 5 -O %s -disable-objc-attr-requires-foundation-module -enable-objc-interop -requirement-machine-abstract-signatures=verify
7
+ // RUN: %target-swift-emit-ir -swift-version 5 %s -disable-objc-attr-requires-foundation-module -enable-objc-interop -requirement-machine-abstract-signatures=verify
8
8
9
9
protocol P {
10
10
func f( ) -> Self
You can’t perform that action at this time.
0 commit comments