digitalmars.D.bugs - [Issue 13280] New: `this.sizeof` rejected as static array length in
- via Digitalmars-d-bugs (28/28) Aug 11 2014 https://issues.dlang.org/show_bug.cgi?id=13280
https://issues.dlang.org/show_bug.cgi?id=13280 Issue ID: 13280 Summary: `this.sizeof` rejected as static array length in some cases Product: D Version: D2 Hardware: All OS: All Status: NEW Keywords: rejects-valid Severity: normal Priority: P1 Component: DMD Assignee: nobody puremagic.com Reporter: verylonglogin.reg gmail.com This code should comple fine: --- struct S { alias U = ubyte; alias T1 = ubyte[this.sizeof]; // ok alias T2 = const U[this.sizeof]; // ok alias T3 = const ubyte[this.sizeof]; // error } --- main.d(6): Error: Integer constant expression expected instead of this.sizeof --- --
Aug 11 2014