[VB.NET] Crashes with AD0001 NullReferenceException on del?(args)

Must-share information (formatted with Markdown):

  • SonarQube Community Build
  • how is SonarQube deployed: zip
  • SonarScanner for .NET: via the SonarQube extension for Azure DevOps
  • SonarAnalyzer.VisualBasic

The analyzer SonarAnalyzer.VisualBasic.Rules.DoNotOverwriteCollectionElementscrashes with a NullReferenceException when the compilation contains a null-conditional invocation of a delegate, e.g. Handler?(a, b).

Minimal reproducer

Public Class Repro

Private Handler As Action(Of Long, Long)

Public Sub Report(finishedSize As Long, totalSize As Long)
    Handler?(finishedSize, totalSize)   ' <-- AD0001 / NullReferenceException
End Sub

End Class

I assume they will ask which version you are using.

I use Community Build
v26.8.0.126808