Skip to content

Commit 2a220d5

Browse files
committed
Gardening: Migrate test suite to GH issues: expr/postfix
1 parent 8cd1df4 commit 2a220d5

File tree

2 files changed

+29
-23
lines changed

2 files changed

+29
-23
lines changed

test/expr/postfix/dot/dot_keywords.swift

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -39,58 +39,63 @@ class SE0071Derived : SE0071Base {
3939
}
4040
}
4141

42-
// SR-3043: Diagnostics when accessing deinit
42+
// https://github.com/apple/swift/issues/45633
43+
// Diagnostics when accessing deinit
4344

44-
class SR3043Base {
45-
}
45+
class Base {}
4646

47-
class SR3043Derived: SR3043Base {
47+
class Derived: Base {
4848
deinit {
4949
super.deinit() // expected-error {{deinitializers cannot be accessed}}
5050
}
5151
}
5252

53-
let sr3043 = SR3043Derived()
54-
sr3043.deinit() // expected-error {{deinitializers cannot be accessed}}
55-
sr3043.deinit // expected-error {{deinitializers cannot be accessed}}
56-
SR3043Derived.deinit() // expected-error {{deinitializers cannot be accessed}}
53+
do {
54+
let derived = Derived()
55+
derived.deinit() // expected-error {{deinitializers cannot be accessed}}
56+
derived.deinit // expected-error {{deinitializers cannot be accessed}}
57+
Derived.deinit() // expected-error {{deinitializers cannot be accessed}}
58+
}
5759

5860
// Allow deinit functions in classes
5961

6062
class ClassWithDeinitFunc {
6163
func `deinit`() {
6264
}
6365

64-
func `deinit`(a: SR3043Base) {
66+
func `deinit`(a: Base) {
6567
}
6668
}
6769

68-
let instanceWithDeinitFunc = ClassWithDeinitFunc()
69-
instanceWithDeinitFunc.deinit()
70-
_ = instanceWithDeinitFunc.deinit(a:)
71-
_ = instanceWithDeinitFunc.deinit as () -> Void
72-
SR3043Derived.deinit() // expected-error {{deinitializers cannot be accessed}}
73-
7470
class ClassWithDeinitMember {
75-
var `deinit`: SR3043Base?
71+
var `deinit`: Base?
72+
}
73+
74+
do {
75+
let instanceWithDeinitFunc = ClassWithDeinitFunc()
76+
instanceWithDeinitFunc.deinit()
77+
_ = instanceWithDeinitFunc.deinit(a:)
78+
_ = instanceWithDeinitFunc.deinit as () -> Void
79+
80+
let instanceWithDeinitMember = ClassWithDeinitMember()
81+
_ = instanceWithDeinitMember.deinit
7682
}
7783

78-
let instanceWithDeinitMember = ClassWithDeinitMember()
79-
_ = instanceWithDeinitMember.deinit
8084

85+
// https://github.com/apple/swift/issues/48285
86+
// Fix variable name in nested static value
8187

82-
// SR-5715 : Fix variable name in nested static value
83-
struct SR5715 {
88+
struct S {
8489
struct A {
8590
struct B {}
8691
}
8792
}
8893

89-
extension SR5715.A.B {
94+
extension S.A.B {
9095
private static let x: Int = 5
9196

9297
func f() -> Int {
93-
return x // expected-error {{static member 'x' cannot be used on instance of type 'SR5715.A.B'}} {{12-12=SR5715.A.B.}}
98+
return x // expected-error {{static member 'x' cannot be used on instance of type 'S.A.B'}} {{12-12=S.A.B.}}
9499
}
95100
}
96101

test/expr/postfix/dot/init_ref_delegation.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,8 @@ struct MultipleMemberAccesses {
542542
}
543543
}
544544

545-
func sr10670() {
545+
// https://github.com/apple/swift/issues/53069
546+
do {
546547
struct S {
547548
init(_ x: inout String) {} // expected-note {{candidate expects in-out value of type 'String' for parameter #1}}
548549
init(_ x: inout [Int]) {} // expected-note {{candidate expects in-out value of type '[Int]' for parameter #1}}

0 commit comments

Comments
 (0)