view tests/mini/delegate2.d @ 1118:dde9dbae052a

Make this test a bit more meaningful
author Frits van Bommel <fvbommel wxs.nl>
date Sat, 14 Mar 2009 22:29:31 +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);
}