Weak computed @objc property

I have a Swift extension to ObjC class declaring a computed property @objc weak var foo: Foo? { ... }. It is inspected from ObjC runtime, where code is checking for presence of the weak attribute. But the attributes I see in the runtime are "T@"Foo",N,R" - meaning nonatomic, retain.

Am I doing something wrong? It this a bug? Should weak computer properties produce an error?

See Can we forbid weak keyword for computed properties?

Terms of Service

Privacy Policy

Cookie Policy