annotate nocompile/delegate_11.d @ 1576:b3e16c86558e

[Issue 1398] New: GDC doesn't generate correct code <mariusmuja@gmail.com> 2007-08-04 http://d.puremagic.com/issues/show_bug.cgi?id=1398
author thomask
date Thu, 21 Feb 2008 15:20:08 +0000
parents e38919011244
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
155
2c9eb7937bb2 added delegate tests
thomask
parents:
diff changeset
1 // $HeaderURL$
2c9eb7937bb2 added delegate tests
thomask
parents:
diff changeset
2 // $Date$
2c9eb7937bb2 added delegate tests
thomask
parents:
diff changeset
3 // $Author$
2c9eb7937bb2 added delegate tests
thomask
parents:
diff changeset
4
2c9eb7937bb2 added delegate tests
thomask
parents:
diff changeset
5 // delegates can only be initialized with non-static member functions
2c9eb7937bb2 added delegate tests
thomask
parents:
diff changeset
6
338
1f6cf5ccfbc9 1) updated rules to dmd-0.119
thomask
parents: 155
diff changeset
7 // __DSTRESS_ELINE__ 22
1f6cf5ccfbc9 1) updated rules to dmd-0.119
thomask
parents: 155
diff changeset
8
155
2c9eb7937bb2 added delegate tests
thomask
parents:
diff changeset
9 module dstress.nocompile.delegate_11;
2c9eb7937bb2 added delegate tests
thomask
parents:
diff changeset
10
2c9eb7937bb2 added delegate tests
thomask
parents:
diff changeset
11 union MyUnion{
2c9eb7937bb2 added delegate tests
thomask
parents:
diff changeset
12 static int test(){
360
e38919011244 dif. fixes 3
thomask
parents: 338
diff changeset
13 return 0;
155
2c9eb7937bb2 added delegate tests
thomask
parents:
diff changeset
14 }
2c9eb7937bb2 added delegate tests
thomask
parents:
diff changeset
15 byte b;
2c9eb7937bb2 added delegate tests
thomask
parents:
diff changeset
16 }
2c9eb7937bb2 added delegate tests
thomask
parents:
diff changeset
17
2c9eb7937bb2 added delegate tests
thomask
parents:
diff changeset
18 int main(){
2c9eb7937bb2 added delegate tests
thomask
parents:
diff changeset
19 int delegate() dl;
2c9eb7937bb2 added delegate tests
thomask
parents:
diff changeset
20
2c9eb7937bb2 added delegate tests
thomask
parents:
diff changeset
21 MyUnion u;
2c9eb7937bb2 added delegate tests
thomask
parents:
diff changeset
22 dl = &u.test;
2c9eb7937bb2 added delegate tests
thomask
parents:
diff changeset
23
2c9eb7937bb2 added delegate tests
thomask
parents:
diff changeset
24 return 0;
2c9eb7937bb2 added delegate tests
thomask
parents:
diff changeset
25 }