Summary: with() at global scope too
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: DMD

--- Comment #0 from 2011-11-08 19:24:43 PST ---
A correct D2 program that defines a global immutable array of enum members:

enum MyEnum { first, second }
immutable MyEnum[] array = [MyEnum.first,MyEnum.second,MyEnum.second,
void main() {}

To reduce the noise I'd like to use with() at global scope too (there is no
need to call is "static with"):

enum MyEnum { first, second }
with (MyEnum) {
    immutable MyEnum[] array = [first,second,second,first,second,second];
void main() {}

with is useful for global structs too.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to