Mercurial > projects > ldc
view tests/mini/interface3.d @ 919:c76f74d09fb1
Fixed assertion failure when object.d is missing the ModuleInfo class
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Mon, 02 Feb 2009 02:35:44 +0100 |
parents | 340acf1535d0 |
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 from %p\n", i, this); i++; } } void main() { auto c = new C; {c.func();} { I i = c; {i.func();} } {printf("final %d\n", c.i);} {assert(c.i == 44);} }