1010// UNSUPPORTED: back_deployment_runtime
1111
1212import ObjectiveC
13+ import Foundation
1314import _Concurrency
1415import StdlibUnittest
1516
@@ -70,7 +71,7 @@ if #available(macOS 10.4.4, iOS 12.2, watchOS 5.2, tvOS 12.2, *) {
7071}
7172
7273@available ( macOS 10 . 4 . 4 , iOS 12 . 2 , watchOS 5 . 2 , tvOS 12 . 2 , * )
73- actor ActorNSObjectSubKlass : NSObject { }
74+ @ objc actor ActorNSObjectSubKlass { }
7475
7576if #available( macOS 10 . 4 . 4 , iOS 12 . 2 , watchOS 5 . 2 , tvOS 12 . 2 , * ) {
7677 Tests . test ( " no crash when inherit from nsobject " )
@@ -79,17 +80,3 @@ if #available(macOS 10.4.4, iOS 12.2, watchOS 5.2, tvOS 12.2, *) {
7980 objc_setAssociatedObject ( x, " myKey " , " myValue " , . OBJC_ASSOCIATION_RETAIN)
8081 }
8182}
82-
83- @available ( macOS 10 . 4 . 4 , iOS 12 . 2 , watchOS 5 . 2 , tvOS 12 . 2 , * )
84- actor ActorNSObjectSubKlassGeneric < T> : NSObject {
85- var state : T
86- init ( state: T ) { self . state = state }
87- }
88-
89- if #available( macOS 10 . 4 . 4 , iOS 12 . 2 , watchOS 5 . 2 , tvOS 12 . 2 , * ) {
90- Tests . test ( " no crash when generic inherit from nsobject " )
91- . code {
92- let x = ActorNSObjectSubKlassGeneric ( state: 5 )
93- objc_setAssociatedObject ( x, " myKey " , " myValue " , . OBJC_ASSOCIATION_RETAIN)
94- }
95- }
0 commit comments