1 // Compiler options: -optimize
3 // Check lambdas to method group optimization, no lambdas should be created for any code int this test
6 using System
.Collections
;
17 public static int Main ()
19 var parsed
= from t
in new[] { "2" }
select int.Parse (t
);
20 if (parsed
.First () != 2)
23 var s
= new string[] { "x", "a" }
;
24 Array
.Sort (s
, (a
, b
) => String
.Compare (a
, b
));
31 Func
<int> i
= () => Prop
;
35 var em
= new IEnumerable
[] { new int[] { 1 }
}.Select (l
=> l
.Cast
<int> ()).First ().First ();
39 Console
.WriteLine ("ok");