File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -131,6 +131,9 @@ bool constraints::areConservativelyCompatibleArgumentLabels(
131
131
bool hasCurriedSelf;
132
132
if (isa<SubscriptDecl>(decl)) {
133
133
hasCurriedSelf = false ;
134
+ } else if (decl->isStatic () && isa<AbstractFunctionDecl>(decl)) {
135
+ // Static methods always have their Self.Type parameter applied.
136
+ hasCurriedSelf = true ;
134
137
} else if (!baseType || baseType->is <ModuleType>()) {
135
138
hasCurriedSelf = false ;
136
139
} else if (baseType->is <AnyMetatypeType>() && decl->isInstanceMember ()) {
Original file line number Diff line number Diff line change @@ -223,3 +223,17 @@ func rdar46459603() {
223
223
_ = [ arr. values] == [ [ e] ]
224
224
// expected-error@-1 {{protocol type 'Any' cannot conform to 'Equatable' because only concrete types can conform to protocols}}
225
225
}
226
+
227
+ // SR-10843
228
+ infix operator ^^^
229
+ func ^^^ ( lhs: String , rhs: String ) { }
230
+
231
+ struct SR10843 {
232
+ static func ^^^ ( lhs: SR10843 , rhs: SR10843 ) { }
233
+ }
234
+
235
+ func sr10843( ) {
236
+ let s = SR10843 ( )
237
+ ( ^^^ ) ( s, s)
238
+ _ = ( == ) ( 0 , 0 )
239
+ }
You can’t perform that action at this time.
0 commit comments