remove NotWorking
[mcs.git] / tests / gtest-anon-35.cs
blob49944643afb675d2c9a831fa31435fb179bdcd0d
1 using System;
2 using System.Reflection;
4 // Delegate Cache
5 class C<T>
7 static Func<T> XX ()
9 System.Func<T> t = () => default (T);
10 return t;
14 // Delegate Cache
15 class C2<T>
17 static Func<C<T>> XX ()
19 System.Func<C<T>> t = () => default (C<T>);
20 return t;
24 // No delegate cache
25 class N1
27 static Func<T> XX<T> ()
29 System.Func<T> t = () => default (T);
30 return t;
34 public class Test
36 public static int Main ()
38 var t = typeof (C<>);
39 if (t.GetFields (BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static).Length != 1)
40 return 1;
42 t = typeof (C2<>);
43 if (t.GetFields (BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static).Length != 1)
44 return 1;
46 t = typeof (N1);
47 if (t.GetFields (BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static).Length != 0)
48 return 1;
50 Console.WriteLine ("OK");
51 return 0;