File tree Expand file tree Collapse file tree 9 files changed +10
-10
lines changed Expand file tree Collapse file tree 9 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -263,7 +263,7 @@ let _: Int??? = try? producer.produceDoubleOptionalInt() // good
263
263
let _: String = try ? producer. produceDoubleOptionalInt ( ) // expected-error {{cannot convert value of type 'Int??' to specified type 'String'}}
264
264
265
265
// rdar://problem/46742002
266
- protocol Dummy : class { }
266
+ protocol Dummy : AnyObject { }
267
267
268
268
class F < T> {
269
269
func wait( ) throws -> T { fatalError ( ) }
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ extension P0 {
44
44
}
45
45
}
46
46
47
- protocol P1 : class {
47
+ protocol P1 : AnyObject {
48
48
func f( ) -> Self // okay
49
49
50
50
func g( _ ds: Self ) // okay
Original file line number Diff line number Diff line change @@ -165,7 +165,7 @@ tests.test("array value witnesses") {
165
165
expectEqual ( NoisyLifeCount, NoisyDeathCount)
166
166
}
167
167
168
- protocol Classy : class { }
168
+ protocol Classy : AnyObject { }
169
169
class A : Classy { }
170
170
class B : A { }
171
171
class C : B { }
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ protocol OtherProtocol {
15
15
var otherProperty : String { get }
16
16
}
17
17
18
- protocol OtherClassProtocol : class {
18
+ protocol OtherClassProtocol : AnyObject {
19
19
var otherClassProperty : String { get }
20
20
}
21
21
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ protocol OtherProtocol {
22
22
var otherProperty : String { get }
23
23
}
24
24
25
- protocol OtherClassProtocol : class {
25
+ protocol OtherClassProtocol : AnyObject {
26
26
var otherClassProperty : String { get }
27
27
}
28
28
Original file line number Diff line number Diff line change @@ -514,7 +514,7 @@ mirrors.test("struct/WrapNSArray") {
514
514
// Check that Mirror correctly reflects weak/unowned refs to both
515
515
// Swift and ObjC objects from Swift structs and classes.
516
516
517
- protocol WeakUnownedTestsP1 : class {
517
+ protocol WeakUnownedTestsP1 : AnyObject {
518
518
func f1( ) -> Int
519
519
}
520
520
Original file line number Diff line number Diff line change @@ -118,7 +118,7 @@ print("Fooable double:")
118
118
fooable = 2.5
119
119
dump ( fooable)
120
120
121
- protocol Barrable : class { }
121
+ protocol Barrable : AnyObject { }
122
122
extension Best : Barrable { }
123
123
124
124
// CHECK-LABEL: Barrable class:
Original file line number Diff line number Diff line change @@ -534,7 +534,7 @@ Runtime.test("abstraction barrier on casting generic param bound to existential"
534
534
class Malkovich: Malkovichable {
535
535
var malkovich: String { return "malkovich" }
536
536
}
537
- protocol Malkovichable: class {
537
+ protocol Malkovichable: AnyObject {
538
538
var malkovich: String { get }
539
539
}
540
540
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ class NativeSwiftClass : NativeClassBoundExistential {
35
35
}
36
36
}
37
37
38
- protocol NativeClassBoundExistential : class {
38
+ protocol NativeClassBoundExistential : AnyObject {
39
39
var x : Int { get }
40
40
}
41
41
class NativeSwiftClassHasWeak {
@@ -123,7 +123,7 @@ mirrors.test("class/NativeSwiftClassHasNativeWeakReferenceNoLeak") {
123
123
124
124
import Foundation
125
125
126
- @objc protocol ObjCClassExistential : class {
126
+ @objc protocol ObjCClassExistential : AnyObject {
127
127
var weakProperty : AnyObject ? { get set }
128
128
var x : Int { get }
129
129
}
You can’t perform that action at this time.
0 commit comments