Support different access control for property's getter and setter declared in Protocol
| Originator: | pitiphong.ph | ||
| Number: | rdar://20480186 | Date Originated: | 09-Apr-2015 04:28 PM |
| Status: | Open | Resolved: | |
| Product: | Developer Tools | Product Version: | Xcode 6.3 |
| Classification: | Enhancement | Reproducible: | Not Applicable |
Summary:
When we declare the new protocol and some properties in protocol. their getter and setter must have the same access control to the protocol itself. I think it would be great if we can make their setter be lower access love.
Steps to Reproduce:
Declare a new protocol
public protocol Data {
var id: String { get internal(set) }
}
Expected Results:
Swift can compile with expected behavior in Framework.
Actual Results:
Compiler failed
Regression:
Notes:
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!