Mercurial > projects > ldc
view tests/mini/interface5.d @ 1558:3adcb70700cb
Added back option to disable metadata generation and users. Set USE_METADATA to OFF in ccmake.
author | Tomas Lindquist Olsen <tomas.l.olsen gmail com> |
---|---|
date | Fri, 31 Jul 2009 11:28:31 +0200 |
parents | dde9dbae052a |
children |
line wrap: on
line source
module interface5; extern(C) int printf(char*,...); interface I { void func(); } class C : I { int i; void func() { printf("C\n"); i++; } } void main() { C c = new C; c.func(); { I i = c; i.func(); C c2 = cast(C)i; c2.func(); c.func(); assert(c.i == 4); } }