Bug 2365 – compilation error: static const array in struct
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Linux
Creation time
2008-09-18T02:12:00Z
Last change time
2014-03-01T00:36:56Z
Assigned to
bugzilla
Creator
af
Comments
Comment #0 by af — 2008-09-18T02:12:14Z
import std.stdio;
struct S
{
static const float[2] z = 0;
}
static const float[2] z = 0;
int main()
{
writefln(z[0]);
writefln(z[1]);
writefln(S.z[0]); // bug.d(14): Error: 0 must be an array or pointer type, not float
writefln(S.z[1]); // bug.d(15): Error: 0 must be an array or pointer type, not float
return 0;
}