[Issue 22723] New: Cannot allocate a slice

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Feb 1 17:36:15 UTC 2022


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

          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 at puremagic.com
          Reporter: temtaime at 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];

--


More information about the Digitalmars-d-bugs mailing list