ObjC BOOL Property Getter Mismatch #78257
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
triage needed
This issue needs more specific labels
Description
When using an Objective-C BOOL property that has a custom getter method, the compiler uses the getter method's name directly instead of the property name. This behavior seems to be specific to BOOL properties and doesn't seem to occur with other property types, such as C99 bool.
Reproduction
If we have this ObjC class.
The compiler will generate this swift interface
Expected behavior
Using the ObjC class the output should be
Environment
swift-driver version: 1.115 Apple Swift version 6.0 (swiftlang-6.0.0.9.10 clang-1600.0.26.2)
Target: arm64-apple-macosx15.0
Additional information
Using custom getters like are relatively rare in ObjC.
There are a few different workarounds:
NS_SWIFT_NAME()
BOOL
The text was updated successfully, but these errors were encountered: