Mercurial > projects > dstress
annotate run/interface_01.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/interface_01.d,v 1.1 2004/08/22 07:47:07 th Exp $ |
2 | |
3 int status; | |
4 | |
5 interface MyInterface{ | |
6 void check(); | |
7 } | |
8 | |
9 class MyClass : MyInterface { | |
10 void check(){ | |
11 status=2; | |
12 } | |
13 } | |
14 | |
15 int main(){ | |
16 MyInterface i = new MyClass(); | |
17 assert(status==0); | |
18 i.check(); | |
19 assert(status==2); | |
20 return 0; | |
21 } |