diff --git a/analyzers/src/SonarAnalyzer.CFG/LiveVariableAnalysis/LiveVariableAnalysisBase.cs b/analyzers/src/SonarAnalyzer.CFG/LiveVariableAnalysis/LiveVariableAnalysisBase.cs index 8a09eaee1cc..dbcfd95abf7 100644 --- a/analyzers/src/SonarAnalyzer.CFG/LiveVariableAnalysis/LiveVariableAnalysisBase.cs +++ b/analyzers/src/SonarAnalyzer.CFG/LiveVariableAnalysis/LiveVariableAnalysisBase.cs @@ -44,7 +44,7 @@ protected LiveVariableAnalysisBase(TCfg cfg, ISymbol originalDeclaration, Cancel { Cfg = cfg; this.originalDeclaration = originalDeclaration; - this.Cancel = cancel; + Cancel = cancel; } /// diff --git a/analyzers/src/SonarAnalyzer.CSharp/LiveVariableAnalysis/SonarCSharpLiveVariableAnalysis.cs b/analyzers/src/SonarAnalyzer.CSharp/LiveVariableAnalysis/SonarCSharpLiveVariableAnalysis.cs index c0acba80803..a68d6d676a6 100644 --- a/analyzers/src/SonarAnalyzer.CSharp/LiveVariableAnalysis/SonarCSharpLiveVariableAnalysis.cs +++ b/analyzers/src/SonarAnalyzer.CSharp/LiveVariableAnalysis/SonarCSharpLiveVariableAnalysis.cs @@ -101,10 +101,10 @@ public void ProcessBlock(Block block) ProcessVariableDeclarator((VariableDeclaratorSyntax)instruction); break; - case SyntaxKind.AnonymousMethodExpression: - case SyntaxKind.ParenthesizedLambdaExpression: - case SyntaxKind.SimpleLambdaExpression: - case SyntaxKind.QueryExpression: + case SyntaxKind.AnonymousMethodExpression + or SyntaxKind.ParenthesizedLambdaExpression + or SyntaxKind.SimpleLambdaExpression + or SyntaxKind.QueryExpression: CollectAllCapturedLocal(instruction); break; }