view tests/mini/delegate2.d @ 1578:1dee66f6ec0b

Removed a chunk of code in favour of a shorter and more portable method
author Robert Clipsham <robert@octarineparrot.com>
date Tue, 08 Sep 2009 11:21:30 +0100
parents ce95d269bf5a
children
line wrap: on
line source

module mini.delegate2;

void main()
{
    int foo = 42;
    int bar()
    {
        return foo;
    }
    int delegate() dg = &bar;
    assert(dg() == foo);
}