Hi,
could you please take a look at this code:
ObjectInstance object = null;
if (object?.Value is not Table || (object.Value is Table t && t.isModified()))
{
string falsePositive = "I'll never check second object.Value";
}
In SonarCloud I get this error:
According to my knowledge and VisualStudio it’s a false positive. If object is null in the first condition, then it will never check the second one, because it is already checked here object?.Value is not Table.
Could you please help me find a solution to that issue?