Shorter
[mono.git] / mcs / tests / test-anon-118.cs
1
2 // Supported by C# 3.0
3
4 public class C
5 {
6         public delegate TR Func<TR, TA> (TA t);
7         
8         public static TR Test<TR, TA> (Func<TR, TA> f)
9         {
10                 return default (TR);
11         }
12         
13         public static TR Test<TR, TA, TB> (Func<TR, TA> f, Func<TR, TB> f2)
14         {
15                 return default (TR);
16         }       
17         
18         public static void Test2<T> ()
19         {
20                 T r = Test (delegate (T i) { return i; });
21         }
22         
23         public static void Main()
24         {
25                 int r = Test (delegate (int i) { return i < 1 ? 'a' : i; });
26                 string s = Test (delegate (int i) { return "a"; }, delegate (int i) { return "b"; });
27         }
28 }