Mercurial > projects > ldc
annotate tests/mini/interface5.d @ 1595:628433c343b4
Fixed DStress tests nocompile/c/{const_32_B.d,const_32_C.d}.
Updated the runtest script to build libtangobos-partial.a if it hasn't already been built.
Added in signbit() and va_arg!()() to libtangobos-partial.a so more of the phobos dependent DStress tests pass.
author | Robert Clipsham <robert@octarineparrot.com> |
---|---|
date | Sun, 08 Nov 2009 16:16:17 +0000 |
parents | dde9dbae052a |
children |
rev | line source |
---|---|
114 | 1 module interface5; |
2 | |
133
44a95ac7368a
[svn r137] Many fixes towards tango.io.Console working, but not quite there yet...
lindquist
parents:
114
diff
changeset
|
3 extern(C) int printf(char*,...); |
44a95ac7368a
[svn r137] Many fixes towards tango.io.Console working, but not quite there yet...
lindquist
parents:
114
diff
changeset
|
4 |
114 | 5 interface I |
6 { | |
7 void func(); | |
8 } | |
9 | |
10 class C : I | |
11 { | |
12 int i; | |
13 void func() | |
14 { | |
15 printf("C\n"); | |
16 i++; | |
17 } | |
18 } | |
19 | |
20 void main() | |
21 { | |
22 C c = new C; | |
23 c.func(); | |
24 { | |
25 I i = c; | |
1118
dde9dbae052a
Make this test a bit more meaningful
Frits van Bommel <fvbommel wxs.nl>
parents:
341
diff
changeset
|
26 i.func(); |
114 | 27 |
28 C c2 = cast(C)i; | |
29 c2.func(); | |
30 | |
31 c.func(); | |
32 assert(c.i == 4); | |
33 } | |
34 } |