Swift compiler crashes on block type from un-imported module
Originator: | adam | ||
Number: | rdar://23021616 | Date Originated: | 08/10/15 |
Status: | Closed | Resolved: | Yes |
Product: | Developer Tools | Product Version: | Xcode 7.0 (7A220), 7.0.1 (7A1001). OS X 10.10.5 (14F27), 10.11 (15A282b). |
Classification: | Crash/Hang/Data Loss | Reproducible: | Always |
Summary: The following code causes swift to segfault: thing.kaboom { (result: Thing!) -> Void in dispatch_async(dispatch_get_main_queue(), { () -> Void in // crash! }) } The block on kaboom is of type TestBlock, and the module containing the typedef is not imported into the file in question. Steps to Reproduce: Open and build the attached Xcode project. Expected Results: Error that the class in the argument (Thing) is not defined. Actual Results: Swift segfaults. Regression: Can reproduce this on multiple machines: iMac (2013), MacBook Air (2013).
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!