view test/nested2.d @ 97:c4e161556a21 trunk

[svn r101] Split up CastExp into several smaller utility functions.
author lindquist
date Wed, 14 Nov 2007 20:18:01 +0100
parents f918f3e2e99e
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);
}