281
|
1 // $HeadURL$
|
|
2 // $Date$
|
|
3 // $Author$
|
|
4
|
|
5 // @author@ Manfred Nowak <svv1999@hotmail.com>
|
|
6 // @date@ 2005-02-03
|
|
7 // @uri@ news:cttuih$hpb$1@digitaldaemon.com
|
1384
|
8 // @uri@ http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=2852
|
281
|
9
|
|
10 module dstress.run.with_13;
|
|
11
|
1125
|
12 struct Entry{
|
|
13 int a;
|
|
14 }
|
|
15
|
281
|
16 class Class{
|
1125
|
17 Entry[] table;
|
|
18
|
|
19 this(){
|
|
20 table = new Entry[10];
|
|
21 table[1].a = 4;
|
281
|
22 }
|
|
23
|
|
24 Entry opIndex(int i){
|
|
25 return table[i];
|
|
26 }
|
|
27 }
|
|
28
|
|
29 int main(){
|
1125
|
30 Class c= new Class();
|
281
|
31
|
1125
|
32 with(c[1]){
|
|
33 if(a != 4){
|
|
34 assert(0);
|
|
35 }
|
|
36 a++;
|
|
37 }
|
|
38 if(c[1].a != 4){
|
|
39 assert(0);
|
281
|
40 }
|
|
41
|
|
42 return 0;
|
1125
|
43 }
|