You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@objc var foo: Any // expected-error {{@objc can only be used with members of classes, @objc protocols, and concrete extensions of classes}}
class Foo: NSObject {
override init() {}
@objc var property: Any
@objc func method(x: Any) -> Any { return x }
@objc func indirectAny(x: UnsafePointer<Any>) {} // expected-error{{type of the parameter cannot be represented in Objective-C}}
// expected-note@-1 {{Swift structs cannot be represented in Objective-C}}
@objc func throwingMethod(x: Any) throws -> Any { return x }
@objc func throwingMethod(x: Any) throws -> Any? { return x } // expected-error{{throwing method cannot be marked @objc because it returns a value of optional type 'Any?'; 'nil' indicates failure to Objective-C}}