File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
test/decl/protocol/conforms Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -545,9 +545,10 @@ swift::matchWitness(
545
545
// Result types must match.
546
546
// FIXME: Could allow (trivial?) subtyping here.
547
547
if (!ignoreReturnType) {
548
- if (reqResultType->is <DynamicSelfType> ()) {
548
+ if (reqResultType->hasDynamicSelfType ()) {
549
549
auto classDecl = witness->getDeclContext ()->getSelfClassDecl ();
550
- if (!classDecl || classDecl->isFinal () || witnessResultType->is <DynamicSelfType>())
550
+ if (!classDecl || classDecl->isFinal () ||
551
+ witnessResultType->hasDynamicSelfType ())
551
552
reqResultType = reqResultType->eraseDynamicSelfType ();
552
553
witnessResultType = witnessResultType->eraseDynamicSelfType ();
553
554
}
Original file line number Diff line number Diff line change @@ -104,4 +104,11 @@ final class C8902b : P8902 {
104
104
class C8902c : P8902 {
105
105
func f( _ x: Bool ) -> Self { fatalError ( ) }
106
106
}
107
+ protocol P8902complex {
108
+ associatedtype A
109
+ func f( ) -> ( A , Self ? )
110
+ }
111
+ final class C8902complex : P8902complex {
112
+ func f( ) -> ( Bool , C8902complex ? ) { fatalError ( ) }
113
+ }
107
114
You can’t perform that action at this time.
0 commit comments