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-11120] [5.1] [property wrapper] attribute lookup does not include typealiases #53516

swift-ci opened this issue Jul 12, 2019 · 4 comments


Copy link

@swift-ci swift-ci commented Jul 12, 2019

Previous ID SR-11120
Radar rdar://problem/53107788
Original Reporter tannernelson (JIRA User)
Type Bug
Status Resolved
Resolution Done

macOS 10.15 Beta
Xcode 11.0 beta 2

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

md5: deb0a1f058605397bf4708d8c6f58bc2


  • SR-11288 Property wrappers aren't inherited as type aliases

relates to:

  • SR-11131 Nested protocolWrappers can't be typealias'ed when parent type is generic

Issue Description:

Assuming the following code:

public protocol Model { }

public struct ModelField<M, V>
    where M: Model, V: Codable
    public init() { }
    public var wrappedValue: V {
        get { fatalError() }
        set { fatalError() }

extension Model {
    public typealias Field<V> = ModelField<Self, V>
        where V: Codable

The typealias for `Field` is not respected when looking up attributes:

struct Planet: Model {
    @Field var name: String

error: unknown attribute 'Field'
    @Field var name: String
Copy link

@belkadan belkadan commented Jul 15, 2019

@swift-ci create

Copy link
Collaborator Author

@swift-ci swift-ci commented Jul 25, 2019

Comment by tanner0101 (JIRA)

Do you think this bug will be fixed in 5.1?

Copy link
Collaborator Author

@swift-ci swift-ci commented Aug 13, 2019

Comment by tanner0101 (JIRA)

@belkadan / @DougGregor any updates on this?

Copy link

@theblixguy theblixguy commented Aug 23, 2019

Fixed here: #26795

@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
None yet

No branches or pull requests

3 participants