digitalmars.D.bugs - [Issue 14911] New: Compiler found indexing in code "new
- via Digitalmars-d-bugs (23/23) Aug 12 2015 https://issues.dlang.org/show_bug.cgi?id=14911
https://issues.dlang.org/show_bug.cgi?id=14911 Issue ID: 14911 Summary: Compiler found indexing in code "new MyStruct[2].ptr" Product: D Version: D2 Hardware: x86_64 OS: Windows Status: NEW Severity: regression Priority: P1 Component: dmd Assignee: nobody puremagic.com Reporter: kdmult ya.ru The following code does not compile with dmd v2.068.0. void main() { int* buf1 = new int[2].ptr; // Ok struct MyStruct {} MyStruct* buf2 = (new MyStruct[2]).ptr; // Ok // Error: expected TypeTuple when indexing ('[2]'), got 'MyStruct' MyStruct* buf3 = new MyStruct[2].ptr; } --
Aug 12 2015