Open swift-ci opened 6 years ago
I don't think you're even supposed to use @objcMembers
on Linux, but that puts this in the same camp as SR-3332.
Comment by Alek Slater (JIRA)
Yeah, I mean I don't need the objc stuff in Linux obviously, but I'm using the same code on iOS as I plan to on Linux.
Attachment: Download
Environment
Linux Swift 4.1Additional Detail from JIRA
| | | |------------------|-----------------| |Votes | 0 | |Component/s | Compiler | |Labels | Bug | |Assignee | None | |Priority | Medium | md5: 287e65c4f37603a06f01779cf622035drelates to:
Issue Description:
It appears that a NSObject subclass with the @objcMembers and a bool property fail to build on Linux. Commenting out the @objcMembers annotation, and it builds fine. Likewise, leaving the @objcMembers annotation on there and changing the bool property to an int property, also compiles fine.
\<unknown>:0: error: could not find Objective-C bridge type for type 'Bool'; did you forget to import Foundation?
\<unknown>:0: error: fatal error encountered during compilation; please file a bug report with your project and the crash log
\<unknown>:0: note: unable to set up the ObjC bridge!
Is there any way to workaround this? I've tried
#if os(iOS) @objcMembers #endif
without any luck.