Mercurial > projects > ldc
view tangotests/t.d @ 142:a123dca8349b trunk
[svn r146] fixed some potential problems with mismatch in order of interfaces in class data layout
author | lindquist |
---|---|
date | Wed, 23 Jan 2008 15:48:19 +0100 |
parents | aeddd4d533b3 |
children | 336ec4f4bbb3 |
line wrap: on
line source
interface MyInterface { void func(); } abstract class MyBaseClass : MyInterface { abstract void func(); } class MyClass : MyBaseClass { void func() { } MyBaseClass toBase() { return this; } } void main() { printf("STARTING\n"); auto c = new MyClass; printf("c = %p\n", c); auto b = c.toBase; printf("b = %p\n", b); printf("FINISHED\n"); } extern(C) int printf(char*, ...);