Xcode-beta (7A176x): Swift Enums Return Incorrect Descriptions with Mixed Associated Values

Originator:john
Number:rdar://22271581 Date Originated:13-Aug-2015 01:55 PM
Status:Open Resolved:
Product:Developer Tools Product Version:Xcode-beta (7A176x)
Classification:Feature (New) Reproducible:Always
 
Summary:
When an enum in Swift has some cases with associated values, and some cases without, the cases without associated values will all get the same value when converted to strings.

Steps to Reproduce:
1. Create an enum with two cases that have an associated values, and two cases without
2. Print the string value for each of the cases with no associated value

Expected Results:
Each case should produce a string value with the case name

Actual Results:
All cases produce the same string value: the case name of the first case defined without associated values.

Regression:

Notes:
I have attached a playground demonstrating the issue.

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!