File tree Expand file tree Collapse file tree 3 files changed +30
-0
lines changed Expand file tree Collapse file tree 3 files changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -96,6 +96,12 @@ struct FixitFilter {
96
96
return false ;
97
97
}
98
98
99
+ // The type-checker can erroneously report this diagnostic in the case of
100
+ // mismatching closure arguments to things that now take a tuple via SE-0110.
101
+ if (Info.ID == diag::extra_argument_labels.ID ) {
102
+ return false ;
103
+ }
104
+
99
105
if (Kind == DiagnosticKind::Error)
100
106
return true ;
101
107
Original file line number Diff line number Diff line change
1
+ // RUN: %target-swift-frontend -typecheck %s -swift-version 3
2
+ // RUN: rm -rf %t && mkdir -p %t && %target-swift-frontend -c -primary-file %s -emit-migrated-file-path %t/no_extraneous_argument_labels.result -swift-version 3 -o /dev/null
3
+ // RUN: diff -u %s.expected %t/no_extraneous_argument_labels.result
4
+ // RUN: not %target-swift-frontend -typecheck %s.expected -swift-version 4
5
+
6
+ func foo( _ oc: [ String ] ) {
7
+ var args : [ String ] = [ ]
8
+ let dictionary : [ String : String ] = [ : ]
9
+ args. append ( contentsOf: oc. map { orderedColumn in
10
+ dictionary. first { ( column, value) in true } !. value
11
+ } )
12
+ }
Original file line number Diff line number Diff line change
1
+ // RUN: %target-swift-frontend -typecheck %s -swift-version 3
2
+ // RUN: rm -rf %t && mkdir -p %t && %target-swift-frontend -c -primary-file %s -emit-migrated-file-path %t/no_extraneous_argument_labels.result -swift-version 3 -o /dev/null
3
+ // RUN: diff -u %s.expected %t/no_extraneous_argument_labels.result
4
+ // RUN: not %target-swift-frontend -typecheck %s.expected -swift-version 4
5
+
6
+ func foo(_ oc: [String]) {
7
+ var args: [String] = []
8
+ let dictionary: [String: String] = [:]
9
+ args.append(contentsOf: oc.map { orderedColumn in
10
+ dictionary.first { (column, value) in true }!.value
11
+ })
12
+ }
You can’t perform that action at this time.
0 commit comments