diff --git a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Runtime/AvoidZeroLengthArrayAllocations.cs b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Runtime/AvoidZeroLengthArrayAllocations.cs index e8881ecf4f..bd906a7c15 100644 --- a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Runtime/AvoidZeroLengthArrayAllocations.cs +++ b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Runtime/AvoidZeroLengthArrayAllocations.cs @@ -80,7 +80,7 @@ private static void AnalyzeOperation(OperationAnalysisContext context, IMethodSy { return; } - + if (arrayCreationExpression.IsWithinExpressionTree(linqExpressionType)) { return;