[Issue 2365] New: compilation error: static const array in struct
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Sep 18 00:12:15 PDT 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2365
Summary: compilation error: static const array in struct
Product: D
Version: 1.035
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: af at liquidstate.eu
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;
}
--
More information about the Digitalmars-d-bugs
mailing list