PVS Studio throws V3125: The 'control.Parent' object was used after it was verified against null. Check lines: 11, 9.
using System.Windows.Forms;
namespace V3125_False_Positive
{
static class Program
{
static void Main()
{
if (new Control() is Control control && control.Parent != null)
{
string parentname = control.Parent.Name;
}
}
}
}
Is this a false positive?