Allow `static` stored properties in enums

IDE: Visual Studio X/Fire
Version: (develop)
Target (If relevant): OSX
Although enums cannot have instance stored properties, they should be able to have static (type) stored properties.

Expected Behavior:
Actual Behavior:
“E: One of “case”, “func”, “subscript”, “var”, “typealias”, “init” expected, got assign [<file> (<line>)]”

enum F {
    static var x: Int = 5 // Error Here

Thanks, logged as bugs://82655

bugs://82655 got closed with status fixed.


FWIW< while some of the stuff you’ve bene reporting is in “crazy, who designed this language, I need to go bang my head against the wall” territory, it’s much appreciated getting these reports, because after all Swift is what it is, and many of these odd corner cases can be hard to find.

So thank you for bringing these to our attention!



Adding to report in Version: (develop):

It could also be immutable and declared with let

enum F {
    static let x: Int = 5 // Error

bugs://82655 got reopened.

bugs://82655 got closed with status fixed.