35 references to DiscardExpression
Microsoft.CodeAnalysis.CSharp (35)
Binder\Binder.ValueChecks.cs (5)
504case BoundKind.DiscardExpression: 3357case BoundKind.DiscardExpression: 3677case BoundKind.DiscardExpression: 4078case BoundKind.DiscardExpression: 4763case BoundKind.DiscardExpression:
Binder\Binder_Deconstruct.cs (4)
376case BoundKind.DiscardExpression: 410case BoundKind.DiscardExpression: 597if (expression.Kind == BoundKind.DiscardExpression) 792if (expression == null && checkedVariable.Kind != BoundKind.DiscardExpression)
Binder\Binder_Expressions.cs (3)
3537else if (argument.Kind == BoundKind.DiscardExpression && !argument.HasExpressionType()) 3573(BoundKind.OutVariablePendingInference or BoundKind.OutDeconstructVarPendingInference or BoundKind.DiscardExpression or BoundKind.ArgListOperator)); 9401else if (index.Kind == BoundKind.DiscardExpression && !index.HasExpressionType())
Binder\Binder_Invocation.cs (3)
131e.Kind == BoundKind.DiscardExpression && !e.HasExpressionType())); 2052case BoundKind.DiscardExpression: 2071else if (argument.Kind == BoundKind.DiscardExpression)
Binder\Binder_Statements.cs (1)
1428bool discardAssignment = op1.Kind == BoundKind.DiscardExpression;
Binder\ForEachLoopBinder.cs (1)
400if (iterationErrorExpression.Kind == BoundKind.DiscardExpression)
Binder\RefSafetyAnalysis.cs (1)
541if (node.Left.Kind != BoundKind.DiscardExpression)
Binder\Semantics\OverloadResolution\OverloadResolution.cs (2)
2903(nodeKind == BoundKind.DiscardExpression && !node.HasExpressionType())) 4598(argument.Kind == BoundKind.DiscardExpression && (object)argType == null))
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (2)
1210argument.Kind != BoundKind.DiscardExpression) 1301Debug.Assert(argument.Kind != BoundKind.DiscardExpression || argument.HasExpressionType());
Generated\BoundNodes.xml.Generated.cs (3)
8529: base(BoundKind.DiscardExpression, syntax, type, hasErrors) 8536: base(BoundKind.DiscardExpression, syntax, type) 9279case BoundKind.DiscardExpression:
Lowering\DiagnosticsPass_Warnings.cs (1)
43case BoundKind.DiscardExpression:
Lowering\LocalRewriter\LocalRewriter.cs (1)
1028case BoundKind.DiscardExpression:
Lowering\LocalRewriter\LocalRewriter_AssignmentOperator.cs (1)
230case BoundKind.DiscardExpression:
Lowering\LocalRewriter\LocalRewriter_DeconstructionAssignmentOperator.cs (2)
252if (leftTarget.Kind != BoundKind.DiscardExpression) 451case BoundKind.DiscardExpression:
Lowering\LocalRewriter\LoweredDynamicOperationFactory.cs (1)
672int discardCount = loweredArguments.Count(a => a.Kind == BoundKind.DiscardExpression);
Lowering\SyntheticBoundNodeFactory.cs (2)
1728var discardsPresent = arguments.Any(static a => a.Kind == BoundKind.DiscardExpression); 1733(arg, t) => arg.Kind == BoundKind.DiscardExpression ? t.factory.MakeTempForDiscard((BoundDiscardExpression)arg, t.builder) : arg,
Operations\CSharpOperationFactory.cs (2)
262case BoundKind.DiscardExpression: 2539if (variable == null && boundDeclarationPattern.VariableAccess?.Kind == BoundKind.DiscardExpression)