interface IA<T> {}
interface IB : IA<int>{}
class C : IB, IA<long>
{
static void Main()
{
C c = new C();
Foo(c); // error CS0411: The type arguments for method 'C.Foo<T>(IA<T>)' cannot be inferred from the usage. Try specifying the type arguments explicitly.
}
static void Foo<T>(IA<T> x) {}
}
Description
interface IA<T> {}
interface IB : IA<int>{}
class C : IB, IA<long>
{
static void Main()
{
C c = new C();
Foo(c); // error CS0411: The type arguments for method 'C.Foo<T>(IA<T>)' cannot be inferred from the usage. Try specifying the type arguments explicitly.
}
static void Foo<T>(IA<T> x) {}
}