Open
Description
Product and Version Used:
Roslynator 4.12.2
Steps to Reproduce:
using System;
class Base
{
protected virtual void M(string? str) { }
}
class Derived : Base
{
protected override void M(string? str)
{
ArgumentNullException.ThrowIfNull(str);
// process str
}
}
Actual Behavior:
Warns on ArgumentNullException.ThrowIfNull(str);
Expected Behavior:
In my opinion, no warning - we're locked into the nullable argument because of the virtual method.
Metadata
Metadata
Assignees
Labels
No labels