0
|
1 //$Header: /home/th/Dokumente/Entwicklung/MEIN_CVS/MiniD/src/run/super_02.d,v 1.1 2004/08/21 20:44:51 th Exp $
|
|
2
|
|
3 // @author@ Ant <duitoolkit@yahoo.ca>
|
|
4 // @date@ 2004-08-21
|
|
5 // @uri@ news://pan.2004.08.21.15.02.20.419085@yahoo.ca>
|
|
6
|
|
7 int status;
|
|
8
|
|
9 class A {
|
|
10 void test(){
|
|
11 assert(status==2);
|
|
12 status++;
|
|
13 }
|
|
14 }
|
|
15
|
|
16 class B : A {
|
|
17 }
|
|
18
|
|
19 class C : B {
|
|
20 void test(){
|
|
21 assert(status==0);
|
|
22 status+=2;
|
|
23 super.test();
|
|
24 assert(status==3);
|
|
25 }
|
|
26 }
|
|
27
|
|
28 int main(){
|
|
29 C c = new C();
|
|
30 c.test();
|
|
31 assert(status==3);
|
|
32 return 0;
|
|
33 }
|