Mercurial > projects > dstress
annotate run/mixin_02.d @ 0:3269e4627918
init dstress
author | svnowner |
---|---|
date | Sat, 25 Sep 2004 22:33:30 +0000 |
parents | |
children | 3414705c41ac |
rev | line source |
---|---|
0 | 1 // $Header: /home/th/Dokumente/Entwicklung/MEIN_CVS/MiniD/src/run/mixin_02.d,v 1.1 2004/09/23 05:46:50 th Exp $ |
2 | |
3 // @author@ Roel Mathys <roel.mathys@yucom.be> | |
4 // @date@ 2004-05-18 | |
5 | |
6 interface MyInterface{ | |
7 int test(); | |
8 } | |
9 | |
10 template MyTemplate(){ | |
11 int test(){ | |
12 return 1; | |
13 } | |
14 } | |
15 | |
16 class MyClass : MyInterface{ | |
17 mixin MyTemplate; | |
18 } | |
19 | |
20 int main(){ | |
21 MyClass c = new MyClass(); | |
22 assert(c.test()==1); | |
23 return 0; | |
24 } |