language: C# (mono-2.8)
date: 715 days 7 hours ago
link:
visibility: public
1
2
3
4
5
6
7
8
9
10
11
12
using System;
class Foo
{
        delegate void StringAction(string a);
        void Bar(string a) { }
        static void Test<T>(Action<T> a) { }
        void Run()
        {
                Test(new StringAction(Bar));
                Test(new Action<string>(Bar));
        }
}
prog.cs(9,17): error CS0411: The type arguments for method `Foo.Test<T>(System.Action<T>)' cannot be inferred from the usage. Try specifying the type arguments explicitly
Compilation failed: 1 error(s), 0 warnings