using System; using System.Threading.Tasks; public delegate T ActualValueDelegate (); class X { public static void Main () { Matches (async () => await Throw()); } static bool Matches(ActualValueDelegate del) where T : Task { del ().Wait (); return true; } static async Task Throw() { await Task.Delay (1); } }