File tree Expand file tree Collapse file tree 2 files changed +29
-26
lines changed Expand file tree Collapse file tree 2 files changed +29
-26
lines changed Original file line number Diff line number Diff line change @@ -144,15 +144,17 @@ func testTypoCorrection() {
144
144
let _: String = #keyPath( A . proString) // expected-error {{type 'A' has no member 'proString'}}
145
145
}
146
146
147
- class SR_10146_1 {
147
+ // https://github.com/apple/swift/issues/52548
148
+
149
+ class C2 {
148
150
@objc let b = 1
149
151
}
150
152
151
- class SR_10146_2 : SR_10146_1 {
153
+ class C1_52548 : C2 {
152
154
let a = \AnyObject . b // expected-error {{the root type of a Swift key path cannot be 'AnyObject'}}
153
155
}
154
156
155
- class SR_10146_3 {
157
+ class C2_52548 {
156
158
@objc let abc : Int = 1
157
159
158
160
func doNotCrash( ) {
Original file line number Diff line number Diff line change @@ -120,33 +120,34 @@ func testParseErrors4() {
120
120
_ = #selector( C1 . subscript) // expected-error{{type 'C1' has no member 'subscript'}}
121
121
}
122
122
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
+ }
133
133
134
- @objc class SR1827 {
135
- @objc func bar( ) { }
136
- }
134
+ @objc class C {
135
+ @objc func bar( ) { }
136
+ }
137
137
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
+ }
147
148
}
148
149
149
- // SR-9391
150
+ // https://github.com/apple/swift/issues/51857
150
151
151
152
protocol SomeProtocol {
152
153
func someFunction( )
You can’t perform that action at this time.
0 commit comments