Compilation `#if` directives in enums

(Dante Broggi) #1

IDE: Visual Studio X/Fire
Version: (develop)
Target (If relevant): OSX
#if conditions in enums trigger a parse error. This may be because parsing is slightly different in enums vs. structs, or it could be more deeply unimplemented.

Expected Behavior:
if FOO is defined, enum F shall have case .foo, otherwise it won’t.
But it should compile either way.
Actual Behavior:
“E: One of “case”, “func”, “subscript”, “var”, “typealias”, “init” expected, got [<file> (<line>)]”

enum F { // Error Here
    #if FOO
    case foo
(RemObjects) #2

Thanks, logged as bugs://82584

(RemObjects) #3

bugs://82584 got closed with status fixed.