Mercurial > projects > dstress
comparison run/i/interface_27_D.d @ 1574:40a86c79a1c4
[Issue 1264] New: anon class in anon delegate in private member == ICE
<default_357-line@yahoo.de>
2007-06-13
http://d.puremagic.com/issues/show_bug.cgi?id=1264
author | thomask |
---|---|
date | Thu, 21 Feb 2008 15:19:32 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
1573:81b51faeeefe | 1574:40a86c79a1c4 |
---|---|
1 // $HeadURL$ | |
2 // $Date$ | |
3 // $Author$ | |
4 | |
5 // @author@ <default_357-line@yahoo.de> | |
6 // @date@ 2007-06-13 | |
7 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=1264 | |
8 // @desc@ [Issue 1264] New: anon class in anon delegate in private member == ICE | |
9 | |
10 module dstress.run.i.interface_27_D; | |
11 | |
12 class X{ | |
13 int foo(); | |
14 } | |
15 | |
16 int main() { | |
17 int check = 0x1234ABCD; | |
18 | |
19 X o = null; | |
20 | |
21 (){ | |
22 o = new class X{ | |
23 int foo() { | |
24 return 1 + check; | |
25 } | |
26 }; | |
27 }(); | |
28 | |
29 if(0x1234ABCE != o.foo()){ | |
30 assert(0); | |
31 } | |
32 if(0x1234ABCD != check){ | |
33 assert(0); | |
34 } | |
35 | |
36 return 0; | |
37 } |