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
Besides improving diagnostics, this also allows us to track whether there were any @objc failures using the invalid bit on the @_objcImplementation attribute.
"'@objc' can only be applied to an extension of a class", ())
6101
6101
6102
6102
// If you change this, also change enum ObjCReason
6103
-
#defineOBJC_ATTR_SELECT"select{marked @_cdecl|marked dynamic|marked @objc|marked @objcMembers|marked @IBOutlet|marked @IBAction|marked @IBSegueAction|marked @NSManaged|a member of an @objc protocol|implicitly @objc|an @objc override|an implementation of an @objc requirement|marked @IBInspectable|marked @GKInspectable|in an @objc extension of a class (without @nonobjc)|marked @objc by an access note}"
6103
+
#defineOBJC_ATTR_SELECT"select{marked @_cdecl|marked dynamic|marked @objc|marked @objcMembers|marked @IBOutlet|marked @IBAction|marked @IBSegueAction|marked @NSManaged|a member of an @objc protocol|implicitly @objc|an @objc override|an implementation of an @objc requirement|marked @IBInspectable|marked @GKInspectable|in an @objc extension of a class (without @nonobjc)|in an @_objcImplementation extension of a class (without final or @nonobjc)|marked @objc by an access note}"
6104
6104
6105
6105
WARNING(attribute_meaningless_when_nonobjc,none,
6106
6106
"'@%0' attribute is meaningless on a property that cannot be "
Copy file name to clipboardExpand all lines: test/decl/ext/objc_implementation.swift
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -412,8 +412,8 @@ protocol EmptySwiftProto {}
412
412
func nullableResult()->Any{fatalError()} // expected-warning {{instance method 'nullableResult()' of type '() -> Any' does not match type '() -> Any?' declared by the header}}
413
413
func nullableArgument(_:Any){} // expected-warning {{instance method 'nullableArgument' of type '(Any) -> ()' does not match type '(Any?) -> Void' declared by the header}}
414
414
415
-
func nonPointerResult()->CInt!{fatalError()} // expected-error{{method cannot be implicitly @objc because its result type cannot be represented in Objective-C}}
416
-
func nonPointerArgument(_:CInt!){} // expected-error {{method cannot be implicitly @objc because the type of the parameter cannot be represented in Objective-C}}
415
+
func nonPointerResult()->CInt!{fatalError()} // expected-error{{method cannot be in an @_objcImplementation extension of a class (without final or @nonobjc) because its result type cannot be represented in Objective-C}}
416
+
func nonPointerArgument(_:CInt!){} // expected-error {{method cannot be in an @_objcImplementation extension of a class (without final or @nonobjc) because the type of the parameter cannot be represented in Objective-C}}
0 commit comments