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
SR-4827 Incorrect result resolving type for Obj-C block
Issue Description:
When some Swift class has @objc name override, and some Obj-C class has method which returns the Swift class instance, then the Obj-C method is not visible in all the Swift code in the same framework (it is visible in the main app, not in framework).
classProblemHere {
leto = ObjC_Class()
// `ObjC_Class.createSwiftClassObject()` returns `Swift_Class` instance,// `Swift_Class` has `@objc(Swift_Class_ForObjC)` – this makes the method// invisible for other Swift code.funcfollowingLineDoesNotCompile() {
_ = o.createSwiftClassObject()
}
}
Environment
Xcode 10.0 beta (10L176w)
Xcode 9.4.1 (9F2000)
Additional Detail from JIRA
md5: 0bf9867bbcaabbe05421c979c5b5808c
duplicates:
Issue Description:
When some Swift class has
@objc
name override, and some Obj-C class has method which returns the Swift class instance, then the Obj-C method is not visible in all the Swift code in the same framework (it is visible in the main app, not in framework).Swift class:
Obj-C header:
Obj-C implementation:
Problematic Swift code:
Results:
After removing
Swift_Class_ForObjC
name override (and fixing all references), the code starts to compile.Sample project: https://github.com/kam800/ObjcSwiftBridgingProblem
The text was updated successfully, but these errors were encountered: