2 writes to _inExpressionLambda
Microsoft.CodeAnalysis.CSharp (2)
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (2)
72_inExpressionLambda = _inExpressionLambda || (node.ConversionKind == ConversionKind.AnonymousFunction && !wasInExpressionLambda && rewrittenType.IsExpressionTree()); 76_inExpressionLambda = wasInExpressionLambda;
58 references to _inExpressionLambda
Microsoft.CodeAnalysis.CSharp (58)
Lowering\LocalRewriter\LocalRewriter.cs (1)
477if (_inExpressionLambda)
Lowering\LocalRewriter\LocalRewriter_AsOperator.cs (1)
47if (!_inExpressionLambda)
Lowering\LocalRewriter\LocalRewriter_BinaryOperator.cs (3)
78if (_inExpressionLambda) 204if (_inExpressionLambda) 2029BoundExpression call = _inExpressionLambda
Lowering\LocalRewriter\LocalRewriter_Call.cs (5)
451!_inExpressionLambda && 666Debug.Assert(!requiresInstanceReceiver || rewrittenReceiver != null || _inExpressionLambda); 675Debug.Assert(!_inExpressionLambda); 838Debug.Assert(!_inExpressionLambda); 1132if (possibleParamsArray.IsParamsArrayOrCollection && !_inExpressionLambda && ((BoundArrayCreation)possibleParamsArray).Bounds is [BoundLiteral { ConstantValueOpt.Value: 0 }])
Lowering\LocalRewriter\LocalRewriter_CollectionExpression.cs (6)
34Debug.Assert(!_inExpressionLambda); 248Debug.Assert(!_inExpressionLambda); 334Debug.Assert(!_inExpressionLambda); 396Debug.Assert(!_inExpressionLambda); 470Debug.Assert(!_inExpressionLambda); 1023Debug.Assert(!_inExpressionLambda);
Lowering\LocalRewriter\LocalRewriter_ConditionalAccess.cs (1)
40Debug.Assert(!_inExpressionLambda);
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (19)
71bool wasInExpressionLambda = _inExpressionLambda; 72_inExpressionLambda = _inExpressionLambda || (node.ConversionKind == ConversionKind.AnonymousFunction && !wasInExpressionLambda && rewrittenType.IsExpressionTree()); 73InstrumentationState.IsSuppressed = _inExpressionLambda; 77InstrumentationState.IsSuppressed = _inExpressionLambda; 278if (!_inExpressionLambda && 312if (_inExpressionLambda && !conversion.IsUserDefined) 333if (_inExpressionLambda || !rewrittenOperand.Type.Equals(rewrittenType, TypeCompareKind.ConsiderEverything)) 377if (!_inExpressionLambda) 401if (!_inExpressionLambda || !explicitCastInCode) 410if (rewrittenOperand.IsDefaultValue() && (!_inExpressionLambda || !explicitCastInCode)) 429if (rewrittenOperand.IsDefaultValue() && (!_inExpressionLambda || !explicitCastInCode)) 492(!_inExpressionLambda || !explicitCastInCode)) 581&& !_inExpressionLambda // The tree structure / meaning for expression trees should remain untouched. 637if (!_inExpressionLambda && _compilation.IsReadOnlySpanType(destinationType)) 1043if (_inExpressionLambda) 1358if (_inExpressionLambda) 1399if (_inExpressionLambda) 1521if (_inExpressionLambda) 1735if (_inExpressionLambda)
Lowering\LocalRewriter\LocalRewriter_IsOperator.cs (1)
56if (!_inExpressionLambda)
Lowering\LocalRewriter\LocalRewriter_Literal.cs (1)
74!_inExpressionLambda)
Lowering\LocalRewriter\LocalRewriter_NullCoalescingAssignmentOperator.cs (1)
90Debug.Assert(!_inExpressionLambda && lhsRead.Kind != BoundKind.PropertyAccess);
Lowering\LocalRewriter\LocalRewriter_NullCoalescingOperator.cs (1)
38if (_inExpressionLambda)
Lowering\LocalRewriter\LocalRewriter_ObjectCreationExpression.cs (3)
70if (_inExpressionLambda) 261Debug.Assert(!_inExpressionLambda); 309if (_inExpressionLambda)
Lowering\LocalRewriter\LocalRewriter_ObjectOrCollectionInitializerExpression.cs (9)
38Debug.Assert(!_inExpressionLambda); 68Debug.Assert(_inExpressionLambda); 90Debug.Assert(rewrittenReceiver is { } || _inExpressionLambda); 104Debug.Assert(!_inExpressionLambda); 149Debug.Assert(rewrittenReceiver != null || _inExpressionLambda); 193Debug.Assert(!_inExpressionLambda, "Expression trees do not support extension Add"); 197if (_inExpressionLambda) 256Debug.Assert(!_inExpressionLambda); 277Debug.Assert(!_inExpressionLambda);
Lowering\LocalRewriter\LocalRewriter_PropertyAccess.cs (2)
45!_inExpressionLambda && ReferenceEquals(propertySymbol, _compilation.GetSpecialTypeMember(SpecialMember.System_Array__LongLength))) 82if (_inExpressionLambda && rewrittenArguments.IsEmpty)
Lowering\LocalRewriter\LocalRewriter_StringConcat.cs (1)
44if (_inExpressionLambda)
Lowering\LocalRewriter\LocalRewriter_UnaryOperator.cs (3)
105if (!_inExpressionLambda) 114if (!_inExpressionLambda || kind == UnaryOperatorKind.UserDefinedTrue || kind == UnaryOperatorKind.UserDefinedFalse) 167if (!_inExpressionLambda)