[Swift] Allow extensions in the same file as original definition to define stored properties
| Originator: | AustinZheng | ||
| Number: | rdar://21912739 | Date Originated: | 20-Jul-2015 |
| Status: | Duplicate of 18706180 | Resolved: | |
| Product: | Developer Tools | Product Version: | |
| Classification: | Enhancement | Reproducible: |
Summary: Extensions (for classes, structs, enums) have a number of uses. One common use is to organize methods and computed properties within a necessarily complex type by (e.g.) functionality within a single file. Unfortunately, all stored properties must be defined within the original type definition. I suggest that extensions within the same file as the original type definition should be allowed to define stored properties. This would enhance the use case where extensions are used to organize code by allowing stored properties to be grouped with their corresponding stored properties and methods. Steps to Reproduce: n/a Expected Results: n/a Actual Results: n/a Version: Swift 2 (Xcode 7 beta 3)
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!