File tree Expand file tree Collapse file tree 3 files changed +13
-0
lines changed Expand file tree Collapse file tree 3 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -598,6 +598,13 @@ class JSONFixitWriter : public DiagnosticConsumer {
598
598
if (Info.ID == diag::objc_witness_selector_mismatch.ID ||
599
599
Info.ID == diag::witness_non_objc.ID )
600
600
return false ;
601
+ // This interacts badly with the migrator. For such code:
602
+ // func test(p: Int, _: String) {}
603
+ // test(0, "")
604
+ // the compiler bizarrely suggests to change order of arguments in the call
605
+ // site.
606
+ if (Info.ID == diag::argument_out_of_order_unnamed_unnamed.ID )
607
+ return false ;
601
608
// The following interact badly with the swift migrator by removing @IB*
602
609
// attributes when there is some unrelated type issue.
603
610
if (Info.ID == diag::invalid_iboutlet.ID ||
Original file line number Diff line number Diff line change @@ -256,3 +256,6 @@ func testProtocolCompositionSyntax() {
256
256
var _: protocol < Prot1 >
257
257
var _: protocol < Prot1 , Prot2 >
258
258
}
259
+
260
+ func disable_unnamed_param_reorder( p: Int , _: String ) { }
261
+ disable_unnamed_param_reorder ( 0 , " " ) // no change.
Original file line number Diff line number Diff line change @@ -259,3 +259,6 @@ func testProtocolCompositionSyntax() {
259
259
var _: Prot1
260
260
var _: Prot1 & Prot2
261
261
}
262
+
263
+ func disable_unnamed_param_reorder(p: Int, _: String) {}
264
+ disable_unnamed_param_reorder(0, "") // no change.
You can’t perform that action at this time.
0 commit comments