これまで、C# の推論は常にうまく機能していました。ケースを単純化するために、テスト例を作成しました。
class Parent
{
public void InferrenceTesting<T>() where T : Parent
{
}
}
class Child : Parent
{
public void Test()
{
//this line gives me a compiler error : The type arguments for method 'Parent.InferrenceTesting<T>()' cannot be inferred from the usage. Try specifying the type arguments explicitly.
this.InferrenceTesting();
}
}
私は推論についてかなり読んだことがありますが、なぜこれが機能しないのかはわかりません。