Skip to content

[Arguments(decimal, decimal)] does not infer correct type since v0.50.0 #2764

@AlexandreBossard

Description

@AlexandreBossard
    [Test]
    [Arguments(2_000, 123_999.00000000000000001)]
    [Arguments(2_000.00000000000000001, 123_999)]
    [Arguments(2_000.00000000000000001, 123_999.00000000000000001)]
    public async Task Transfer(decimal debit, decimal credit)
{
        Console.WriteLine("{0} {1}", debit, credit);
}

prints

2000 123999
2000 123999
2000 123999

which is incorrect :-)

And I can confirm the value in the debugger.

I tried casting to decimal and using the M suffix literal, but it does not compile.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions