view test/nested10.d @ 235:c603041da866 trunk

[svn r251] fixed arguments checking in runtest script
author ChristianK
date Sun, 08 Jun 2008 12:06:22 +0200
parents 8096ba7082db
children 25fa34e899e9
line wrap: on
line source

module nested10;

void main()
{
    int j = 3;
    void F()
    {
        int i = j;
        printf("F: i = %d, j = %d\n", i, j);
        void G()
        {
            printf("G: i = %d, j = %d\n", i, j);
            j += i;
        }
        G();
    }
    F();
    printf("6 = %d\n", j);
    assert(j == 6);
}