1101
|
1 // $HeadURL$
|
|
2 // $Date$
|
|
3 // $Author$
|
|
4
|
|
5 // @author@ David Medlock <noone@nowhere.com>
|
|
6 // @date@ 2006-07-08
|
1489
|
7 // @uri@ http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=7809
|
1101
|
8 // @desc@ Initialization error in classes
|
|
9
|
|
10 module dstress.run.o.odd_bug_06_A;
|
|
11
|
|
12 class Foo{
|
|
13 float[4] array = 1.0f;
|
|
14 int count = 10;
|
|
15 }
|
|
16
|
|
17 int main(){
|
|
18 Foo f = new Foo();
|
|
19
|
|
20 if(f.count != 10){
|
|
21 assert(0);
|
|
22 }
|
|
23
|
|
24 if(f.array.length != 4){
|
|
25 assert(0);
|
|
26 }
|
|
27 if(f.array[0] != 1.0f){
|
|
28 assert(0);
|
|
29 }
|
|
30 if(f.array[1] != 1.0f){
|
|
31 assert(0);
|
|
32 }
|
|
33 if(f.array[2] != 1.0f){
|
|
34 assert(0);
|
|
35 }
|
|
36 if(f.array[3] != 1.0f){
|
|
37 assert(0);
|
|
38 }
|
|
39
|
|
40 return 0;
|
|
41 }
|