comparison tests/mini/interface2.d @ 341:1bb99290e03a trunk

[svn r362] Started merging the old 'test' dir as well as the newer 'tangotests' dir into 'tests/mini' and 'tests/minicomplex'.
author lindquist
date Sun, 13 Jul 2008 02:51:19 +0200
parents test/interface2.d@44a95ac7368a
children
comparison
equal deleted inserted replaced
340:351c0077d0b3 341:1bb99290e03a
1 module interface2;
2
3 extern(C) int printf(char*,...);
4
5 interface A
6 {
7 void a();
8 }
9
10 interface B
11 {
12 void b();
13 }
14
15 class C : A,B
16 {
17 int i = 0;
18 override void a()
19 {
20 printf("hello from C.a\n");
21 }
22 override void b()
23 {
24 printf("hello from C.b\n");
25 }
26 }
27
28 void main()
29 {
30 scope c = new C;
31 {c.a();
32 c.b();}
33 {A a = c;
34 a.a();}
35 {B b = c;
36 b.b();}
37 }