Constrained variant interface dispatch dispatches to wrong method
Open
area-VM-meta-mono
- Dominant language
- C#
- Stars
- 18.3k
- Forks
- 5.6k
- PR merge metrics
- PR metrics pending
Description
See the test added in #121167. I'm going to ActiveIssue the test on this issue.
```csharp
using Xunit;
namespace SimpleStaticVirtual
{
public class Tests
{
[Fact]
public static void TestEntryPoint()
{
Assert.Equal(nameof(IGetter), Get());
Assert.Equal("Object", GetVariant, string>());
}
static string Get() where T : IGetter => T.Get();
static string GetVariant() where T : IGetter => T.Get();
}
interface IGetter
{
static virtual string Get() => nameof(IGetter);
}
interface IGetter
{
static virtual string Get() => typeof(T).Name;
}
}
```
Contributor guide
Assessment
This issue has not been assessed yet.