Mercurial > projects > dstress
annotate run/interface_07.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 | f87ba6507260 |
children |
rev | line source |
---|---|
374 | 1 // $HeadURL$ |
2 // $Date$ | |
3 // $Author$ | |
4 | |
179 | 5 // @author@ Stewart Gordon <smjg_1998@yahoo.com> |
2 | 6 // @date@ 2004-09-01 |
7 | |
374 | 8 module dstress.run.interface_07; |
9 | |
2 | 10 int status; |
11 | |
12 class Parent{ | |
13 } | |
14 | |
15 interface MyInterface{ | |
16 Parent test(); | |
17 } | |
18 | |
19 class Child : Parent, MyInterface{ | |
20 Parent test(){ | |
21 status++; | |
22 return null; | |
23 } | |
24 } | |
25 | |
26 int main(){ | |
27 Child bro = new Child(); | |
28 assert(status==0); | |
29 Parent p = bro.test(); | |
30 assert(status==1); | |
31 return 0; | |
32 } |