Mercurial > projects > ldc
view test/interface3.d @ 307:7ade5e035beb trunk
[svn r328] Fixed an issue with interfaces where the vtable type of a interface implemented could be invalid. Fixes several tango modules like, FileStream, ServerSocket
and most tina cluster modules :)
author | lindquist |
---|---|
date | Sat, 28 Jun 2008 03:45:18 +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);} }