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
Copy file name to clipboardExpand all lines: test/Parse/trailing-comma.swift
+15-3Lines changed: 15 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,10 @@ let values: [Int,] = [] // expected-note {{to match this opening '['}} expected-
9
9
// Tuple and Tuple Pattern
10
10
11
11
let _ =(a:1, b:2, c:3,)
12
+
let _:(a:Int, b:Int, c:Int,)=(a:1, b:2, c:3,)
13
+
14
+
// Closures
15
+
let _:(String,Int,Float,)->Void
12
16
13
17
let(_, _,)=(0,1,)
14
18
@@ -34,7 +38,7 @@ struct S<T1, T2,> { }
34
38
35
39
func foo<T1, T2,>(){}
36
40
37
-
protocol P<T1, T2>{
41
+
protocol P<T1, T2,>{
38
42
associatedtype T1
39
43
associatedtype T2
40
44
}
@@ -98,7 +102,7 @@ struct Foo {
98
102
99
103
}
100
104
101
-
func f(in:@differentiable(reverse,)(Int)-> Int){} // expected-warning {{@differentiable' has been renamed to '@differentiable(reverse)' and will be removed in the next release}} expected-error {{unexpected ',' separator}} expected-error {{expected ',' separator}} expected-error {{unnamed parameters must be written with the empty name '_'}}
105
+
func f(in:@differentiable(reverse,)(Int)-> Int){} // expected-warning {{@differentiable' has been renamed to '@differentiable(reverse)' and will be removed in the next release}} expected-error {{expected',' separator}} expected-error {{unnamed parameters must be written with the empty name '_'}}
0 commit comments