www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 19010] New: new fails on dynamic array aliases


          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 puremagic.com
          Reporter: elpenguino+D 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"

Jun 20 2018