www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 246] New: class members not initialized

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=246

           Summary: class members not initialized
           Product: D
           Version: 0.162
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: ashleymedlock yahoo.com


Class members are apparently not initialized in DMD 0.162

// code sample
import std.stdio;

class Foo
{
  float[4]  array = 1.0;            
  int count = 10;
}

void main( char[][] args )
{
  Foo f = new Foo();
  writefln("Foo count = %s", f.count );
}

// this prints 0(zero) on my machine


-- 
Jul 08 2006
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=246


jpelcis gmail.com changed:

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




------- Comment #1 from jpelcis gmail.com  2006-07-18 16:40 -------
Fixed DMD 0.163.


-- 
Jul 18 2006