246 – class members not initialized

D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 246 - class members not initialized
Summary: class members not initialized
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D1 (retired)
Hardware: x86 Windows
: P2 major
Assignee: Walter Bright
URL:
Keywords:
Depends on:
Blocks:
Reported: 2006年07月08日 21:20 UTC by David Medlock
Modified: 2014年02月15日 13:19 UTC (History)
0 users

See Also:


Attachments
Add an attachment (proposed patch, testcase, etc.)

Note You need to log in before you can comment on or make changes to this issue.
Description David Medlock 2006年07月08日 21:20:08 UTC
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
Comment 1 James Pelcis 2006年07月18日 16:40:14 UTC
Fixed DMD 0.163.


AltStyle によって変換されたページ (->オリジナル) /