Skip to content

Instantly share code, notes, and snippets.

@svick
Created May 13, 2015 23:08
Show Gist options
  • Select an option

  • Save svick/08a665153ac9b8567195 to your computer and use it in GitHub Desktop.

Select an option

Save svick/08a665153ac9b8567195 to your computer and use it in GitHub Desktop.
Incorrect compiler error for method with async/non-async delegate overloads
using System;
using System.Threading.Tasks;
class Program
{
static void M(Func<Task<int>> f, int i)
{ }
static void M(Func<int> f, int i)
{ }
private static void Main()
{
M(() => 42, "");
M(async () => 42, "");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment