Why do you believe it’s a false-positive/false-negative?
It’s caused by a new C#14 feature, which allows using ?. on the left side of an assignment. It shouldn’t raise an issue, because ??= also doesn’t, which is very similar..
Are you using
SonarQube for IDE - which IDE/version?
Visual Studio 2026 [11206.111]
Version 8.30.0.15605
in connected mode with SonarQube Server
How can we reproduce the problem? Give us a self-contained snippet of code (formatted text, no screenshots)
public static class Program
{
public static void Main(string[] args)
{
List<int> foo = null;
foo?.Capacity = 27;
}
}
This reports an S1121 in the line with foo?.Capacity.