Skip to content

Commit 73f2a25

Browse files
Merge pull request #60761 from AnthonyLatsis/migrate-test-suite-to-gh-issues-10
Gardening: Migrate test suite to GH issues p. 10
2 parents b1a939f + 97e122f commit 73f2a25

9 files changed

+176
-154
lines changed

test/decl/var/NSManaged_properties.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class SwiftGizmo : A {
5252
@NSManaged class func mutableArrayValueForA() {} // expected-error {{@NSManaged only allowed on an instance property or method}}
5353
// expected-error@-1 {{@NSManaged method cannot have a body; it must be provided at runtime}}
5454

55-
// SR-1050: don't assert
55+
// (https://github.com/apple/swift/issues/43662) Don't assert.
5656
@NSManaged var multiA, multiB, multiC : NSNumber?
5757

5858
override init() {}

test/decl/var/didset_oldvalue.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
import Swift
55

6-
// SR-11297
6+
// https://github.com/apple/swift/issues/53698
77

88
// Do not call the getter to fetch the oldValue when oldValue is not
99
// referenced in the body

test/decl/var/lazy_properties.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,8 @@ struct Outer {
124124
}
125125
}
126126

127-
// https://bugs.swift.org/browse/SR-2616
127+
// https://github.com/apple/swift/issues/45221
128+
128129
struct Construction {
129130
init(x: Int, y: Int? = 42) { }
130131
}

test/decl/var/properties.swift

Lines changed: 48 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1227,40 +1227,42 @@ class r24314506 { // expected-error {{class 'r24314506' has no initializers}}
12271227
}
12281228

12291229

1230-
// https://bugs.swift.org/browse/SR-3893
1230+
// https://github.com/apple/swift/issues/46478
12311231
// Generic type is not inferenced from its initial value for properties with
1232-
// will/didSet
1233-
struct SR3893Box<Foo> {
1234-
let value: Foo
1235-
}
1232+
// observers.
1233+
do {
1234+
struct Box<Foo> {
1235+
let value: Foo
1236+
}
12361237

1237-
struct SR3893 {
1238-
// Each of these "bad" properties used to produce errors.
1239-
var bad: SR3893Box = SR3893Box(value: 0) {
1240-
willSet {
1241-
print(newValue.value)
1238+
struct S {
1239+
// Each of these "bad" properties used to produce errors.
1240+
var bad: Box = Box(value: 0) {
1241+
willSet {
1242+
print(newValue.value)
1243+
}
12421244
}
1243-
}
12441245

1245-
var bad2: SR3893Box = SR3893Box(value: 0) {
1246-
willSet(new) {
1247-
print(new.value)
1246+
var bad2: Box = Box(value: 0) {
1247+
willSet(new) {
1248+
print(new.value)
1249+
}
12481250
}
1249-
}
12501251

1251-
var bad3: SR3893Box = SR3893Box(value: 0) {
1252-
didSet {
1253-
print(oldValue.value)
1252+
var bad3: Box = Box(value: 0) {
1253+
didSet {
1254+
print(oldValue.value)
1255+
}
12541256
}
1255-
}
12561257

1257-
var good: SR3893Box<Int> = SR3893Box(value: 0) {
1258-
didSet {
1259-
print(oldValue.value)
1258+
var good: Box<Int> = Box(value: 0) {
1259+
didSet {
1260+
print(oldValue.value)
1261+
}
12601262
}
1261-
}
12621263

1263-
var plain: SR3893Box = SR3893Box(value: 0)
1264+
var plain: Box = Box(value: 0)
1265+
}
12641266
}
12651267

12661268
protocol WFI_P1 : class {}
@@ -1276,19 +1278,19 @@ class WeakFixItTest {
12761278
weak var bar : WFI_P1 & WFI_P2
12771279
}
12781280

1279-
// SR-8811 (Warning)
1281+
// https://github.com/apple/swift/issues/51319 (Warning)
12801282

1281-
let sr8811a = 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+
let c1_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}}
12821284

1283-
let sr8811b: Never = fatalError() // Ok
1285+
let c2_51319: Never = fatalError() // Ok
12841286

1285-
let sr8811c = (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+
let c3_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)}}
12861288

1287-
let sr8811d: (Int, Never) = (16, fatalError()) // Ok
1289+
let c4_51319: (Int, Never) = (16, fatalError()) // Ok
12881290

1289-
// SR-10995
1291+
// https://github.com/apple/swift/issues/53385
12901292

1291-
class SR_10995 {
1293+
class C_53385 {
12921294
func makeDoubleOptionalNever() -> Never?? {
12931295
return nil
12941296
}
@@ -1297,7 +1299,7 @@ class SR_10995 {
12971299
return nil
12981300
}
12991301

1300-
func sr_10995_foo() {
1302+
func f_53385() {
13011303
let doubleOptionalNever = makeDoubleOptionalNever() // expected-warning {{constant 'doubleOptionalNever' inferred to have type 'Never??', which may be unexpected}}
13021304
// expected-note@-1 {{add an explicit type annotation to silence this warning}} {{28-28=: Never??}}
13031305
// 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 {
13071309
}
13081310
}
13091311

1310-
// SR-9267
1312+
// https://github.com/apple/swift/issues/51744
13111313

1312-
class SR_9267 {}
1313-
extension SR_9267 {
1314+
class C1_51744 {}
1315+
extension C1_51744 {
13141316
var foo: 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=}}
13151317
return "Hello"
13161318
}
13171319
}
13181320

1319-
enum SR_9267_E {
1320-
var SR_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+
enum E_51744 {
1322+
var 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 'prop' a computed property}}{{20-22=}}
13211323
return "Hello"
13221324
}
13231325
}
13241326

1325-
var SR_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+
var v_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=}}
13261328
return 0
13271329
}
13281330

1329-
class SR_9267_C {
1330-
var SR_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+
class C2_51744 {
1332+
var prop: 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=}}
13311333
return "Hello"
13321334
}
13331335
}
13341336

1335-
class SR_9267_C2 {
1336-
let SR_9267_prop_3: Int = { return 0 } // 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+
class C3_51744 {
1338+
let prop: Int = { return 0 } // 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=}}
13371339
}
13381340

13391341
class LazyPropInClass {
13401342
lazy var foo: Int = { return 0 } // expected-error {{function produces expected type 'Int'; did you mean to call it with '()'?}}
13411343
// expected-note@-1 {{Remove '=' to make 'foo' a computed property}}{{21-23=}}{{3-8=}}
13421344
}
13431345

1344-
// SR-15657
1345-
enum SR15657 {
1346+
// https://github.com/apple/swift/issues/57936
1347+
1348+
enum E1_57936 {
13461349
var foo: Int {} // expected-error{{missing return in accessor expected to return 'Int'}}
13471350
}
13481351

1349-
enum SR15657_G<T> {
1352+
enum E2_57936<T> {
13501353
var foo: T {} // expected-error{{missing return in accessor expected to return 'T'}}
13511354
}

test/decl/var/property_wrapper_generic_aliases.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// RUN: %target-typecheck-verify-swift
22

3-
// https://bugs.swift.org/browse/SR-14143
3+
// https://github.com/apple/swift/issues/56522
44

55
@propertyWrapper
66
struct SomeLongFooName<Holder, T> {

0 commit comments

Comments
 (0)