view test/nested2.d @ 146:ddfdae91281a trunk

[svn r151] fixed #29: out contracts work now
author ChristianK
date Mon, 10 Mar 2008 19:29:39 +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);
}