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
Mark tuple splat and ++/-- as errors instead of warnings. This
wraps up SE-0004 and SE-0029.
I consider the diagnostic changes in Constraints/lvalues.swift to be
indicative of a QoI regression, but I'll deal with that separately.
// expected-warning @+1 {{'++' is deprecated: it will be removed in Swift 3}}
3
+
// expected-error @+1 {{'++' is unavailable: it has been removed in Swift 3}}
4
4
for var a =0; a <10; a++{ // expected-warning {{C-style for statement is deprecated and will be removed in a future version of Swift}} {{5-9=}} {{10-13= in }} {{14-20= ..< }} {{22-27=}}
5
5
}
6
6
7
-
// expected-warning @+1 {{'++' is deprecated: it will be removed in Swift 3}}
7
+
// expected-error @+1 {{'++' is unavailable: it has been removed in Swift 3}}
8
8
for var b =0; b <10; ++b { // expected-warning {{C-style for statement is deprecated and will be removed in a future version of Swift}} {{5-9=}} {{10-13= in }} {{14-20= ..< }} {{22-27=}}
9
9
}
10
10
11
-
// expected-warning @+1 {{'++' is deprecated: it will be removed in Swift 3}}
11
+
// expected-error @+1 {{'++' is unavailable: it has been removed in Swift 3}}
12
12
for var c=1;c != 5 ;++c { // expected-warning {{C-style for statement is deprecated and will be removed in a future version of Swift}} {{5-9=}} {{10-11= in }} {{12-18= ..< }} {{20-24=}}
13
13
}
14
14
15
-
// expected-warning @+1 {{'++' is deprecated: it will be removed in Swift 3}}
15
+
// expected-error @+1 {{'++' is unavailable: it has been removed in Swift 3}}
16
16
for var d=100;d<5;d++{ // expected-warning {{C-style for statement is deprecated and will be removed in a future version of Swift}} {{5-9=}} {{10-11= in }} {{14-17= ..< }} {{18-22=}}
17
17
}
18
18
19
19
// next three aren't auto-fixable
20
-
// expected-warning @+1 {{'++' is deprecated: it will be removed in Swift 3}}
20
+
// expected-error @+1 {{'++' is unavailable: it has been removed in Swift 3}}
21
21
for var e =3; e >4; e++{ // expected-warning {{C-style for statement is deprecated and will be removed in a future version of Swift}} {{none}}
22
22
}
23
23
24
-
// expected-warning @+1 {{'--' is deprecated: it will be removed in Swift 3}}
24
+
// expected-error @+1 {{'--' is unavailable: it has been removed in Swift 3}}
25
25
for var f =3; f <4; f--{ // expected-warning {{C-style for statement is deprecated and will be removed in a future version of Swift}} {{none}}
26
26
}
27
27
28
28
letstart=Int8(4)
29
29
letcount=Int8(10)
30
30
varother=Int8(2)
31
31
32
-
// expected-warning @+1 {{'++' is deprecated: it will be removed in Swift 3}}
32
+
// expected-error @+1 {{'++' is unavailable: it has been removed in Swift 3}}
33
33
for ; other<count; other++{ // expected-warning {{C-style for statement is deprecated and will be removed in a future version of Swift}} {{none}}
34
34
}
35
35
36
36
// this should be fixable, and keep the type
37
-
// expected-warning @+1 {{'++' is deprecated: it will be removed in Swift 3}}
37
+
// expected-error @+1 {{'++' is unavailable: it has been removed in Swift 3}}
38
38
for (var number:Int8= start; number < count; number++){ // expected-warning {{C-style for statement is deprecated and will be removed in a future version of Swift}} {{6-10=}} {{23-26= in }} {{31-42= ..< }} {{47-57=}}
39
39
print(number)
40
40
}
41
41
42
42
// should produce extra note
43
-
// expected-warning @+1 {{'++' is deprecated: it will be removed in Swift 3}}
43
+
// expected-error @+1 {{'++' is unavailable: it has been removed in Swift 3}}
44
44
for (var m: Int8 = start; m < count; ++m){ // expected-warning {{C-style for statement is deprecated and will be removed in a future version of Swift}} {{none}} expected-note {{C-style for statement can't be automatically fixed to for-in, because the loop variable is modified inside the loop}}
45
45
m +=3
46
46
}
@@ -52,6 +52,6 @@ for var o = 2; o < 888; o += 11 { // expected-warning {{C-style for statement is
52
52
}
53
53
54
54
// could theoretically fix this with "..."
55
-
// expected-warning @+1 {{'++' is deprecated: it will be removed in Swift 3}}
55
+
// expected-error @+1 {{'++' is unavailable: it has been removed in Swift 3}}
56
56
for var p =2; p <=8; p++{ // expected-warning {{C-style for statement is deprecated and will be removed in a future version of Swift}} {{none}}
0 commit comments