www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 21876] New: Zero-length static arrays "cannot be read at

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

          Issue ID: 21876
           Summary: Zero-length static arrays "cannot be read at compile
                    time"
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: CTFE, rejects-valid
          Severity: normal
          Priority: P3
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: dlang-bugzilla thecybershadow.net

//// test.d ////
auto test()
{
    int[0] a;
    return a;
}

enum x = test();
////////////////

--
Apr 29