Swift 1.2b1: Top Level Derived Vars Crash Compiler in iOS App
| Originator: | wetzeal | ||
| Number: | rdar://19773153 | Date Originated: | 09-Feb-2015 05:26 PM |
| Status: | Closed | Resolved: | 23-Feb-2015 |
| Product: | Developer Tools | Product Version: | Xcode 6.3 (6D520o) |
| Classification: | Crash/Hang/Data Loss | Reproducible: | Always |
Summary:
If the following code is added to the top level of an iOS app, the Swift compiler will crash:
var test: Bool {
return false
}
Steps to Reproduce:
1. Create an iOS app
2. Add the following code in top level:
var test: Bool { return false }
Expected Results:
The app builds
Actual Results:
The swift compiler crashes with the following:
0 swift 0x0000000105133d38 llvm::sys::PrintStackTrace(__sFILE*) + 40
1 swift 0x0000000105134214 SignalHandler(int) + 452
2 libsystem_platform.dylib 0x00007fff90173f1a _sigtramp + 26
3 libsystem_platform.dylib 0x000000000000ffff _sigtramp + 1877590271
4 swift 0x0000000104a2bd9c frontend_main(llvm::ArrayRef<char const*>, char const*, void*) + 7180
5 swift 0x0000000104a29fe6 main + 1814
Regression:
This did not happen with Swift 1.1
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!