Xcode-Beta (6D520o): Allow define enums with bit shifts of contstant values

Originator:jacob
Number:rdar://19775506 Date Originated:09-Feb-2015 07:33 PM
Status:Open Resolved:
Product:Developer Tools Product Version:Xcode-Beta (6D520o)
Classification:Enhancement Reproducible:Always
 
Summary:
The following code reports a compile error “raw value for enum case must be a literal”

enum TestEnum: NSInteger
{
    case Enum1 = (1 << 0)
}


Steps to Reproduce:
Try to compile the above code

Expected Results:
set the raw value of Enum1 to the result of the bit shift (like it can be done in C)

Actual Results:
Error “raw value for enum case must be a literal”

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!