60 instantiations of BoundBadExpression
Microsoft.CodeAnalysis.CSharp (59)
Binder\Binder.ValueChecks.cs (1)
480return new BoundBadExpression(
Binder\Binder.WithQueryLambdaParametersBinder.cs (1)
85return new BoundBadExpression(
Binder\Binder_Expressions.cs (21)
147return new BoundBadExpression(syntax, 160return new BoundBadExpression(syntax, 173return new BoundBadExpression(syntax, 213return new BoundBadExpression( 817return new BoundBadExpression( 1004boundArgument = new BoundBadExpression( 1551expression = new BoundBadExpression( 3794return new BoundBadExpression( 3833return new BoundBadExpression( 4166return new BoundBadExpression( 4177return new BoundBadExpression( 4220return new BoundBadExpression( 4609return new BoundBadExpression(node, LookupResultKind.NotInvocable, StaticCast<Symbol>.From(type.InstanceConstructors), ImmutableArray.Create(argument), type); 4656return new BoundBadExpression(node, LookupResultKind.OverloadResolutionFailure, StaticCast<Symbol>.From(type.InstanceConstructors), childNodes, type); 4753return new BoundBadExpression(node, LookupResultKind.NotCreatable, ImmutableArray.Create<Symbol?>(type), children.ToImmutableAndFree(), type) { WasCompilerGenerated = wasCompilerGenerated }; 5787return new BoundBadExpression(node, resultKind, symbols.ToImmutableAndFree(), childNodes.ToImmutableAndFree(), type); 5955return new BoundBadExpression(node, LookupResultKind.OverloadResolutionFailure, ImmutableArray<Symbol>.Empty, children, interfaceType); 6710return new BoundBadExpression(node, LookupResultKind.Ambiguous, lookupResult.Symbols.AsImmutable(), ImmutableArray.Create(boundLeft), CreateErrorType(rightName), hasErrors: true); 6747return new BoundBadExpression(node, lookupResult.Kind, symbols.AsImmutable(), ImmutableArray.Create(boundLeft), CreateErrorType(rightName), hasErrors: true); 7089return new BoundBadExpression( 7929return 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 (6)
301return new BoundBadExpression( 735yExpression = new BoundBadExpression(yExpression.Syntax, LookupResultKind.Empty, ImmutableArray<Symbol?>.Empty, ImmutableArray.Create(yExpression), CreateErrorType()); 741yExpression = new BoundBadExpression(yExpression.Syntax, LookupResultKind.Empty, ImmutableArray<Symbol?>.Empty, ImmutableArray.Create(yExpression), yExpression.Type); 802field2Value = new BoundBadExpression(field2Value.Syntax, LookupResultKind.Empty, ImmutableArray<Symbol?>.Empty, ImmutableArray.Create(field2Value), field2Value.Type, true); 974receiver = new BoundBadExpression(receiver.Syntax, LookupResultKind.NotAValue, ImmutableArray<Symbol?>.Empty, ImmutableArray.Create(receiver), CreateErrorType()); 996receiver = new BoundBadExpression(receiver.Syntax, LookupResultKind.NotAValue, ImmutableArray<Symbol?>.Empty, ImmutableArray.Create(receiver), CreateErrorType());
Binder\Binder_Symbols.cs (1)
1449receiver = new BoundBadExpression(receiver.Syntax, LookupResultKind.Ambiguous, ImmutableArray<Symbol>.Empty, ImmutableArray.Create(receiver), receiver.Type, hasErrors: true).MakeCompilerGenerated();
Binder\ForEachLoopBinder.cs (1)
668return new BoundBadExpression(
Binder\SwitchBinder.cs (1)
442return new BoundBadExpression(node, LookupResultKind.Empty, ImmutableArray<Symbol>.Empty, ImmutableArray.Create(switchGoverningExpression), switchGoverningType ?? CreateErrorType());
Generated\BoundNodes.xml.Generated.cs (1)
990var result = new BoundBadExpression(this.Syntax, resultKind, symbols, childBoundNodes, type, this.HasErrors);
Lowering\ClosureConversion\ClosureConversion.cs (1)
1703return new BoundBadExpression(F.Syntax, LookupResultKind.Empty, ImmutableArray<Symbol>.Empty, ImmutableArray.Create<BoundExpression>(node), node.Type);
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (5)
353return new BoundBadExpression(node.Syntax, default(LookupResultKind), ImmutableArray<Symbol>.Empty, ImmutableArray.Create<BoundExpression>(node), ExpressionType); 384return new BoundBadExpression(node.Syntax, 0, ImmutableArray<Symbol>.Empty, ImmutableArray.Create<BoundExpression>(node), ExpressionType); 1000return new BoundBadExpression(node.Syntax, default(LookupResultKind), ImmutableArray<Symbol>.Empty, ImmutableArray.Create<BoundExpression>(node), node.Type); 1007return new BoundBadExpression(node.Syntax, default(LookupResultKind), ImmutableArray<Symbol>.Empty, ImmutableArray.Create<BoundExpression>(node), node.Type); 1039return new BoundBadExpression(node.Syntax, default(LookupResultKind), ImmutableArray<Symbol>.Empty, ImmutableArray.Create<BoundExpression>(node), node.Type);
Lowering\LocalRewriter\LocalRewriter.cs (1)
523return new BoundBadExpression(syntax, LookupResultKind.NotReferencable, ImmutableArray<Symbol?>.Empty, children, resultType);
Lowering\LocalRewriter\LocalRewriter_Event.cs (5)
118clearCall = new BoundBadExpression(syntax, LookupResultKind.NotInvocable, ImmutableArray<Symbol?>.Empty, ImmutableArray.Create<BoundExpression>(removeDelegate), ErrorTypeSymbol.UnknownResultType); 161marshalCall = new BoundBadExpression(syntax, LookupResultKind.NotInvocable, ImmutableArray<Symbol?>.Empty, marshalArguments, ErrorTypeSymbol.UnknownResultType); 255getOrCreateCall = new BoundBadExpression(syntax, LookupResultKind.NotInvocable, ImmutableArray<Symbol?>.Empty, ImmutableArray.Create<BoundExpression>(fieldAccess), ErrorTypeSymbol.UnknownResultType); 277return new BoundBadExpression(syntax, LookupResultKind.NotInvocable, ImmutableArray<Symbol?>.Empty, ImmutableArray.Create(getOrCreateCall), ErrorTypeSymbol.UnknownResultType); 323return new BoundBadExpression(node.Syntax, LookupResultKind.NotCreatable, ImmutableArray.Create<Symbol?>(node.Event),
Lowering\LocalRewriter\LocalRewriter_FixedStatement.cs (2)
450helperCall = new BoundBadExpression(fixedInitializer.Syntax, LookupResultKind.NotInvocable, ImmutableArray<Symbol?>.Empty, ImmutableArray<BoundExpression>.Empty, ErrorTypeSymbol.UnknownResultType); 511lengthCall = new BoundBadExpression(fixedInitializer.Syntax, LookupResultKind.NotInvocable, ImmutableArray<Symbol?>.Empty, ImmutableArray.Create<BoundExpression>(factory.Local(pinnedTemp)), ErrorTypeSymbol.UnknownResultType);
Lowering\LocalRewriter\LocalRewriter_LockStatement.cs (2)
72exitCallExpr = new BoundBadExpression(lockSyntax, LookupResultKind.NotInvocable, ImmutableArray<Symbol?>.Empty, ImmutableArray.Create<BoundExpression>(boundLockTemp), ErrorTypeSymbol.UnknownResultType); 166enterCallExpr = new BoundBadExpression(lockSyntax, LookupResultKind.NotInvocable, ImmutableArray<Symbol?>.Empty, ImmutableArray.Create<BoundExpression>(boundLockTemp), ErrorTypeSymbol.UnknownResultType);
Lowering\LocalRewriter\LocalRewriter_ObjectCreationExpression.cs (3)
379newGuid = new BoundBadExpression(node.Syntax, LookupResultKind.NotCreatable, ImmutableArray<Symbol?>.Empty, ImmutableArray<BoundExpression>.Empty, ErrorTypeSymbol.UnknownResultType); 397callGetTypeFromCLSID = new BoundBadExpression(node.Syntax, LookupResultKind.OverloadResolutionFailure, ImmutableArray<Symbol?>.Empty, ImmutableArray<BoundExpression>.Empty, ErrorTypeSymbol.UnknownResultType); 409rewrittenObjectCreation = 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)
377: 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 (2)
280return new BoundBadExpression(Syntax, LookupResultKind.Empty, ImmutableArray<Symbol?>.Empty, ImmutableArray<BoundExpression>.Empty, type, hasErrors: true); 761return new BoundBadExpression(Syntax, default(LookupResultKind), ImmutableArray<Symbol?>.Empty, args.AsImmutable(), receiver);
Microsoft.CodeAnalysis.CSharp.ExpressionEvaluator.ExpressionCompiler (1)
Symbols\PlaceholderLocalSymbol.cs (1)
174return new BoundBadExpression(
70 references to BoundBadExpression
Microsoft.CodeAnalysis.CSharp (70)
Binder\Binder_Conversions.cs (3)
351BoundBadExpression); 354Debug.Assert(expr is not BoundBadExpression { ChildBoundNodes: var children } || !children.Any((child, node) => child.Syntax == node.Syntax, node)); 364expr is BoundBadExpression ? Conversion.NoConversion : conversion,
Binder\Binder_Deconstruct.cs (1)
714private BoundBadExpression MissingDeconstruct(BoundExpression receiver, SyntaxNode rightSyntax, int numParameters, BindingDiagnosticBag diagnostics,
Binder\Binder_Expressions.cs (24)
103/// Generates a new <see cref="BoundBadExpression"/> with no known type 105private BoundBadExpression BadExpression(SyntaxNode syntax) 111/// Generates a new <see cref="BoundBadExpression"/> with no known type, and the given bound child. 113private BoundBadExpression BadExpression(SyntaxNode syntax, BoundExpression childNode) 119/// Generates a new <see cref="BoundBadExpression"/> with no known type, and the given bound children. 121private BoundBadExpression BadExpression(SyntaxNode syntax, ImmutableArray<BoundExpression> childNodes) 127/// Generates a new <see cref="BoundBadExpression"/> with no known type, given lookup resultKind. 129protected BoundBadExpression BadExpression(SyntaxNode syntax, LookupResultKind lookupResultKind) 135/// Generates a new <see cref="BoundBadExpression"/> with no known type, given lookup resultKind and the given bound child. 137protected BoundBadExpression BadExpression(SyntaxNode syntax, LookupResultKind lookupResultKind, BoundExpression childNode) 143/// Generates a new <see cref="BoundBadExpression"/> with no known type, given lookupResultKind and given symbols for GetSemanticInfo API. 145private BoundBadExpression BadExpression(SyntaxNode syntax, LookupResultKind resultKind, ImmutableArray<Symbol> symbols) 155/// Generates a new <see cref="BoundBadExpression"/> with no known type, given lookupResultKind and given symbols for GetSemanticInfo API, 158private BoundBadExpression BadExpression(SyntaxNode syntax, LookupResultKind resultKind, ImmutableArray<Symbol> symbols, BoundExpression childNode) 168/// Generates a new <see cref="BoundBadExpression"/> with no known type, given lookupResultKind and given symbols for GetSemanticInfo API, 171private BoundBadExpression BadExpression(SyntaxNode syntax, LookupResultKind resultKind, ImmutableArray<Symbol> symbols, ImmutableArray<BoundExpression> childNodes, bool wasCompilerGenerated = false) 186/// Otherwise, a new <see cref="BoundBadExpression"/> wrapping <paramref name="expr"/> is returned. 189/// Returned expression need not be a <see cref="BoundBadExpression"/>, but is guaranteed to have HasErrors set to true. 206var badExpression = (BoundBadExpression)expr; 230/// did not meet the requirements, the return value will be a <see cref="BoundBadExpression"/> that 4425Debug.Assert(result is not BoundBadExpression { ChildBoundNodes: var children } || !children.Any((child, node) => child.Syntax == node, node)); 5908var 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)
1724BoundBadExpression => null,
BoundTree\BoundExpressionExtensions.cs (1)
169foreach (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)
13Debug.Assert(LengthAccess is null or BoundPropertyAccess or BoundBadExpression); 14Debug.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)
3360var expr = (BoundBadExpression)boundNode; 3393((BoundBadExpression)boundNodeForSyntacticParent).ResultKind == LookupResultKind.NotCreatable) 3985BoundBadExpression boundBadExpression = (BoundBadExpression)boundNodeForSyntacticParent; 4312symbols = ((BoundBadExpression)boundNodeForSyntacticParent).Symbols.WhereAsArray((sym, myMethodGroup) => myMethodGroup.Contains(sym), myMethodGroup); 4315resultKind = ((BoundBadExpression)boundNodeForSyntacticParent).ResultKind; 4413symbols = ((BoundBadExpression)boundNodeForSyntacticParent).Symbols.WhereAsArray((sym, myPropertyGroup) => myPropertyGroup.Contains(sym), myPropertyGroup); 4416resultKind = ((BoundBadExpression)boundNodeForSyntacticParent).ResultKind;
FlowAnalysis\AbstractFlowPass.cs (1)
1478public override BoundNode VisitBadExpression(BoundBadExpression node)
FlowAnalysis\DefiniteAssignment.cs (2)
1551var bad = (BoundBadExpression)node;
FlowAnalysis\NullableWalker.cs (1)
10260public override BoundNode? VisitBadExpression(BoundBadExpression node)
FlowAnalysis\NullableWalker.DebugVerifier.cs (1)
102public override BoundNode? VisitBadExpression(BoundBadExpression node)
Generated\BoundNodes.xml.Generated.cs (10)
986public BoundBadExpression Update(LookupResultKind resultKind, ImmutableArray<Symbol?> symbols, ImmutableArray<BoundExpression> childBoundNodes, TypeSymbol? type) 990var result = new BoundBadExpression(this.Syntax, resultKind, symbols, childBoundNodes, type, this.HasErrors); 8553return VisitBadExpression((BoundBadExpression)node, arg); 8989public virtual R VisitBadExpression(BoundBadExpression node, A arg) => this.DefaultVisit(node, arg); 9217public virtual BoundNode? VisitBadExpression(BoundBadExpression node) => this.DefaultVisit(node); 9469public override BoundNode? VisitBadExpression(BoundBadExpression node) 10517public override BoundNode? VisitBadExpression(BoundBadExpression node) 12013public override BoundNode? VisitBadExpression(BoundBadExpression node) 12017BoundBadExpression updatedNode; 14570public override TreeDumperNode VisitBadExpression(BoundBadExpression node, object? arg) => new TreeDumperNode("badExpression", null, new TreeDumperNode[]
Lowering\AsyncRewriter\AsyncMethodToStateMachineRewriter.cs (1)
336public sealed override BoundNode VisitBadExpression(BoundBadExpression node)
Lowering\LocalRewriter\LocalRewriter.cs (1)
498public 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)
898public override BoundNode VisitBadExpression(BoundBadExpression node)
Lowering\SyntheticBoundNodeFactory.cs (1)
278public BoundBadExpression BadExpression(TypeSymbol type)
Operations\CSharpOperationFactory.cs (3)
118return CreateBoundBadExpressionOperation((BoundBadExpression)boundNode); 1334private IInvalidOperation CreateBoundBadExpressionOperation(BoundBadExpression boundBadExpression) 2204case BoundBadExpression bad: