view tests/mini/nested5.d @ 468:45a67b6f1310

Removed the 'needsstorage' thing from Dsymbol. Arguments are not always given storage when applicable. This is not longer treat specially in this regard. Code for accessing nested variables and contexts rewritten. Probably more. Fairly well tested.
author Tomas Lindquist Olsen <>
date Mon, 04 Aug 2008 02:59:34 +0200
parents 1bb99290e03a
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++);

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