swift
37c41827 - [cxx-interop] Allow old spelling of AppKit constants

Commit
89 days ago
[cxx-interop] Allow old spelling of AppKit constants AppKit defines certain constants in Objective-C, and then renames them into different constants in Swift, e.g. `NSUpArrowFunctionKey` is renamed into `NSEvent.SpecialKey.upArrow.rawValue`. In addition to that, AppKit also re-defines these constants in pure-Swift, which isn't the intended mechanism for renaming such constants. Prior to https://github.com/llvm/llvm-project/pull/145947, Clang was silently dropping the `SwiftName` API Notes attributes on these constants due to a bug in the name validation mechanism. Clients of AppKit relied on that behavior and continued to use the old spelling in Swift. To preserve source compatibility and avoid a deprecation error, let's continue dropping the `SwiftName` attribute on select constants from AppKit. rdar://157485334
Author
Parents
Loading