view tests/mini/nested2.d @ 1581:f4421c81398f

Fixed ticket #365. Thanks wilkie.
author Robert Clipsham <robert@octarineparrot.com>
date Sat, 19 Sep 2009 00:44:35 +0100
parents 1bb99290e03a
children
line wrap: on
line source

module nested2;

void func(ref int i)
{
    delegate {
        assert(i == 3);
        i++;
    }();
}

void main()
{
    int i = 3;
    func(i);
    assert(i == 4);
}