[Issue 13280] New: `this.sizeof` rejected as static array length in some cases
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Mon Aug 11 00:18:49 PDT 2014
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 at puremagic.com
Reporter: verylonglogin.reg at 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
---
--
More information about the Digitalmars-d-bugs
mailing list