2 // This is a build test: checks that the compiler does not loop
3 // forever endlessly with anonymous methods
6 using System
.Collections
;
10 { public int Value
= -1;
12 public delegate void DoCopy();
16 public void Leak(bool useArray
, int max
)
22 CopyIt
= delegate { Value = answer; }
;
24 { work
= new int[max
];
25 foreach(int x
in work
) answer
+= x
;
35 public static void Main(string[] args
)