1 // Compiler options: -langversion:linq
5 using System.Collections.Generic;
9 static void Test<T, R> (Func<T, R> d)
13 public static int Main ()
15 Test ((int x) => { return x + 1; });
17 int[] source = new int[] { 2, 1, 0 };
18 IEnumerable<int> e = source.Where((i) => i == 0).Select((i) => i + 1);
20 if (e.ToList ()[0] != 1)
23 e = source.Where((int i) => i == 0).Select((int i) => i + 1);
25 if (e.ToList ()[0] != 1)
28 e = source.Where(delegate (int i) { return i == 0; }).Select(delegate (int i) { return i + 1; });
30 if (e.ToList ()[0] != 1)