Xcode 6.3b2: Swift Compiler crashes (Segmentation Fault: 11) with a dependency graph of several optional structs

Originator:adamschlag
Number:rdar://20060127 Date Originated:05-Mar-2015
Status:Closed Resolved:21-Jul-2015
Product:Developer Tools Product Version:Xcode 6.3b2
Classification: Reproducible:
 
Summary:
With a particular set of structs that contain properties of other structs (that may be optional) the compiler will crash under several sets of conditions with a "Segmentation Fault: 11" when compiling with Xcode 6.3b2 (swiftc reports as version "Apple Swift version 1.2 (swiftlang-602.0.42.4 clang-602.0.42)"). There are several small changes that can cause compilation to succeed. See the attached source file for more details.

Steps to Reproduce:
1. Install Xcode 6.3b2
2. Create a single view iOS app with Swift as the primary language
3. Add the attached Swift source file to the project
4. Build the project

Expected Results:
Project should build with no errors

Actual Results:
Swift compiler crashes

Version:
Xcode Version 6.3 (6D532l)
OS X Version 10.10.2 (14C109)

Notes:
The Swift compiler also crashes in the current release version of Xcode (Version 6.1.1 (6A2006))

Configuration:
n/a

Attachments:
'Breaking.swift' and 'swift compile error log.txt' were successfully uploaded.

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!