digitalmars.D.bugs - [Issue 20422] New: confusing error "new can only create structs,
- d-bugmail puremagic.com (25/25) Nov 29 2019 https://issues.dlang.org/show_bug.cgi?id=20422
https://issues.dlang.org/show_bug.cgi?id=20422 Issue ID: 20422 Summary: confusing error "new can only create structs, dynamic arrays or class objects, not int[]'s" Product: D Version: D2 Hardware: x86_64 OS: All Status: NEW Severity: minor Priority: P1 Component: dmd Assignee: nobody puremagic.com Reporter: dkorpel live.nl This code: ``` void main() { new int[]; } ``` Gives this error message: "new can only create structs, dynamic arrays or class objects, not int[]'s int[] is obviously a dynamic array, the real problem is that no length parameter is given. --
Nov 29 2019