June 21, 2018 [Issue 19010] New: new fails on dynamic array aliases | ||||
---|---|---|---|---|
| ||||
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@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" -- |
Copyright © 1999-2021 by the D Language Foundation