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-11288] Property wrappers aren't inherited as type aliases #53689

Closed
swift-ci opened this issue Aug 10, 2019 · 2 comments
Closed

[SR-11288] Property wrappers aren't inherited as type aliases #53689

swift-ci opened this issue Aug 10, 2019 · 2 comments
Assignees
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself

Comments

@swift-ci
Copy link
Collaborator

Previous ID SR-11288
Radar None
Original Reporter BenLeggiero (JIRA User)
Type Bug
Status Resolved
Resolution Done
Environment

macOS 10.15 Beta (19A526h)
Xcode Version 11.0 beta 5 (11M382q)
Apple Swift version 5.1 (swiftlang-1100.0.266.1 clang-1100.0.32.1)
Target: x86_64-apple-darwin19.0.0

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug
Assignee @theblixguy
Priority Medium

md5: 6e58c672fba31e03c7bb421156e96fdf

is duplicated by:

  • SR-11120 [5.1] [property wrapper] attribute lookup does not include typealiases
  • SR-11131 Nested protocolWrappers can't be typealias'ed when parent type is generic

Issue Description:

Given that:

  • Some property wrapper PW is in global scope

  • Some protocol P defines in its scope (neither private nor fileprivate) a typealias A of PW

  • Some type T implements P

Then:

  • A is not visible to T

SSCCE

@propertyWrapper
struct SomeWrapper {
    var wrappedValue: Int
}



protocol HasWrapper {
    typealias Wrapper = SomeWrapper
}



struct Parent: HasWrapper {
    @Wrapper
    var answer = 42
}
@belkadan
Copy link
Contributor

@DougGregor, you had another one of these, right?

@theblixguy
Copy link
Collaborator

Fixed on master by #26795

Please verify using the next master snapshot and close this issue. Thanks!

@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. compiler The Swift compiler in itself
Projects
None yet
Development

No branches or pull requests

3 participants