216
|
1 // $HeadURL$
|
|
2 // $Date$
|
|
3 // $Author$
|
|
4
|
|
5 // @author@ Vathix <vathix@dprogramming.com>
|
|
6 // @date@ 2004-12-29
|
|
7 // @uri@ news:opsjr1fu1jkcck4r@tc3-ppp187.dialup.wzrd.com
|
1487
|
8 // @uri@ http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=2620
|
216
|
9
|
|
10 module dstress.run.bug_e2ir_141_A;
|
|
11
|
|
12 struct MyStruct{
|
|
13 int i;
|
|
14 }
|
|
15
|
|
16 class MyClass{
|
435
|
17 static MyStruct _s;
|
|
18
|
487
|
19 static MyStruct* prop(){
|
|
20 return &_s;
|
216
|
21 }
|
|
22
|
487
|
23 static void prop(MyStruct* s){
|
|
24 _s=*s;
|
216
|
25 }
|
|
26 }
|
|
27
|
|
28 int main(){
|
|
29 MyClass c = new MyClass();
|
|
30 c.prop = true ? MyClass.prop : MyClass.prop;
|
|
31 assert(c.prop.i == 0);
|
435
|
32 c.prop.i = 7;
|
216
|
33 assert(c.prop.i == 7);
|
|
34 return 0;
|
|
35 }
|