comparison tests/mini/nested6a.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 <tomas.l.olsen@gmail.com>
date Mon, 04 Aug 2008 02:59:34 +0200
parents 051ab876fe11
children
comparison
equal deleted inserted replaced
467:261b05cf4d1c 468:45a67b6f1310
10 class C 10 class C
11 { 11 {
12 int j; 12 int j;
13 void func() 13 void func()
14 { 14 {
15 int k; 15 int k;
16 printf("C.func() %d\n", i++); 16 printf("C.func() %d\n", i++);
17 17
18 class C2 18 class C2
19 { 19 {
20 int l; 20 int l;
21 void func2() 21 void func2()
22 { 22 {
23 printf("in C2.func2()\n");
23 printf("C2.func2() %d\n", i++); 24 printf("C2.func2() %d\n", i++);
24 } 25 }
25 int m; 26 int m;
26 } 27 }
27 28
28 { 29 {
29 scope c2 = new C2; 30 printf("new C2\n");
31 auto c2 = new C2;
32 printf("C2.func2()\n");
30 c2.func2(); 33 c2.func2();
31 } 34 }
32 int n; 35 int n;
33 } 36 }
34 int o; 37 int o;
35 } 38 }
36 39
37 scope c = new C; 40 auto c = new C;
38 c.func(); 41 c.func();
39 } 42 }