File tree 2 files changed +15
-2
lines changed
test/decl/protocol/conforms 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -912,8 +912,7 @@ RequirementMatch swift::matchWitness(
912
912
913
913
case ThrownErrorSubtyping::Subtype:
914
914
// If there were no type parameters, we're done.
915
- if (!reqThrownError->hasTypeVariable () &&
916
- !reqThrownError->hasTypeParameter ())
915
+ if (!reqThrownError->hasTypeParameter ())
917
916
break ;
918
917
919
918
LLVM_FALLTHROUGH;
Original file line number Diff line number Diff line change @@ -77,3 +77,17 @@ public protocol HasRethrowingMap: Sequence {
77
77
}
78
78
79
79
extension 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