File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed
test/decl/protocol/conforms Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -912,8 +912,7 @@ RequirementMatch swift::matchWitness(
912912
913913 case ThrownErrorSubtyping::Subtype:
914914 // If there were no type parameters, we're done.
915- if (!reqThrownError->hasTypeVariable () &&
916- !reqThrownError->hasTypeParameter ())
915+ if (!reqThrownError->hasTypeParameter ())
917916 break ;
918917
919918 LLVM_FALLTHROUGH;
Original file line number Diff line number Diff line change @@ -77,3 +77,17 @@ public protocol HasRethrowingMap: Sequence {
7777}
7878
7979extension Array : HasRethrowingMap { }
80+
81+ // rdar://149438520 -- incorrect handling of subtype relation between type parameter and Never
82+ protocol DependentThrowing {
83+ associatedtype E : Error
84+ func f( ) throws ( E)
85+ }
86+
87+ extension DependentThrowing {
88+ func f( ) { }
89+ }
90+
91+ struct DefaultDependentThrowing : DependentThrowing {
92+ typealias E = Error
93+ }
You can’t perform that action at this time.
0 commit comments