[tuner] handle the case with multiple "preserve" attributes
[mono-project.git] / mcs / tests / gtest-527.cs
blob4e3b2558556551b177476ab81c41a7982c60053a
1 public static class CoalescingWithGenericsBug
3 class Service { public void Foo () { } }
5 static T Provide<T> () where T : class
7 return FindExisting<T> () ?? System.Activator.CreateInstance<T> ();
10 static T FindExisting<T> () where T : class
12 return null;
15 public static int Main ()
17 Provide<Service> ().Foo ();
18 return 0;