IDE: Visual Studio X/Fire
Version: 10.0.0.2399 (develop)
Target (If relevant): OSX
Description:
#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>)]”
Steps:
enum F { // Error Here
#if FOO
case foo
#endif
}