Add Mono.Runtime::GetNativeStackTrace method to make the new backtracing facility...
[mono-project.git] / mcs / tests / gtest-527.cs
blobb4493870ba44f0746bfc20ceccc278e576201b0f
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 static int Main ()
17 Provide<Service> ().Foo ();
18 return 0;