www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 22723] New: Cannot allocate a slice


          Issue ID: 22723
           Summary: Cannot allocate a slice
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: major
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: temtaime gmail.com

This code should be allowed, but it results in error:
ubyte[]* a = new ubyte[];
Error: missing length argument for array

The only way to create it i found so far is:
ubyte[]* a = &(new ubyte[][1])[0];

Feb 01 2022