Using a ternary operator in an instance let decleration causes a segmentation 11 fault when running code coverage

Originator:m.casey
Number:rdar://24088330 Date Originated:07/01/2016
Status:Open Resolved:No
Product:Xcode Product Version:7.2
Classification:Bug Reproducible:Always
 
Summary:
When you run the the code coverage tool in Xcode 7.2, and run unit tests against this source, it will fail with Segmentation Fault 11. This can be seen with the attached code.

Steps to Reproduce:
1. Compile the attached code - success
2. Run unit tests - success
3. Turn on code coverage
4. Run unit tests - fail

Expected Results:
The target should build successfully

Actual Results:
The target compile fails with Segmentation Fault 11

Version:
Xcode 7.2 (7C68) - OS X 10.11.1 (15B42)

Notes:

Code is as simple as adding a class to an empty project that looks as follows:

let testVar = true

class MyDemoClass: NSObject {
	let myTestValue: CGFloat = 40 - (testVar ? 50 : 70)

}


Configuration:

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!