2 // This test showed that there were cases where there was no
3 // shared "ScopeInfo", and that we could not root and keep a "topmost"
4 // variable in the compiler for a CaptureContext.
6 // This illustrates two roots of captured scopes, independent of
15 static void doit (int v
) {
16 Console
.WriteLine (v
);
19 Do
[] arr
= new Do
[5];
20 for (int i
= 0; i
< 5; ++i
) {
21 arr
[i
] = delegate {doit (i);}
;
23 for (int i
= 0; i
< 5; ++i
) {
27 for (int j
= 0; j
< 5; ++j
) {
28 arr
[j
] = delegate {doit (j);}
;