> On Dec 31, 2015, at 1:46 PM, Amir Michail via swift-evolution 
> <[email protected]> wrote:
> 
> Example:
> 
> enum A : [Int] {
>    case B = [1,2,3]
> }
> 
> 
> Currently, the following error occurs: "raw value for enum case must be a 
> literal”

A more typically requested example is “case B = 1+2”.

Swift currently has no notion of a “constant expression”.  Once it does, 
implementing this sort of feature is reasonable, but we need to design out 
“computed lets” and “pure functions” first.

-Chris


_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to