using System; namespace MonoBugs { public struct Foo { public T Item; } public static class Bar { public static void DoStuff (T item, Action fn) { throw new ApplicationException ("failed"); } public static void DoStuff (T? item, Action fn) where T : struct { fn (item.Value); } } public static class Program { public static void Main () { Foo? value = new Foo { Item = 3 }; Bar.DoStuff (value, x => Console.WriteLine (x.Item)); } } }