Merge pull request #5675 from mono/glib-debug-symbols
[mono.git] / mcs / tests / gtest-iter-27.cs
1 using System;
2 using System.Collections.Generic;
3
4 public class CompilerBug
5 {
6         public static void Main ()
7         {
8                 foreach (string message in Foo ())
9                         Console.WriteLine (message);
10         }
11
12         static IEnumerable<string> Foo ()
13         {
14                 Action fnAction;
15                 {
16                         fnAction = () => { };
17                 }
18                 yield return "Executing action";
19                 {
20                         fnAction ();
21                 }
22                 yield return "Action executed";
23         }
24 }