view tests/mini/delegate2.d @ 638:94b01f15814f

Added FreeBSD support to the -t switch
author Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
date Thu, 02 Oct 2008 03:38:29 +0200
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);
}