140
|
1 // $HeadURL$
|
|
2 // $Date$
|
|
3 // $Author$
|
0
|
4
|
|
5 // @author@ van eeshan <vanee@hotmail.com>
|
|
6 // @date@ 2004-08-05
|
1489
|
7 // @uri@ http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=1262
|
0
|
8
|
374
|
9 module dstress.run.interface_04;
|
|
10
|
0
|
11 int status;
|
|
12
|
|
13 interface Interface1{
|
|
14 void one();
|
|
15 }
|
|
16
|
|
17 interface Interface2{
|
|
18 void two();
|
|
19 }
|
|
20
|
|
21 interface Interface3 : Interface2, Interface1{
|
|
22 void three();
|
|
23 }
|
|
24
|
|
25 class MyClass : Interface3{
|
|
26 void one(){
|
|
27 status=1;
|
|
28 }
|
|
29 void two(){
|
|
30 status=20;
|
|
31 }
|
|
32 void three(){
|
|
33 status=300;
|
|
34 }
|
|
35 }
|
|
36
|
|
37 int main(){
|
|
38 Interface3 i = new MyClass();
|
|
39 assert(status==0);
|
|
40 i.one();
|
|
41 assert(status==1);
|
|
42 i.two();
|
|
43 assert(status==20);
|
|
44 i.three();
|
|
45 assert(status==300);
|
|
46 return 0;
|
|
47 }
|