view tangotests/t.d @ 245:d61ce72c39ab trunk

[svn r262] Fixed debug info for normal function parameters. Fixed debug info for pointers to basic types.
author lindquist
date Mon, 09 Jun 2008 12:43:16 +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);
}