diff --git a/analyzers/tests/SonarAnalyzer.UnitTest/TestCases/InfiniteRecursion.RoslynCfg.cs b/analyzers/tests/SonarAnalyzer.UnitTest/TestCases/InfiniteRecursion.RoslynCfg.cs index ad2db0e1fe0..df346f536a3 100644 --- a/analyzers/tests/SonarAnalyzer.UnitTest/TestCases/InfiniteRecursion.RoslynCfg.cs +++ b/analyzers/tests/SonarAnalyzer.UnitTest/TestCases/InfiniteRecursion.RoslynCfg.cs @@ -600,3 +600,38 @@ public IEnumerable Repeat(T element) // Noncompliant FP, it's not a recur } } } + +// https://github.com/SonarSource/sonar-dotnet/issues/6642 +public class Repro_6642 +{ + public int this[int i] + { + get { return this[i]; } // FN + set { this[i] = value; } // FN + } +} + +// https://github.com/SonarSource/sonar-dotnet/issues/6643 +public class Repro_6643 +{ + public static implicit operator byte(Repro_6643 d) => d; // FN +} + +// https://github.com/SonarSource/sonar-dotnet/issues/6644 +public delegate bool SomeDelegate(); + +public class Repro_6644 +{ + public event SomeDelegate SomeEvent + { + add + { + SomeEvent += value; // FN + } + + remove + { + SomeEvent -= value; // FN + } + } +}