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/decl/var/properties.swift
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -1272,11 +1272,11 @@ class WeakFixItTest {
1272
1272
1273
1273
// SR-8811 (Warning)
1274
1274
1275
-
letsr8811a=fatalError() // expected-warning {{constant 'sr8811a' inferred to have type 'Never', which is an enum with no cases}} expected-note {{add an explicit type annotation to silence this warning}}
1275
+
letsr8811a=fatalError() // expected-warning {{constant 'sr8811a' inferred to have type 'Never', which is an enum with no cases}} expected-note {{add an explicit type annotation to silence this warning}} {{12-12=: Never}}
1276
1276
1277
1277
letsr8811b:Never=fatalError() // Ok
1278
1278
1279
-
letsr8811c=(16,fatalError()) // expected-warning {{constant 'sr8811c' inferred to have type '(Int, Never)', which contains an enum with no cases}} expected-note {{add an explicit type annotation to silence this warning}}
1279
+
letsr8811c=(16,fatalError()) // expected-warning {{constant 'sr8811c' inferred to have type '(Int, Never)', which contains an enum with no cases}} expected-note {{add an explicit type annotation to silence this warning}} {{12-12=: (Int, Never)}}
1280
1280
1281
1281
letsr8811d:(Int,Never)=(16,fatalError()) // Ok
1282
1282
@@ -1292,11 +1292,11 @@ class SR_10995 {
1292
1292
}
1293
1293
1294
1294
func sr_10995_foo(){
1295
-
letdoubleOptionalNever=makeDoubleOptionalNever() // expected-warning {{constant 'doubleOptionalNever' inferred to have type 'Never??', which may be unexpected}}
1296
-
// expected-note@-1 {{add an explicit type annotation to silence this warning}}
1295
+
letdoubleOptionalNever=makeDoubleOptionalNever() // expected-warning {{constant 'doubleOptionalNever' inferred to have type 'Never??', which may be unexpected}}
1296
+
// expected-note@-1 {{add an explicit type annotation to silence this warning}} {{28-28=: Never??}}
1297
1297
// expected-warning@-2 {{initialization of immutable value 'doubleOptionalNever' was never used; consider replacing with assignment to '_' or removing it}}
1298
1298
letsingleOptionalNever=makeSingleOptionalNever() // expected-warning {{constant 'singleOptionalNever' inferred to have type 'Never?', which may be unexpected}}
1299
-
// expected-note@-1 {{add an explicit type annotation to silence this warning}}
1299
+
// expected-note@-1 {{add an explicit type annotation to silence this warning}} {{28-28=: Never?}}
1300
1300
// expected-warning@-2 {{initialization of immutable value 'singleOptionalNever' was never used; consider replacing with assignment to '_' or removing it}}
varpi_f3= float.init(getPi()) // expected-error {{ambiguous use of 'init(_:)'}}
589
589
varpi_f4= float.init(pi_f)
590
590
591
-
vare=Empty(f) // expected-warning {{variable 'e' inferred to have type 'Empty', which is an enum with no cases}} expected-note {{add an explicit type annotation to silence this warning}}
591
+
vare=Empty(f) // expected-warning {{variable 'e' inferred to have type 'Empty', which is an enum with no cases}} expected-note {{add an explicit type annotation to silence this warning}} {{8-8=: Empty}}
592
592
vare2=Empty(d) // expected-error{{cannot convert value of type 'Double' to expected argument type 'Float'}}
593
-
vare3=Empty(Float(d)) // expected-warning {{variable 'e3' inferred to have type 'Empty', which is an enum with no cases}} expected-note {{add an explicit type annotation to silence this warning}}
593
+
vare3=Empty(Float(d)) // expected-warning {{variable 'e3' inferred to have type 'Empty', which is an enum with no cases}} expected-note {{add an explicit type annotation to silence this warning}} {{9-9=: Empty}}
0 commit comments