a575963da9
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
39 lines
686 B
C#
39 lines
686 B
C#
//
|
|
// This is a build test: checks that the compiler does not loop
|
|
// forever endlessly with anonymous methods
|
|
//
|
|
using System;
|
|
using System.Collections;
|
|
using System.Text;
|
|
|
|
class Space
|
|
{ public int Value = -1;
|
|
|
|
public delegate void DoCopy();
|
|
|
|
public DoCopy CopyIt;
|
|
|
|
public void Leak(bool useArray, int max)
|
|
{ DoCopy one;
|
|
|
|
{ int answer = 0;
|
|
int[] work;
|
|
|
|
CopyIt = delegate { Value = answer; };
|
|
one = delegate
|
|
{ work = new int[max];
|
|
foreach(int x in work) answer += x;
|
|
};
|
|
}
|
|
|
|
one();
|
|
}
|
|
}
|
|
|
|
class Program
|
|
{
|
|
public static void Main(string[] args)
|
|
{
|
|
}
|
|
}
|