Mercurial > projects > ldc
view tangotests/t.d @ 289:17d3b3236334 trunk
[svn r310] Fixed a problem with incomplete types and templates in typeinfo code.
author | lindquist |
---|---|
date | Sat, 21 Jun 2008 16:22:29 +0200 |
parents | 336ec4f4bbb3 |
children |
line wrap: on
line source
interface MyInterface { int func(); } class MyClass : MyInterface { int var; int func() { return var; } } void func1(MyInterface i) { int delegate() dg = &i.func; func2(dg); } extern(C) int printf(char*, ...); void func2(int delegate() dg) { int i = dg(); printf("%d\n", i); } void main() { auto c = new MyClass; c.var = 42; func1(c); }