xunit icon indicating copy to clipboard operation
xunit copied to clipboard

InlineData duplicate detection fails to detect duplicates between implicitly converted types

Open JakeYallop opened this issue 8 months ago • 1 comments

Given the following code:

    public const int Const = 1;
    public const byte ConstByte = 1;

    [Theory]
    [InlineData(Const)]
    [InlineData(ConstByte)]
    public void Test(int a) { }

No diagnostics are raised by the analyzer despite both these inputs resulting in exactly the same test being run. Somewhat related to https://github.com/xunit/xunit/issues/1742, with the major difference being that these tests run just fine without any issues.

JakeYallop avatar Jun 22 '24 21:06 JakeYallop