www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 12587] New: Ommiting type when auto declaration in static

https://issues.dlang.org/show_bug.cgi?id=12587

          Issue ID: 12587
           Summary: Ommiting type when auto declaration in static members
                    results in error
           Product: D
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: DMD
          Assignee: nobody puremagic.com
          Reporter: temtaime gmail.com

struct S {
    this(int) { }

    static immutable s = S(12);    
}

void main() {
}

Error: cannot create a struct until its size is determined

If static immutable s = S(12) changed to static immutable S s = S(12) compiles
ok.

--
Apr 16 2014