[jit] Fix the saving of the 'cfg->ret_var_set' flag when inlining, it was set to...
[mono.git] / mcs / tests / gtest-iter-22.cs
1 using System;
2 using System.Collections.Generic;
3
4 class D : IDisposable
5 {
6         public void Dispose ()
7         {
8                 Console.WriteLine ("dispose");
9         }
10 }
11
12 class C
13 {
14         IEnumerable<int> Test ()
15         {
16                 try {
17                         using (var d = new D ()) {
18                                 Console.WriteLine (1);
19                         }
20                 } finally {
21                         Console.WriteLine (2);
22                 }
23
24                 yield break;
25         }
26
27         public static int Main ()
28         {
29                 var c = new C ();
30                 foreach (var a in c.Test ()) {
31                         Console.WriteLine (a);
32                 }
33
34                 return 0;
35         }
36 }