[Issue 19010] New: new fails on dynamic array aliases

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Jun 21 00:36:22 UTC 2018


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

          Issue ID: 19010
           Summary: new fails on dynamic array aliases
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: elpenguino+D at gmail.com

Pretty simple example:
```
unittest {
    alias T = int[];
    T t = new T;
}
```

This doesn't seem to have ever compiled correctly. It currently fails with the
misleading error "Error: new can only create structs, dynamic arrays or class
objects, not int[]'s"

--


More information about the Digitalmars-d-bugs mailing list