Swift Compiler Crashes on class variables with ternary expressions when Gather Coverage Data is on

Originator:bjtitus
Number:rdar://23256795 Date Originated:10/26/2015
Status:Open Resolved:
Product:Developer Tools Product Version:Xcode 7.1 (7B91b), OS X 10.11.1 (15B42)
Classification: Reproducible:Always
 
Summary:
While compiling Swift files using the profile-coverage-mapping and profile-generate flags, the compiler crashes when ternary operators are used. The sample Swift source file shows a broken ternary, and a working ternary using lazy. The crash log file shows the offending crash.

Steps to Reproduce:
1. Create a class variable which uses a ternary expression
2. Attempt to compile with Gather Coverage Data on in Xcode or directly with the Swift compiler using the profile-coverage-mapping and profile-generate flags.

Attached files: https://gist.github.com/bjtitus/bc40845dcc8064305eb9

Expected Results:
File compiles

Actual Results:
Compiler crashes

Version:
Xcode 7.1 (7B91b), OS X 10.11.1 (15B42)

Comments

I recently ran into this as well, had to work around.


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!