You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
NET-2999 Fix S6672 FN: Mismatch in primary constructor is not recognized #9784
Currently only constructor declarations are checked. A logger type mismatch in a primary constructor is not yet recognized.
Reproducer
classA(ILogger<C>logger);// ^^^ no diagnostic here despite the mismatchclassB{publicB(ILogger<C>logger)// ^^^ S6672: Update this logger to use its enclosing type.{}}classC;
Product and Version
SonarQube for Visual Studio 9.4.0.16052
Reactions are currently unavailable
Activity
pavel-mikula-sonarsource commented on Jan 20, 2026
changed the title [-]Fix S6672 FN: Mismatch in primary constructor is not recognized[/-][+]NET-2999 Fix S6672 FN: Mismatch in primary constructor is not recognized[/+]on Jan 20, 2026
Activity
pavel-mikula-sonarsource commentedon Jan 20, 2026
Hi @jhinder,
Thank you for reporting this case. I confirm it as False Negative
[-]Fix S6672 FN: Mismatch in primary constructor is not recognized[/-][+]NET-2999 Fix S6672 FN: Mismatch in primary constructor is not recognized[/+]github-actions commentedon Jan 20, 2026
Internal ticket NET-2999