microsoft / WinObjC

Objective-C for Windows
MIT License
6.24k stars 813 forks source link

NS_SWIFT_NAME macro not supported #2807

Open calbot opened 6 years ago

calbot commented 6 years ago

I'm referencing Cocoa Lumberjack which uses NS_SWIFT_NAME

Like this...

+ (void)log:(BOOL)asynchronous
    message:(DDLogMessage *)logMessage NS_SWIFT_NAME(log(asynchronous:message:));

I get the error message

Error expected ';' after method prototype CocoaLumberjack

DHowett-MSFT commented 6 years ago

Hi @calbot, WinObjC doesn't support any of the Swift annotation macros. If you need to unblock further progress, you can add #define NS_SWIFT_NAME(...) to your Prefix header to suppress the emission of the annotation.

calbot commented 6 years ago

Is support for these macros planned or is should we expect to have to always define them ourselves?

DHowett-MSFT commented 6 years ago

Since Swift is currently out-of-plan (#25), we won't be able to fully support them. I'll move this over to @MSFTFox to see if we can implement some stub macros that get newer code compiling.