swiftlang / swift

The Swift Programming Language
https://swift.org
Apache License 2.0
67.58k stars 10.36k forks source link

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

Closed swift-ci closed 5 years ago

swift-ci commented 5 years ago
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:

Issue Description:

Given that:

Then:

SSCCE

@propertyWrapper
struct SomeWrapper {
    var wrappedValue: Int
}

protocol HasWrapper {
    typealias Wrapper = SomeWrapper
}

struct Parent: HasWrapper {
    @Wrapper
    var answer = 42
}
belkadan commented 5 years ago

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

theblixguy commented 5 years ago

Fixed on master by https://github.com/apple/swift/pull/26795

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