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 {
229229 }
230230
231231 TRIVIAL_CASE (ModuleType)
232- TRIVIAL_CASE (DynamicSelfType)
233232 TRIVIAL_CASE (ArchetypeType)
234233
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+
235253 bool visitDependentMemberType (CanDependentMemberType firstType,
236254 Type secondType,
237255 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
44
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
88
99protocol P {
1010 func f( ) -> Self
You can’t perform that action at this time.
0 commit comments