Mercurial > projects > ldc
view test/interface3.d @ 304:3ebc136702dd trunk
[svn r325] Removed dead code.
Added license info to code from GDC (David Friedman permitted us to use the files under the Artistic License).
Added asmLabel check to DtoGoto to avoid jumping into inline asm. Doesn't work currently as LabelDsymbol::asmLabel is never set to true.
author | ChristianK |
---|---|
date | Wed, 25 Jun 2008 23:42:38 +0200 |
parents | 44a95ac7368a |
children |
line wrap: on
line source
module interface3; extern(C) int printf(char*,...); interface I { void func(); } class C : I { int i = 42; override void func() { printf("hello %d\n", i); i++; } } void main() { scope c = new C; {c.func();} { I i = c; {i.func();} } {printf("final %d\n", c.i);} {assert(c.i == 44);} }