-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Open
Labels
Description
Version Used: VS Insiders [11304.161]
Steps to Reproduce: Open testf solution.
A minimal repro, with source-code provided, is ideal. Most compiler/language issues can be distilled into a snippet that can be pasted into .NET Lab.
Diagnostic Id: IDE0370 Suppression is unecessary
Expected Behavior:
No IDE0370 on the snippet below because GetMethod returns nullable.
Actual Behavior:
public void HasCorrectClassOrAssemblyInitializeSignatureShouldReturnTrueForTestMethods()
{
MethodInfo methodInfo = typeof(DummyTestClass).GetMethod("PublicStaticMethodWithTC")!; // IDE0370 here
methodInfo.HasCorrectClassOrAssemblyInitializeSignature().Should().BeTrue();
}