You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[CSRanking] Fix func declaration ranking with default'ed parameters
If default'ed parameters in one decl are intermixed with non-defaulted
ones, skip claiming parameters in other decl at the same position.
Resolves: rdar://problem/36226874.
leta=overloadMismatch{} // expected-error {{ambiguous use of 'overloadMismatch'}}
303
-
_ = a asString
304
-
letb=overloadMismatch(){} // expected-error {{ambiguous use of 'overloadMismatch'}}
305
-
_ = b asString
306
-
307
-
letc=overloadMismatchLabel{} // expected-error {{ambiguous use of 'overloadMismatchLabel'}}
308
-
// expected-note@-1 {{use an explicit argument label instead of a trailing closure to call 'overloadMismatchLabel(a:)'}} {{32-33=(a: }} {{35-35=)}}
309
-
// expected-note@-2 {{use an explicit argument label instead of a trailing closure to call 'overloadMismatchLabel(x:b:)'}} {{32-33=(b: }} {{35-35=)}}
310
-
_ = c asString
311
-
letd=overloadMismatchLabel(){} // expected-error {{ambiguous use of 'overloadMismatchLabel'}}
312
-
// expected-note@-1 {{use an explicit argument label instead of a trailing closure to call 'overloadMismatchLabel(a:)'}} {{33-35=a: }} {{37-37=)}}
313
-
// expected-note@-2 {{use an explicit argument label instead of a trailing closure to call 'overloadMismatchLabel(x:b:)'}} {{33-35=b: }} {{37-37=)}}
314
-
_ = d asString
315
-
316
-
lete=overloadMismatchArgs(0){} // expected-error {{ambiguous use of 'overloadMismatchArgs'}}
317
-
_ = e asString
318
-
319
-
letf=overloadMismatchArgsLabel(0){} // expected-error {{ambiguous use of 'overloadMismatchArgsLabel'}}
320
-
// expected-note@-1 {{use an explicit argument label instead of a trailing closure to call 'overloadMismatchArgsLabel(_:a:)'}} {{38-40=, a: }} {{42-42=)}}
321
-
// expected-note@-2 {{use an explicit argument label instead of a trailing closure to call 'overloadMismatchArgsLabel(_:x:b:)'}} {{38-40=, b: }} {{42-42=)}}
322
-
_ = f asString
323
-
324
-
letg=overloadMismatchMultiArgs(0){} // expected-error {{ambiguous use of 'overloadMismatchMultiArgs'}}
325
-
_ = g asString
326
-
327
-
leth=overloadMismatchMultiArgsLabel(0){} // expected-error {{ambiguous use of 'overloadMismatchMultiArgsLabel'}}
328
-
// expected-note@-1 {{use an explicit argument label instead of a trailing closure to call 'overloadMismatchMultiArgsLabel(_:a:)'}} {{43-45=, a: }} {{47-47=)}}
329
-
// expected-note@-2 {{use an explicit argument label instead of a trailing closure to call 'overloadMismatchMultiArgsLabel(_:x:y:b:)'}} {{43-45=, b: }} {{47-47=)}}
330
-
_ = h asString
331
-
332
-
leti=overloadMismatchMultiArgs2(0){} // expected-error {{ambiguous use of 'overloadMismatchMultiArgs2'}}
333
-
_ = i asString
334
-
335
-
letj=overloadMismatchMultiArgs2Label(0){} // expected-error {{ambiguous use of 'overloadMismatchMultiArgs2Label'}}
336
-
// expected-note@-1 {{use an explicit argument label instead of a trailing closure to call 'overloadMismatchMultiArgs2Label(_:z:a:)'}} {{44-46=, a: }} {{48-48=)}}
337
-
// expected-note@-2 {{use an explicit argument label instead of a trailing closure to call 'overloadMismatchMultiArgs2Label(_:x:y:b:)'}} {{44-46=, b: }} {{48-48=)}}
338
-
_ = j asString
302
+
leta=overloadMismatch{}
303
+
_ = a asString // expected-error {{cannot convert value of type 'Bool' to type 'String' in coercion}}
304
+
letb=overloadMismatch(){}
305
+
_ = b asString // expected-error {{cannot convert value of type 'Bool' to type 'String' in coercion}}
306
+
307
+
letc=overloadMismatchLabel{}
308
+
_ = c asString // expected-error {{cannot convert value of type 'Bool' to type 'String' in coercion}}
309
+
letd=overloadMismatchLabel(){}
310
+
_ = d asString // expected-error {{cannot convert value of type 'Bool' to type 'String' in coercion}}
311
+
312
+
lete=overloadMismatchArgs(0){}
313
+
_ = e asString // expected-error {{cannot convert value of type 'Bool' to type 'String' in coercion}}
314
+
315
+
letf=overloadMismatchArgsLabel(0){}
316
+
_ = f asString // expected-error {{cannot convert value of type 'Bool' to type 'String' in coercion}}
317
+
318
+
letg=overloadMismatchMultiArgs(0){}
319
+
_ = g asString // expected-error {{cannot convert value of type 'Bool' to type 'String' in coercion}}
320
+
321
+
leth=overloadMismatchMultiArgsLabel(0){}
322
+
_ = h asString // expected-error {{cannot convert value of type 'Bool' to type 'String' in coercion}}
323
+
324
+
leti=overloadMismatchMultiArgs2(0){}
325
+
_ = i asString // expected-error {{cannot convert value of type 'Bool' to type 'String' in coercion}}
326
+
327
+
letj=overloadMismatchMultiArgs2Label(0){}
328
+
_ = j asString // expected-error {{cannot convert value of type 'Bool' to type 'String' in coercion}}
339
329
}
340
330
341
331
func variadic(_:(()->Void)...){}
342
332
func variadicLabel(closures:(()->Void)...){}
343
333
344
-
func variadicOverloadMismatch(_:(()->Void)...)->Bool{returntrue} // expected-note 2 {{found this candidate}}
345
-
func variadicOverloadMismatch(x:Int=0, _:(()->Void)...)->Int{return0} // expected-note 2 {{found this candidate}}
0 commit comments