Merge pull request #1861 from saper/home-override
[mono-project.git] / mcs / tests / test-anon-148.cs
blobba860a6981b3aae903a30d77a2ef49d26f9a3dc5
1 public delegate TResult Func<TResult> ();
3 public delegate void GeneratorNext<T> (ref T current);
5 public class GeneratorEnumerable<T>
7 public GeneratorEnumerable (Func<GeneratorNext<T>> next) { }
10 public class GeneratorExpression { }
12 public class GeneratorInvoker
14 public GeneratorInvoker (GeneratorExpression generator) { }
15 public void Invoke<T> (ref T current) { }
18 public static class Interpreter
20 public static object InterpretGenerator<T> (GeneratorExpression generator)
22 return new GeneratorEnumerable<T> (
23 () => new GeneratorInvoker (generator).Invoke
27 public static int Main ()
29 InterpretGenerator<int> (new GeneratorExpression ());
30 return 0;