Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-15815] [5.6] @objc attribute disappears on overridden member #58092

Open
johnfairh opened this issue Feb 3, 2022 · 0 comments
Open

[SR-15815] [5.6] @objc attribute disappears on overridden member #58092

johnfairh opened this issue Feb 3, 2022 · 0 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior.

Comments

@johnfairh
Copy link
Contributor

Previous ID SR-15815
Radar None
Original Reporter @johnfairh
Type Bug

Attachment: Download

Environment

Xcode 13.3 beta (13E5086k)

macOS 12.1 intel

swift-driver version: 1.44.2 Apple Swift version 5.6 (swiftlang-5.6.0.320.8 clang-1316.0.18.8)

Target: x86_64-apple-macosx12.0

Additional Detail from JIRA
Votes 0
Component/s Source Tooling
Labels Bug
Assignee None
Priority Medium

md5: bc68b66b1f7856f50d6fce6423ad0bdf

Issue Description:

New in Swift 5.6.

Reduced to as little code as I can:

class B {
    @objc var g: Int { 1 }
}

class C: B {
    @objc override var g: Int { 2 }
}

Now, `B.g` appears correctly in symbolgraph / sourcekit / quick help, but `C.g` has lost its `@objc`.

From sourcekit pov, base B:

"key.annotated_decl" : "<Declaration>@objc var g: <Type usr=\"s:Si\">Int<\/Type> { get }<\/Declaration>",

And derived C:

"key.annotated_decl" : "<Declaration>override var g: <Type usr=\"s:Si\">Int<\/Type> { get }<\/Declaration>",
@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior.
Projects
None yet
Development

No branches or pull requests

1 participant