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' enum case declaration defines multiple enum cases with the same Objective-C name", ())
3052
3055
3056
+
ERROR(objc_extension_not_class,none,
3057
+
"'@objc' can only be applied to an extension of a class", ())
3058
+
3053
3059
// If you change this, also change enum ObjCReason
3054
-
#defineOBJC_ATTR_SELECT"select{marked @_cdecl|marked dynamic|marked @objc|marked @IBOutlet|marked @IBAction|marked @NSManaged|a member of an @objc protocol|implicitly @objc|an @objc override|an implementation of an @objc requirement|marked @IBInspectable|marked @GKInspectable}"
3060
+
#defineOBJC_ATTR_SELECT"select{marked @_cdecl|marked dynamic|marked @objc|marked @IBOutlet|marked @IBAction|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)}"
// CHECK-LABEL: @objc final func objc_ext_objc_okay(_: Int) {
2164
+
finalfunc objc_ext_objc_okay(_:Int){}
2165
+
2166
+
finalfunc objc_ext_objc_not_okay(_:PlainStruct){}
2167
+
// expected-error@-1{{method cannot be in an @objc extension of a class (without @nonobjc) because the type of the parameter cannot be represented in Objective-C}}
2168
+
// expected-note@-2 {{Swift structs cannot be represented in Objective-C}}
2169
+
2170
+
// CHECK-LABEL: {{^}} @nonobjc final func objc_ext_objc_explicit_nonobjc(_: PlainStruct) {
func notInferredObjC(){} // expected-note{{add '@objc' to expose this instance method to Objective-C}}
37
+
}
38
+
39
+
func selectorTestFail(){
40
+
_ = #selector(SomeClassWithObjCMembers.notInferredObjC) // expected-error{{argument of '#selector' refers to instance method 'notInferredObjC()' that is not exposed to Objective-C}}
0 commit comments