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