Please add a Preprocessor Macro that lets us determine the version of Swift being used
| Originator: | dave | ||
| Number: | rdar://20604532 | Date Originated: | 2015/04/18 |
| Status: | Closed as Dup (19823607) | Resolved: | No |
| Product: | Developer Tools | Product Version: | |
| Classification: | Reproducible: | Always |
Summary: As Swift is changing fast, it would be great if we could determine in code what version of Swift is being used to compile that code. Similar to testing what platform (iOS vs OS X) that we are on. Something like: #if swiftVersion() == "1.2" // do this #else // do that #endif This would let us update library/framework code used in lots of projects and not force all projects to upgrade to the newest Swift at the same time.
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!