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
263263let _: String = try ? producer. produceDoubleOptionalInt ( ) // expected-error {{cannot convert value of type 'Int??' to specified type 'String'}}
264264
265265// rdar://problem/46742002
266- protocol Dummy : class { }
266+ protocol Dummy : AnyObject { }
267267
268268class F < T> {
269269 func wait( ) throws -> T { fatalError ( ) }
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ extension P0 {
4444 }
4545}
4646
47- protocol P1 : class {
47+ protocol P1 : AnyObject {
4848 func f( ) -> Self // okay
4949
5050 func g( _ ds: Self ) // okay
Original file line number Diff line number Diff line change @@ -165,7 +165,7 @@ tests.test("array value witnesses") {
165165 expectEqual ( NoisyLifeCount, NoisyDeathCount)
166166}
167167
168- protocol Classy : class { }
168+ protocol Classy : AnyObject { }
169169class A : Classy { }
170170class B : A { }
171171class C : B { }
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ protocol OtherProtocol {
1515 var otherProperty : String { get }
1616}
1717
18- protocol OtherClassProtocol : class {
18+ protocol OtherClassProtocol : AnyObject {
1919 var otherClassProperty : String { get }
2020}
2121
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ protocol OtherProtocol {
2222 var otherProperty : String { get }
2323}
2424
25- protocol OtherClassProtocol : class {
25+ protocol OtherClassProtocol : AnyObject {
2626 var otherClassProperty : String { get }
2727}
2828
Original file line number Diff line number Diff line change @@ -514,7 +514,7 @@ mirrors.test("struct/WrapNSArray") {
514514// Check that Mirror correctly reflects weak/unowned refs to both
515515// Swift and ObjC objects from Swift structs and classes.
516516
517- protocol WeakUnownedTestsP1 : class {
517+ protocol WeakUnownedTestsP1 : AnyObject {
518518 func f1( ) -> Int
519519}
520520
Original file line number Diff line number Diff line change @@ -118,7 +118,7 @@ print("Fooable double:")
118118fooable = 2.5
119119dump ( fooable)
120120
121- protocol Barrable : class { }
121+ protocol Barrable : AnyObject { }
122122extension Best : Barrable { }
123123
124124// 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"
534534class Malkovich: Malkovichable {
535535 var malkovich: String { return "malkovich" }
536536}
537- protocol Malkovichable: class {
537+ protocol Malkovichable: AnyObject {
538538 var malkovich: String { get }
539539}
540540
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ class NativeSwiftClass : NativeClassBoundExistential {
3535 }
3636}
3737
38- protocol NativeClassBoundExistential : class {
38+ protocol NativeClassBoundExistential : AnyObject {
3939 var x : Int { get }
4040}
4141class NativeSwiftClassHasWeak {
@@ -123,7 +123,7 @@ mirrors.test("class/NativeSwiftClassHasNativeWeakReferenceNoLeak") {
123123
124124import Foundation
125125
126- @objc protocol ObjCClassExistential : class {
126+ @objc protocol ObjCClassExistential : AnyObject {
127127 var weakProperty : AnyObject ? { get set }
128128 var x : Int { get }
129129}
You can’t perform that action at this time.
0 commit comments