view tests/mini/nested5.d @ 879:c57e71c5586f

Removed extraneous "|| __APPLE__" in dmd/man.c, 1.039 adds an __APPLE__ specific implementation, thanx Scriptor.
author Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
date Fri, 09 Jan 2009 19:36:56 +0100
parents 45a67b6f1310
children
line wrap: on
line source

module nested5;
extern(C) int printf(char*, ...);

void main()
{
    int i = 42;

    printf("Hello world %d\n", i++);

    class C
    {
        void func()
        {
            printf("Hello nested world %d\n", i++);
            //i++;
        }
    }

    auto c = new C;
    c.func();
    printf("i = %d\n", i);
    assert(i == 44);
}