www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 2365] New: compilation error: static const array in struct

reply d-bugmail puremagic.com writes:
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 digitalmars.com
        ReportedBy: af 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;
}


-- 
Sep 18 2008
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2365


bugzilla digitalmars.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




------- Comment #1 from bugzilla digitalmars.com  2008-10-20 22:21 -------
Fixed dmd 1.036


-- 
Oct 20 2008