[jit] Fix the saving of the 'cfg->ret_var_set' flag when inlining, it was set to...
[mono.git] / mcs / tests / gtest-linq-17.cs
1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4
5 //
6 // Tests whether group i by i is optimized
7 //
8 class TestGroupBy
9 {
10         public static int Main ()
11         {
12                 int[] int_array = new int [] { 0, 1, 2, 3, 4 };
13                 
14                 var e = from i in int_array group i by i;
15
16                 int c = 0;
17                 foreach (var ig in e) {
18                         Console.WriteLine (ig.Key);
19                         if (ig.Key != c++)
20                                 return c;
21                 }
22                 
23                 Console.WriteLine ("OK");
24                 return 0;
25         }
26 }