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-9039] Keypaths are not being fully indexed when referencing @objc properties #51542

Closed
swift-ci opened this issue Oct 18, 2018 · 2 comments
Closed
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior.

Comments

@swift-ci
Copy link
Collaborator

Previous ID SR-9039
Radar None
Original Reporter rockbruno (JIRA User)
Type Bug
Status Resolved
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s Source Tooling
Labels Bug
Assignee rockbruno (JIRA)
Priority Medium

md5: 8d419b1e27c5d9d16f237b305ea39ca5

Issue Description:

Swift keypaths index perfectly when used against pure Swift types:

class MyClass {
  let myProp = 1
}

let path = \MyClass.myProp
5:21 | instance-property/Swift | myProp | ...
5:13 | class/Swift | MyClass | ...

But when used against objc properties, the main part of the expression is ignored:

import Foundation

class MyClass {
  @objc var myProp = 1
}

let path = \MyClass.myProp
7:21 | instance-property/Swift | myProp | ...
// Missing MyClass
@swift-ci
Copy link
Collaborator Author

Comment by Bruno Rocha (JIRA)

#19938

@swift-ci
Copy link
Collaborator Author

Comment by Bruno Rocha (JIRA)

Merged.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
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