Skip to content

Commit 65663b0

Browse files
committed
Gardening: Migrate test suite to GH issues: expr/primary
1 parent 2a220d5 commit 65663b0

File tree

2 files changed

+29
-26
lines changed

2 files changed

+29
-26
lines changed

test/expr/primary/keypath/keypath-objc.swift

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,15 +144,17 @@ func testTypoCorrection() {
144144
let _: String = #keyPath(A.proString) // expected-error {{type 'A' has no member 'proString'}}
145145
}
146146

147-
class SR_10146_1 {
147+
// https://github.com/apple/swift/issues/52548
148+
149+
class C2 {
148150
@objc let b = 1
149151
}
150152

151-
class SR_10146_2: SR_10146_1 {
153+
class C1_52548: C2 {
152154
let a = \AnyObject.b // expected-error {{the root type of a Swift key path cannot be 'AnyObject'}}
153155
}
154156

155-
class SR_10146_3 {
157+
class C2_52548 {
156158
@objc let abc: Int = 1
157159

158160
func doNotCrash() {

test/expr/primary/selector/selector.swift

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -120,33 +120,34 @@ func testParseErrors4() {
120120
_ = #selector(C1.subscript) // expected-error{{type 'C1' has no member 'subscript'}}
121121
}
122122

123-
// SR-1827
124-
125-
let optionalSel: Selector? = nil
126-
127-
switch optionalSel {
128-
case #selector(C1.method1)?:
129-
break
130-
default:
131-
break
132-
}
123+
// https://github.com/apple/swift/issues/44436
124+
do {
125+
let optionalSel: Selector?
126+
127+
switch optionalSel {
128+
case #selector(C1.method1)?:
129+
break
130+
default:
131+
break
132+
}
133133

134-
@objc class SR1827 {
135-
@objc func bar() {}
136-
}
134+
@objc class C {
135+
@objc func bar() {}
136+
}
137137

138-
switch optionalSel {
139-
case #selector(SR1827.bar):
140-
break
141-
case #selector(SR1827.bar)!: // expected-error{{cannot force unwrap value of non-optional type 'Selector'}}
142-
break
143-
case #selector(SR1827.bar)?:
144-
break
145-
default:
146-
break
138+
switch optionalSel {
139+
case #selector(C.bar):
140+
break
141+
case #selector(C.bar)!: // expected-error{{cannot force unwrap value of non-optional type 'Selector'}}
142+
break
143+
case #selector(C.bar)?:
144+
break
145+
default:
146+
break
147+
}
147148
}
148149

149-
// SR-9391
150+
// https://github.com/apple/swift/issues/51857
150151

151152
protocol SomeProtocol {
152153
func someFunction()

0 commit comments

Comments
 (0)