18 instantiations of BoundTypeExpression
Microsoft.CodeAnalysis.CSharp (18)
Binder\Binder_Expressions.cs (1)
8297result = new BoundTypeExpression(
Binder\Binder_InterpolatedString.cs (1)
344new BoundTypeExpression(syntax, null, factoryType) { WasCompilerGenerated = true },
Binder\Binder_Invocation.cs (1)
434receiverOpt: new BoundTypeExpression(node, null, this.ContainingType).MakeCompilerGenerated(),
Generated\BoundNodes.xml.Generated.cs (1)
1093var result = new BoundTypeExpression(this.Syntax, aliasOpt, boundContainingTypeOpt, boundDimensionsOpt, typeWithAnnotations, type, this.HasErrors);
Lowering\ClosureConversion\ClosureConversion.cs (1)
1061receiver = new BoundTypeExpression(syntax, null, synthesizedMethod.ContainingType);
Lowering\LocalRewriter\LocalRewriter_BinaryOperator.cs (3)
87var falseOperatorCall = BoundCall.Synthesized(syntax, receiverOpt: node.ConstrainedToTypeOpt is null ? null : new BoundTypeExpression(syntax, aliasOpt: null, node.ConstrainedToTypeOpt), 761receiverOpt: constrainedToTypeOpt is null ? null : new BoundTypeExpression(syntax, aliasOpt: null, constrainedToTypeOpt), 788receiverOpt: constrainedToTypeOpt is null ? null : new BoundTypeExpression(syntax, aliasOpt: null, constrainedToTypeOpt),
Lowering\LocalRewriter\LocalRewriter_Call.cs (2)
52loweredReceiver = new BoundTypeExpression(node.Syntax, null, firstContainer); 58loweredReceiver = new BoundTypeExpression(node.Syntax, null, _factory.CurrentType);
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (3)
1226receiverOpt: constrainedToTypeOpt is null ? null : new BoundTypeExpression(syntax, aliasOpt: null, constrainedToTypeOpt), 1371receiverOpt: constrainedToTypeOpt is null ? null : new BoundTypeExpression(syntax, aliasOpt: null, constrainedToTypeOpt), 1448receiverOpt: constrainedToTypeOpt is null ? null : new BoundTypeExpression(syntax, aliasOpt: null, constrainedToTypeOpt),
Lowering\LocalRewriter\LocalRewriter_ForEachStatement.cs (1)
429BoundTypeExpression boundIDisposableTypeExpr = new BoundTypeExpression(forEachSyntax,
Lowering\LocalRewriter\LocalRewriter_UnaryOperator.cs (3)
118receiverOpt: constrainedToTypeOpt is null ? null : new BoundTypeExpression(syntax, aliasOpt: null, constrainedToTypeOpt), 653receiverOpt: node.ConstrainedToTypeOpt is null ? null : new BoundTypeExpression(syntax, aliasOpt: null, node.ConstrainedToTypeOpt), 683receiverOpt: node.ConstrainedToTypeOpt is null ? null : new BoundTypeExpression(syntax, aliasOpt: null, node.ConstrainedToTypeOpt),
Lowering\SyntheticBoundNodeFactory.cs (1)
1240return new BoundTypeExpression(Syntax, null, type) { WasCompilerGenerated = true };
152 references to BoundTypeExpression
Microsoft.CodeAnalysis.CSharp (152)
Binder\Binder.ValueChecks.cs (2)
740var type = (BoundTypeExpression)expr;
Binder\Binder_Expressions.cs (8)
1392BoundTypeExpression boundType = new BoundTypeExpression(typeSyntax, alias, typeWithAnnotations, type.IsErrorType()); 1431BoundTypeExpression boundType = new BoundTypeExpression(typeSyntax, alias, typeWithAnnotations, typeHasErrors); 1533var typeExpression = new BoundTypeExpression(node.Type, aliasOpt: alias, typeWithAnnotations); 8239qualifierOpt: left is BoundTypeExpression typeExpr ? typeExpr.Type : null); 8300boundContainingTypeOpt: left as BoundTypeExpression, 8704if (receiverOpt is not BoundTypeExpression { Type: { TypeKind: TypeKind.TypeParameter } }) 10487case BoundTypeExpression: 10632case BoundTypeExpression:
Binder\Binder_Operators.cs (4)
3190private bool IsOperatorErrors(CSharpSyntaxNode node, TypeSymbol operandType, BoundTypeExpression typeExpression, BindingDiagnosticBag diagnostics) 3225if (!tryBindAsType(node.Right, diagnostics, out BindingDiagnosticBag isTypeDiagnostics, out BoundTypeExpression typeExpression) && 3337out BoundTypeExpression boundType) 3694var typeExpression = new BoundTypeExpression(node.Right, alias, targetTypeWithAnnotations);
Binder\Binder_Patterns.cs (10)
447var boundType = (BoundTypeExpression)convertedExpression; 495/// and in that case it returns a <see cref="BoundTypeExpression"/>. 844BoundTypeExpression boundDeclType = BindTypeForPattern(typeSyntax, inputType, diagnostics, ref hasErrors); 851private BoundTypeExpression BindTypeForPattern( 860BoundTypeExpression boundDeclType = new BoundTypeExpression(typeSyntax, aliasOpt, typeWithAnnotations: declType); 931out BoundTypeExpression? boundDeclType) 973TypeWithAnnotations declTypeWithAnnotations = BindRecursivePatternType(typeSyntax, inputType, diagnostics, ref hasErrors, out BoundTypeExpression? boundDeclType); 1362var boundOperandType = new BoundTypeExpression(syntax: node, aliasOpt: null, typeWithAnnotations: declType); // fake a type expression for the variable's type 1618var patternType = BindTypeForPattern(node.Type, inputType, diagnostics, ref hasErrors);
Binder\Binder_Statements.cs (1)
1130BoundTypeExpression boundDeclType = null;
Binder\ForEachLoopBinder.cs (1)
266BoundTypeExpression boundIterationVariableType;
Binder\RefSafetyAnalysis.cs (1)
570static uint getDeclarationValEscape(BoundTypeExpression typeExpression, uint valEscape)
Binder\SwitchBinder.cs (1)
213if (boundLabelExpression is BoundTypeExpression type)
BoundTree\BoundNode_Source.cs (1)
185case BoundTypeExpression type:
BoundTree\BoundTreeVisitors.cs (1)
34return VisitTypeExpression(node as BoundTypeExpression, arg);
BoundTree\Constructors.cs (2)
543public BoundTypeExpression(SyntaxNode syntax, AliasSymbol? aliasOpt, BoundTypeExpression? boundContainingTypeOpt, ImmutableArray<BoundExpression> boundDimensionsOpt, TypeWithAnnotations typeWithAnnotations, bool hasErrors = false) 549public BoundTypeExpression(SyntaxNode syntax, AliasSymbol? aliasOpt, BoundTypeExpression? boundContainingTypeOpt, TypeWithAnnotations typeWithAnnotations, bool hasErrors = false)
CodeGen\EmitConversion.cs (1)
331if (receiver is not BoundTypeExpression { Type: { TypeKind: TypeKind.TypeParameter } })
CodeGen\EmitExpression.cs (1)
1668if (receiver is not BoundTypeExpression { Type: { TypeKind: TypeKind.TypeParameter } })
CodeGen\Optimizer.cs (2)
1172if ((method.IsAbstract || method.IsVirtual) && receiver is BoundTypeExpression { Type: { TypeKind: TypeKind.TypeParameter } } typeExpression) 2263if (receiverOpt is BoundTypeExpression { AliasOpt: null, BoundContainingTypeOpt: null, BoundDimensionsOpt: { IsEmpty: true }, Type: { TypeKind: TypeKind.TypeParameter } } typeExpression)
Compilation\CSharpSemanticModel.cs (2)
3393var boundType = (BoundTypeExpression)boundNode;
Compilation\MemberSemanticModel.NodeMapBuilder.cs (2)
96TypeSymbol.Equals(((BoundTypeExpression)existing[i]).Type, ((BoundTypeOrValueExpression)nodesToAdd[i]).Type, TypeCompareKind.ConsiderEverything2), 104TypeSymbol.Equals(((BoundTypeOrValueExpression)existing[i]).Type, ((BoundTypeExpression)nodesToAdd[i]).Type, TypeCompareKind.ConsiderEverything2),
FlowAnalysis\AbstractFlowPass.cs (1)
1642public override BoundNode VisitTypeExpression(BoundTypeExpression node)
FlowAnalysis\NullableWalker.cs (3)
346|| expression is BoundTypeExpression); 11203public override BoundNode? VisitTypeExpression(BoundTypeExpression node) 11509var typeExpr = node.TargetType;
FlowAnalysis\NullableWalker.DebugVerifier.cs (1)
343public override BoundNode? VisitTypeExpression(BoundTypeExpression node)
Generated\BoundNodes.xml.Generated.cs (85)
1068public BoundTypeExpression(SyntaxNode syntax, AliasSymbol? aliasOpt, BoundTypeExpression? boundContainingTypeOpt, ImmutableArray<BoundExpression> boundDimensionsOpt, TypeWithAnnotations typeWithAnnotations, TypeSymbol type, bool hasErrors = false) 1081public BoundTypeExpression? BoundContainingTypeOpt { get; } 1089public BoundTypeExpression Update(AliasSymbol? aliasOpt, BoundTypeExpression? boundContainingTypeOpt, ImmutableArray<BoundExpression> boundDimensionsOpt, TypeWithAnnotations typeWithAnnotations, TypeSymbol type) 1093var result = new BoundTypeExpression(this.Syntax, aliasOpt, boundContainingTypeOpt, boundDimensionsOpt, typeWithAnnotations, type, this.HasErrors); 2232public BoundTypeOfOperator(SyntaxNode syntax, BoundTypeExpression sourceType, MethodSymbol? getTypeFromHandle, TypeSymbol type, bool hasErrors = false) 2242public BoundTypeExpression SourceType { get; } 2247public BoundTypeOfOperator Update(BoundTypeExpression sourceType, MethodSymbol? getTypeFromHandle, TypeSymbol type) 2816public BoundDefaultExpression(SyntaxNode syntax, BoundTypeExpression? targetType, ConstantValue? constantValueOpt, TypeSymbol type, bool hasErrors = false) 2827public BoundTypeExpression? TargetType { get; } 2833public BoundDefaultExpression Update(BoundTypeExpression? targetType, ConstantValue? constantValueOpt, TypeSymbol type) 2847public BoundIsOperator(SyntaxNode syntax, BoundExpression operand, BoundTypeExpression targetType, ConversionKind conversionKind, TypeSymbol type, bool hasErrors = false) 2862public BoundTypeExpression TargetType { get; } 2868public BoundIsOperator Update(BoundExpression operand, BoundTypeExpression targetType, ConversionKind conversionKind, TypeSymbol type) 2882public BoundAsOperator(SyntaxNode syntax, BoundExpression operand, BoundTypeExpression targetType, BoundValuePlaceholder? operandPlaceholder, BoundExpression? operandConversion, TypeSymbol type, bool hasErrors = false) 2898public BoundTypeExpression TargetType { get; } 2905public BoundAsOperator Update(BoundExpression operand, BoundTypeExpression targetType, BoundValuePlaceholder? operandPlaceholder, BoundExpression? operandConversion, TypeSymbol type) 2919public BoundSizeOfOperator(SyntaxNode syntax, BoundTypeExpression sourceType, ConstantValue? constantValueOpt, TypeSymbol type, bool hasErrors = false) 2931public BoundTypeExpression SourceType { get; } 2937public BoundSizeOfOperator Update(BoundTypeExpression sourceType, ConstantValue? constantValueOpt, TypeSymbol type) 3400public BoundLocalDeclaration(SyntaxNode syntax, LocalSymbol localSymbol, BoundTypeExpression? declaredTypeOpt, BoundExpression? initializerOpt, ImmutableArray<BoundExpression> argumentsOpt, bool inferredType, bool hasErrors = false) 3414public BoundTypeExpression? DeclaredTypeOpt { get; } 3422public BoundLocalDeclaration Update(LocalSymbol localSymbol, BoundTypeExpression? declaredTypeOpt, BoundExpression? initializerOpt, ImmutableArray<BoundExpression> argumentsOpt, bool inferredType) 4036public BoundForEachStatement(SyntaxNode syntax, ForEachEnumeratorInfo? enumeratorInfoOpt, BoundValuePlaceholder? elementPlaceholder, BoundExpression? elementConversion, BoundTypeExpression iterationVariableType, ImmutableArray<LocalSymbol> iterationVariables, BoundExpression? iterationErrorExpressionOpt, BoundExpression expression, BoundForEachDeconstructStep? deconstructionOpt, BoundAwaitableInfo? awaitOpt, BoundStatement body, GeneratedLabelSymbol breakLabel, GeneratedLabelSymbol continueLabel, bool hasErrors = false) 4062public BoundTypeExpression IterationVariableType { get; } 4073public BoundForEachStatement Update(ForEachEnumeratorInfo? enumeratorInfoOpt, BoundValuePlaceholder? elementPlaceholder, BoundExpression? elementConversion, BoundTypeExpression iterationVariableType, ImmutableArray<LocalSymbol> iterationVariables, BoundExpression? iterationErrorExpressionOpt, BoundExpression expression, BoundForEachDeconstructStep? deconstructionOpt, BoundAwaitableInfo? awaitOpt, BoundStatement body, GeneratedLabelSymbol breakLabel, GeneratedLabelSymbol continueLabel) 8103public BoundDeclarationPattern(SyntaxNode syntax, BoundTypeExpression declaredType, bool isVar, Symbol? variable, BoundExpression? variableAccess, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors = false) 8115public BoundTypeExpression DeclaredType { get; } 8121public BoundDeclarationPattern Update(BoundTypeExpression declaredType, bool isVar, Symbol? variable, BoundExpression? variableAccess, TypeSymbol inputType, TypeSymbol narrowedType) 8135public BoundRecursivePattern(SyntaxNode syntax, BoundTypeExpression? declaredType, MethodSymbol? deconstructMethod, ImmutableArray<BoundPositionalSubpattern> deconstruction, ImmutableArray<BoundPropertySubpattern> properties, bool isExplicitNotNullTest, Symbol? variable, BoundExpression? variableAccess, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors = false) 8149public BoundTypeExpression? DeclaredType { get; } 8158public BoundRecursivePattern Update(BoundTypeExpression? declaredType, MethodSymbol? deconstructMethod, ImmutableArray<BoundPositionalSubpattern> deconstruction, ImmutableArray<BoundPropertySubpattern> properties, bool isExplicitNotNullTest, Symbol? variable, BoundExpression? variableAccess, TypeSymbol inputType, TypeSymbol narrowedType) 8395public BoundTypePattern(SyntaxNode syntax, BoundTypeExpression declaredType, bool isExplicitNotNullTest, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors = false) 8407public BoundTypeExpression DeclaredType { get; } 8413public BoundTypePattern Update(BoundTypeExpression declaredType, bool isExplicitNotNullTest, TypeSymbol inputType, TypeSymbol narrowedType) 8877return VisitTypeExpression((BoundTypeExpression)node, arg); 9326public virtual R VisitTypeExpression(BoundTypeExpression node, A arg) => this.DefaultVisit(node, arg); 9562public virtual BoundNode? VisitTypeExpression(BoundTypeExpression node) => this.DefaultVisit(node); 9834public override BoundNode? VisitTypeExpression(BoundTypeExpression node) 10912public override BoundNode? VisitTypeExpression(BoundTypeExpression node) 10914BoundTypeExpression? boundContainingTypeOpt = (BoundTypeExpression?)this.Visit(node.BoundContainingTypeOpt); 11130BoundTypeExpression sourceType = (BoundTypeExpression)this.Visit(node.SourceType); 11212BoundTypeExpression? targetType = node.TargetType; 11219BoundTypeExpression targetType = (BoundTypeExpression)this.Visit(node.TargetType); 11226BoundTypeExpression targetType = (BoundTypeExpression)this.Visit(node.TargetType); 11234BoundTypeExpression sourceType = (BoundTypeExpression)this.Visit(node.SourceType); 11301BoundTypeExpression? declaredTypeOpt = (BoundTypeExpression?)this.Visit(node.DeclaredTypeOpt); 11391BoundTypeExpression iterationVariableType = (BoundTypeExpression)this.Visit(node.IterationVariableType); 12068BoundTypeExpression declaredType = (BoundTypeExpression)this.Visit(node.DeclaredType); 12076BoundTypeExpression? declaredType = (BoundTypeExpression?)this.Visit(node.DeclaredType); 12132BoundTypeExpression declaredType = (BoundTypeExpression)this.Visit(node.DeclaredType); 12465public override BoundNode? VisitTypeExpression(BoundTypeExpression node) 12467BoundTypeExpression? boundContainingTypeOpt = (BoundTypeExpression?)this.Visit(node.BoundContainingTypeOpt); 12469BoundTypeExpression updatedNode; 12981BoundTypeExpression sourceType = (BoundTypeExpression)this.Visit(node.SourceType); 13195BoundTypeExpression? targetType = node.TargetType; 13213BoundTypeExpression targetType = (BoundTypeExpression)this.Visit(node.TargetType); 13231BoundTypeExpression targetType = (BoundTypeExpression)this.Visit(node.TargetType); 13250BoundTypeExpression sourceType = (BoundTypeExpression)this.Visit(node.SourceType); 13377BoundTypeExpression? declaredTypeOpt = (BoundTypeExpression?)this.Visit(node.DeclaredTypeOpt); 13434BoundTypeExpression iterationVariableType = (BoundTypeExpression)this.Visit(node.IterationVariableType); 14730BoundTypeExpression declaredType = (BoundTypeExpression)this.Visit(node.DeclaredType); 14741BoundTypeExpression? declaredType = (BoundTypeExpression?)this.Visit(node.DeclaredType); 14801BoundTypeExpression declaredType = (BoundTypeExpression)this.Visit(node.DeclaredType); 15129public override TreeDumperNode VisitTypeExpression(BoundTypeExpression node, object? arg) => new TreeDumperNode("typeExpression", null, new TreeDumperNode[]
Lowering\LocalRewriter\DelegateCacheContainer.cs (1)
62var constrainedToTypeOpt = ((targetMethod.IsAbstract || targetMethod.IsVirtual) && boundDelegateCreation.Argument is BoundTypeExpression typeExpression) ? typeExpression.Type : null;
Lowering\LocalRewriter\DelegateCacheRewriter.cs (1)
166if ((targetMethod.IsAbstract || targetMethod.IsVirtual) && boundDelegateCreation.Argument is BoundTypeExpression typeExpression)
Lowering\LocalRewriter\LocalRewriter.cs (2)
652var sourceType = (BoundTypeExpression?)this.Visit(node.SourceType);
Lowering\LocalRewriter\LocalRewriter_AsOperator.cs (4)
19var rewrittenTargetType = (BoundTypeExpression)VisitTypeExpression(node.TargetType); 25public override BoundNode VisitTypeExpression(BoundTypeExpression node) 36BoundTypeExpression rewrittenTargetType,
Lowering\LocalRewriter\LocalRewriter_Call.cs (2)
202Debug.Assert(receiverOpt is not BoundTypeExpression || method.IsStatic); 203var needToReduce = receiverOpt is not (null or BoundTypeExpression) && interceptor.IsExtensionMethod;
Lowering\LocalRewriter\LocalRewriter_ForEachStatement.cs (1)
429BoundTypeExpression boundIDisposableTypeExpr = new BoundTypeExpression(forEachSyntax,
Lowering\LocalRewriter\LocalRewriter_IsOperator.cs (3)
19var rewrittenTargetType = (BoundTypeExpression)VisitTypeExpression(node.TargetType); 29BoundTypeExpression rewrittenTargetType,
Lowering\LocalRewriter\LoweredDynamicOperationFactory.cs (1)
227loweredReceiver = _factory.Typeof(((BoundTypeExpression)loweredReceiver).Type, _factory.WellKnownType(WellKnownType.System_Type));
Lowering\SpillSequenceSpiller.cs (1)
1022if (builder == null || node.ReceiverOpt is BoundTypeExpression)
Lowering\SyntheticBoundNodeFactory.cs (1)
1238public BoundTypeExpression Type(TypeSymbol type)
Operations\CSharpOperationFactory.cs (3)
464receiverOpt is BoundTypeExpression { Type: TypeParameterSymbol typeParameter }) 526BoundTypeExpression? declaredTypeOpt = ((BoundLocalDeclaration)declaration).DeclaredTypeOpt; 537BoundTypeExpression? declaredTypeOpt = declarations[0].DeclaredTypeOpt;
Symbols\TypeWithAnnotations.cs (2)
779/// Used by the generated <see cref="BoundTypeExpression.Update"/>. 787/// Used by the generated <see cref="BoundTypeExpression.Update"/>.