37 instantiations of BoundBadExpression
Microsoft.CodeAnalysis.CSharp (37)
Binder\Binder.ValueChecks.cs (1)
627return new BoundBadExpression(
Binder\Binder_Expressions.cs (5)
148return new BoundBadExpression(syntax, 161return new BoundBadExpression(syntax, 7020return new BoundBadExpression(node, LookupResultKind.OverloadResolutionFailure, ImmutableArray<Symbol>.Empty, children, interfaceType); 8157return new BoundBadExpression( 9268return new BoundBadExpression(node, LookupResultKind.Empty, ImmutableArray<Symbol>.Empty, childBoundNodes, CreateErrorType(), hasErrors: true);
Binder\Binder_Patterns.cs (1)
370lengthAccess = new BoundBadExpression(node, LookupResultKind.Empty, ImmutableArray<Symbol?>.Empty, ImmutableArray<BoundExpression>.Empty, CreateErrorType(), hasErrors: true) { WasCompilerGenerated = true };
Binder\Binder_Query.cs (5)
736yExpression = new BoundBadExpression(yExpression.Syntax, LookupResultKind.Empty, ImmutableArray<Symbol?>.Empty, ImmutableArray.Create(yExpression), CreateErrorType()); 742yExpression = new BoundBadExpression(yExpression.Syntax, LookupResultKind.Empty, ImmutableArray<Symbol?>.Empty, ImmutableArray.Create(yExpression), yExpression.Type); 803field2Value = new BoundBadExpression(field2Value.Syntax, LookupResultKind.Empty, ImmutableArray<Symbol?>.Empty, ImmutableArray.Create(field2Value), field2Value.Type, true); 975receiver = new BoundBadExpression(receiver.Syntax, LookupResultKind.NotAValue, ImmutableArray<Symbol?>.Empty, ImmutableArray.Create(receiver), CreateErrorType()); 997receiver = new BoundBadExpression(receiver.Syntax, LookupResultKind.NotAValue, ImmutableArray<Symbol?>.Empty, ImmutableArray.Create(receiver), CreateErrorType());
Binder\Binder_Symbols.cs (1)
1469receiver = new BoundBadExpression(receiver.Syntax, LookupResultKind.Ambiguous, ImmutableArray<Symbol>.Empty, ImmutableArray.Create(receiver), receiver.Type, hasErrors: true).MakeCompilerGenerated();
Binder\ForEachLoopBinder.cs (1)
722return new BoundBadExpression(
Generated\BoundNodes.xml.Generated.cs (1)
1003var result = new BoundBadExpression(this.Syntax, resultKind, symbols, childBoundNodes, type, this.HasErrors);
Lowering\ClosureConversion\ClosureConversion.cs (1)
1731return new BoundBadExpression(F.Syntax, LookupResultKind.Empty, ImmutableArray<Symbol>.Empty, ImmutableArray.Create<BoundExpression>(node), node.Type);
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (5)
351return new BoundBadExpression(node.Syntax, default(LookupResultKind), ImmutableArray<Symbol>.Empty, ImmutableArray.Create<BoundExpression>(node), ExpressionType); 382return new BoundBadExpression(node.Syntax, 0, ImmutableArray<Symbol>.Empty, ImmutableArray.Create<BoundExpression>(node), ExpressionType); 1091return new BoundBadExpression(node.Syntax, default(LookupResultKind), ImmutableArray<Symbol>.Empty, ImmutableArray.Create<BoundExpression>(node), node.Type); 1098return new BoundBadExpression(node.Syntax, default(LookupResultKind), ImmutableArray<Symbol>.Empty, ImmutableArray.Create<BoundExpression>(node), node.Type); 1130return new BoundBadExpression(node.Syntax, default(LookupResultKind), ImmutableArray<Symbol>.Empty, ImmutableArray.Create<BoundExpression>(node), node.Type);
Lowering\LocalRewriter\LocalRewriter.cs (1)
593return new BoundBadExpression(syntax, LookupResultKind.NotReferencable, ImmutableArray<Symbol?>.Empty, children, resultType);
Lowering\LocalRewriter\LocalRewriter_Event.cs (5)
128clearCall = new BoundBadExpression(syntax, LookupResultKind.NotInvocable, ImmutableArray<Symbol?>.Empty, ImmutableArray.Create<BoundExpression>(removeDelegate), ErrorTypeSymbol.UnknownResultType); 170marshalCall = new BoundBadExpression(syntax, LookupResultKind.NotInvocable, ImmutableArray<Symbol?>.Empty, marshalArguments, ErrorTypeSymbol.UnknownResultType); 265getOrCreateCall = new BoundBadExpression(syntax, LookupResultKind.NotInvocable, ImmutableArray<Symbol?>.Empty, ImmutableArray.Create<BoundExpression>(fieldAccess), ErrorTypeSymbol.UnknownResultType); 287return new BoundBadExpression(syntax, LookupResultKind.NotInvocable, ImmutableArray<Symbol?>.Empty, ImmutableArray.Create(getOrCreateCall), ErrorTypeSymbol.UnknownResultType); 333return new BoundBadExpression(node.Syntax, LookupResultKind.NotCreatable, ImmutableArray.Create<Symbol?>(node.Event),
Lowering\LocalRewriter\LocalRewriter_FixedStatement.cs (2)
483helperCall = new BoundBadExpression(fixedInitializer.Syntax, LookupResultKind.NotInvocable, ImmutableArray<Symbol?>.Empty, ImmutableArray<BoundExpression>.Empty, ErrorTypeSymbol.UnknownResultType); 544lengthCall = new BoundBadExpression(fixedInitializer.Syntax, LookupResultKind.NotInvocable, ImmutableArray<Symbol?>.Empty, ImmutableArray.Create<BoundExpression>(factory.Local(pinnedTemp)), ErrorTypeSymbol.UnknownResultType);
Lowering\LocalRewriter\LocalRewriter_ObjectCreationExpression.cs (3)
389newGuid = new BoundBadExpression(node.Syntax, LookupResultKind.NotCreatable, ImmutableArray<Symbol?>.Empty, ImmutableArray<BoundExpression>.Empty, ErrorTypeSymbol.UnknownResultType); 407callGetTypeFromCLSID = new BoundBadExpression(node.Syntax, LookupResultKind.OverloadResolutionFailure, ImmutableArray<Symbol?>.Empty, ImmutableArray<BoundExpression>.Empty, ErrorTypeSymbol.UnknownResultType); 419rewrittenObjectCreation = new BoundBadExpression(node.Syntax, LookupResultKind.OverloadResolutionFailure, ImmutableArray<Symbol?>.Empty, ImmutableArray<BoundExpression>.Empty, node.Type);
Lowering\LocalRewriter\LocalRewriter_StackAlloc.cs (1)
67constructorCall = new BoundBadExpression(
Lowering\LocalRewriter\LocalRewriter_StringInterpolation.cs (1)
228: new BoundBadExpression(syntax, LookupResultKind.Empty, symbols: ImmutableArray<Symbol?>.Empty, childBoundNodes: ImmutableArray<BoundExpression>.Empty, type);
Lowering\LocalRewriter\LocalRewriter_UsingStatement.cs (1)
463disposeCall = new BoundBadExpression(resourceSyntax, LookupResultKind.NotInvocable, ImmutableArray<Symbol?>.Empty, ImmutableArray.Create(disposedExpression), ErrorTypeSymbol.UnknownResultType);
Lowering\LocalRewriter\LoweredDynamicOperation.cs (1)
55var bad = new BoundBadExpression(children[0].Syntax, LookupResultKind.Empty, ImmutableArray<Symbol?>.Empty, children, resultType);
Lowering\SyntheticBoundNodeFactory.cs (1)
233return new BoundBadExpression(Syntax, LookupResultKind.Empty, ImmutableArray<Symbol?>.Empty, ImmutableArray<BoundExpression>.Empty, type, hasErrors: true);
70 references to BoundBadExpression
Microsoft.CodeAnalysis.CSharp (70)
Binder\Binder_Attributes.cs (1)
521var badLHS = BadExpression(nameSyntax, lookupResultKind: LookupResultKind.Empty);
Binder\Binder_Deconstruct.cs (1)
714private BoundBadExpression MissingDeconstruct(BoundExpression receiver, SyntaxNode rightSyntax, int numParameters, BindingDiagnosticBag diagnostics,
Binder\Binder_Expressions.cs (25)
104/// Generates a new <see cref="BoundBadExpression"/> with no known type 106private BoundBadExpression BadExpression(SyntaxNode syntax) 112/// Generates a new <see cref="BoundBadExpression"/> with no known type, and the given bound child. 114private BoundBadExpression BadExpression(SyntaxNode syntax, BoundExpression childNode) 120/// Generates a new <see cref="BoundBadExpression"/> with no known type, and the given bound children. 122private BoundBadExpression BadExpression(SyntaxNode syntax, ImmutableArray<BoundExpression> childNodes) 128/// Generates a new <see cref="BoundBadExpression"/> with no known type, given lookup resultKind. 130protected BoundBadExpression BadExpression(SyntaxNode syntax, LookupResultKind lookupResultKind) 136/// Generates a new <see cref="BoundBadExpression"/> with no known type, given lookup resultKind and the given bound child. 138protected BoundBadExpression BadExpression(SyntaxNode syntax, LookupResultKind lookupResultKind, BoundExpression childNode) 144/// Generates a new <see cref="BoundBadExpression"/> with no known type, given lookupResultKind and given symbols for GetSemanticInfo API. 146private BoundBadExpression BadExpression(SyntaxNode syntax, LookupResultKind resultKind, ImmutableArray<Symbol> symbols) 156/// Generates a new <see cref="BoundBadExpression"/> with no known type, given lookupResultKind and given symbols for GetSemanticInfo API, 159private BoundBadExpression BadExpression(SyntaxNode syntax, LookupResultKind resultKind, ImmutableArray<Symbol> symbols, BoundExpression childNode) 169/// Generates a new <see cref="BoundBadExpression"/> with no known type, given lookupResultKind and given symbols for GetSemanticInfo API, 172private BoundBadExpression BadExpression(SyntaxNode syntax, LookupResultKind resultKind, ImmutableArray<Symbol> symbols, ImmutableArray<BoundExpression> childNodes, bool wasCompilerGenerated = false) 187/// Otherwise, a new <see cref="BoundBadExpression"/> wrapping <paramref name="expr"/> is returned. 192/// Returned expression need not be a <see cref="BoundBadExpression"/>, but is guaranteed to have HasErrors set to true. 209var badExpression = (BoundBadExpression)expr; 233/// did not meet the requirements, the return value will be a <see cref="BoundBadExpression"/> that 5136Debug.Assert(result is not BoundBadExpression { ChildBoundNodes: var children } || !children.Any((child, node) => child.Syntax == node, node)); 5719var badRight = new BoundBadExpression( 6973var bad = (BoundBadExpression)classCreation;
Binder\Binder_Patterns.cs (2)
240Debug.Assert(indexerAccess is BoundIndexerAccess or BoundImplicitIndexerAccess or BoundArrayAccess or BoundBadExpression or BoundDynamicIndexerAccess); 389Debug.Assert(indexerAccess is BoundIndexerAccess or BoundImplicitIndexerAccess or BoundArrayAccess or BoundBadExpression or BoundDynamicIndexerAccess);
Binder\Binder_Statements.cs (1)
1718BoundBadExpression => null,
BoundTree\BoundExpressionExtensions.cs (1)
187foreach (var s in ((BoundBadExpression)node).Symbols)
BoundTree\BoundImplicitIndexerAccess.cs (1)
20Debug.Assert(LengthOrCountAccess is BoundPropertyAccess or BoundArrayLength or BoundLocal or BoundBadExpression);
BoundTree\BoundListPattern.cs (2)
14Debug.Assert(LengthAccess is null or BoundPropertyAccess or BoundBadExpression); 15Debug.Assert(IndexerAccess is null or BoundIndexerAccess or BoundImplicitIndexerAccess or BoundArrayAccess or BoundBadExpression or BoundDynamicIndexerAccess);
BoundTree\BoundSlicePattern.cs (1)
13Debug.Assert(IndexerAccess is null or BoundIndexerAccess or BoundImplicitIndexerAccess or BoundArrayAccess or BoundBadExpression or BoundDynamicIndexerAccess);
BoundTree\InterpolatedStringHandlerData.cs (1)
37Debug.Assert(construction is BoundObjectCreationExpression or BoundDynamicObjectCreationExpression or BoundBadExpression);
Compilation\CSharpSemanticModel.cs (9)
3367var expr = (BoundBadExpression)boundNode; 3400((BoundBadExpression)boundNodeForSyntacticParent).ResultKind == LookupResultKind.NotCreatable) 3997BoundBadExpression boundBadExpression = (BoundBadExpression)boundNodeForSyntacticParent; 4334symbols = OneOrMany.Create(((BoundBadExpression)boundNodeForSyntacticParent).Symbols.WhereAsArray((sym, myMethodGroup) => myMethodGroup.Contains(sym), myMethodGroup)); 4337resultKind = ((BoundBadExpression)boundNodeForSyntacticParent).ResultKind; 4435symbols = OneOrMany.Create(((BoundBadExpression)boundNodeForSyntacticParent).Symbols.WhereAsArray((sym, myPropertyGroup) => myPropertyGroup.Contains(sym), myPropertyGroup)); 4438resultKind = ((BoundBadExpression)boundNodeForSyntacticParent).ResultKind;
Compiler\MethodCompiler.cs (1)
2299public override BoundNode? VisitBadExpression(BoundBadExpression node)
FlowAnalysis\AbstractFlowPass.cs (1)
1575public override BoundNode VisitBadExpression(BoundBadExpression node)
FlowAnalysis\DefiniteAssignment.cs (2)
1664var bad = (BoundBadExpression)node;
FlowAnalysis\NullableWalker.cs (1)
11239public override BoundNode? VisitBadExpression(BoundBadExpression node)
FlowAnalysis\NullableWalker.DebugVerifier.cs (1)
158public override BoundNode? VisitBadExpression(BoundBadExpression node)
Generated\BoundNodes.xml.Generated.cs (10)
999public BoundBadExpression Update(LookupResultKind resultKind, ImmutableArray<Symbol?> symbols, ImmutableArray<BoundExpression> childBoundNodes, TypeSymbol? type) 1003var result = new BoundBadExpression(this.Syntax, resultKind, symbols, childBoundNodes, type, this.HasErrors); 8908return VisitBadExpression((BoundBadExpression)node, arg); 9360public virtual R VisitBadExpression(BoundBadExpression node, A arg) => this.DefaultVisit(node, arg); 9596public virtual BoundNode? VisitBadExpression(BoundBadExpression node) => this.DefaultVisit(node); 9856public override BoundNode? VisitBadExpression(BoundBadExpression node) 10933public override BoundNode? VisitBadExpression(BoundBadExpression node) 12484public override BoundNode? VisitBadExpression(BoundBadExpression node) 12488BoundBadExpression updatedNode; 15144public override TreeDumperNode VisitBadExpression(BoundBadExpression node, object? arg) => new TreeDumperNode("badExpression", null, new TreeDumperNode[]
Lowering\AsyncRewriter\AsyncMethodToStateMachineRewriter.cs (1)
333public sealed override BoundNode VisitBadExpression(BoundBadExpression node)
Lowering\LocalRewriter\LocalRewriter.cs (1)
568public override BoundNode VisitBadExpression(BoundBadExpression node)
Lowering\LocalRewriter\LoweredDynamicOperation.cs (2)
55var bad = new BoundBadExpression(children[0].Syntax, LookupResultKind.Empty, ImmutableArray<Symbol?>.Empty, children, resultType); 63Debug.Assert(SiteInitialization == null && SiteInvocation is BoundBadExpression && _temps.IsDefaultOrEmpty);
Lowering\SpillSequenceSpiller.cs (1)
969public override BoundNode VisitBadExpression(BoundBadExpression node)
Lowering\SyntheticBoundNodeFactory.cs (1)
231public BoundBadExpression BadExpression(TypeSymbol type)
Operations\CSharpOperationFactory.cs (3)
120return CreateBoundBadExpressionOperation((BoundBadExpression)boundNode); 1401private IInvalidOperation CreateBoundBadExpressionOperation(BoundBadExpression boundBadExpression) 2321case BoundBadExpression bad: