annotate tests/mini/bug3.d @ 341:1bb99290e03a trunk

[svn r362] Started merging the old 'test' dir as well as the newer 'tangotests' dir into 'tests/mini' and 'tests/minicomplex'.
author lindquist
date Sun, 13 Jul 2008 02:51:19 +0200
parents test/bug3.d@8b0e809563df
children
rev   line source
lindquist@28 1 module bug3;
lindquist@28 2
lindquist@28 3 struct S
lindquist@28 4 {
lindquist@28 5 int[] arr;
lindquist@28 6 char[5] ch;
lindquist@28 7 }
lindquist@28 8
lindquist@29 9 class C
lindquist@29 10 {
lindquist@29 11 int[] arr;
lindquist@29 12 char[4] crs;
lindquist@29 13 }
lindquist@29 14
lindquist@28 15 void main()
lindquist@28 16 {
lindquist@28 17 S s;
lindquist@28 18 s.arr = new int[5];
lindquist@28 19 s.arr[1] = 32;
lindquist@40 20 int i;
lindquist@40 21 i = s.arr[0];
lindquist@40 22 //assert(s.arr[0] == 0);
lindquist@40 23 //assert(s.arr[1] == 32);
lindquist@28 24 }