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
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}}
1283
+
letc1_51319=fatalError() // expected-warning {{constant 'c1_51319' inferred to have type 'Never', which is an enum with no cases}} expected-note {{add an explicit type annotation to silence this warning}} {{13-13=: Never}}
1282
1284
1283
-
letsr8811b:Never=fatalError() // Ok
1285
+
letc2_51319:Never=fatalError() // Ok
1284
1286
1285
-
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)}}
1287
+
letc3_51319=(16,fatalError()) // expected-warning {{constant 'c3_51319' inferred to have type '(Int, Never)', which contains an enum with no cases}} expected-note {{add an explicit type annotation to silence this warning}} {{13-13=: (Int, Never)}}
1286
1288
1287
-
letsr8811d:(Int,Never)=(16,fatalError()) // Ok
1289
+
letc4_51319:(Int,Never)=(16,fatalError()) // Ok
1288
1290
1289
-
// SR-10995
1291
+
// https://github.com/apple/swift/issues/53385
1290
1292
1291
-
classSR_10995{
1293
+
classC_53385{
1292
1294
func makeDoubleOptionalNever()->Never??{
1293
1295
returnnil
1294
1296
}
@@ -1297,7 +1299,7 @@ class SR_10995 {
1297
1299
returnnil
1298
1300
}
1299
1301
1300
-
funcsr_10995_foo(){
1302
+
funcf_53385(){
1301
1303
letdoubleOptionalNever=makeDoubleOptionalNever() // expected-warning {{constant 'doubleOptionalNever' inferred to have type 'Never??', which may be unexpected}}
1302
1304
// expected-note@-1 {{add an explicit type annotation to silence this warning}} {{28-28=: Never??}}
1303
1305
// expected-warning@-2 {{initialization of immutable value 'doubleOptionalNever' was never used; consider replacing with assignment to '_' or removing it}}
@@ -1307,45 +1309,46 @@ class SR_10995 {
1307
1309
}
1308
1310
}
1309
1311
1310
-
// SR-9267
1312
+
// https://github.com/apple/swift/issues/51744
1311
1313
1312
-
classSR_9267{}
1313
-
extensionSR_9267{
1314
+
classC1_51744{}
1315
+
extensionC1_51744{
1314
1316
varfoo:String={ // expected-error {{extensions must not contain stored properties}} // expected-error {{function produces expected type 'String'; did you mean to call it with '()'?}} // expected-note {{Remove '=' to make 'foo' a computed property}}{{19-21=}}
1315
1317
return"Hello"
1316
1318
}
1317
1319
}
1318
1320
1319
-
enumSR_9267_E{
1320
-
varSR_9267_prop:String={ // expected-error {{enums must not contain stored properties}} // expected-error {{function produces expected type 'String'; did you mean to call it with '()'?}} // expected-note {{Remove '=' to make 'SR_9267_prop' a computed property}}{{28-30=}}
1321
+
enumE_51744{
1322
+
varprop:String={ // expected-error {{enums must not contain stored properties}} // expected-error {{function produces expected type 'String'; did you mean to call it with '()'?}} // expected-note {{Remove '=' to make 'prop' a computed property}}{{20-22=}}
1321
1323
return"Hello"
1322
1324
}
1323
1325
}
1324
1326
1325
-
varSR_9267_prop_1:Int={ // expected-error {{function produces expected type 'Int'; did you mean to call it with '()'?}} // expected-note {{Remove '=' to make 'SR_9267_prop_1' a computed property}}{{25-27=}}
1327
+
varv_51744:Int={ // expected-error {{function produces expected type 'Int'; did you mean to call it with '()'?}} // expected-note {{Remove '=' to make 'v_51744' a computed property}}{{18-20=}}
1326
1328
return0
1327
1329
}
1328
1330
1329
-
classSR_9267_C{
1330
-
varSR_9267_prop_2:String={ // expected-error {{function produces expected type 'String'; did you mean to call it with '()'?}} // expected-note {{Remove '=' to make 'SR_9267_prop_2' a computed property}}{{30-32=}}
1331
+
classC2_51744{
1332
+
varprop:String={ // expected-error {{function produces expected type 'String'; did you mean to call it with '()'?}} // expected-note {{Remove '=' to make 'prop' a computed property}}{{20-22=}}
1331
1333
return"Hello"
1332
1334
}
1333
1335
}
1334
1336
1335
-
classSR_9267_C2{
1336
-
letSR_9267_prop_3:Int={return0} // expected-error {{function produces expected type 'Int'; did you mean to call it with '()'?}} // expected-note {{Remove '=' to make 'SR_9267_prop_3' a computed property}}{{3-6=var}}{{27-29=}}
1337
+
classC3_51744{
1338
+
letprop:Int={return0} // expected-error {{function produces expected type 'Int'; did you mean to call it with '()'?}} // expected-note {{Remove '=' to make 'prop' a computed property}}{{3-6=var}}{{17-19=}}
1337
1339
}
1338
1340
1339
1341
classLazyPropInClass{
1340
1342
lazy varfoo:Int={return0} // expected-error {{function produces expected type 'Int'; did you mean to call it with '()'?}}
1341
1343
// expected-note@-1 {{Remove '=' to make 'foo' a computed property}}{{21-23=}}{{3-8=}}
1342
1344
}
1343
1345
1344
-
// SR-15657
1345
-
enumSR15657{
1346
+
// https://github.com/apple/swift/issues/57936
1347
+
1348
+
enumE1_57936{
1346
1349
varfoo:Int{} // expected-error{{missing return in accessor expected to return 'Int'}}
1347
1350
}
1348
1351
1349
-
enumSR15657_G<T>{
1352
+
enumE2_57936<T>{
1350
1353
varfoo:T{} // expected-error{{missing return in accessor expected to return 'T'}}
0 commit comments