18 instantiations of BoundTypeExpression
Microsoft.CodeAnalysis.CSharp (18)
Binder\Binder_Expressions.cs (1)
8298result = 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)
1094var 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)
51loweredReceiver = new BoundTypeExpression(node.Syntax, null, firstContainer); 57loweredReceiver = 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)
717var 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); 1536var typeExpression = new BoundTypeExpression(node.Type, aliasOpt: alias, typeWithAnnotations); 8240qualifierOpt: left is BoundTypeExpression typeExpr ? typeExpr.Type : null); 8301boundContainingTypeOpt: left as BoundTypeExpression, 8705if (receiverOpt is not BoundTypeExpression { Type: { TypeKind: TypeKind.TypeParameter } }) 10488case BoundTypeExpression: 10633case BoundTypeExpression:
Binder\Binder_Operators.cs (4)
3195private bool IsOperatorErrors(CSharpSyntaxNode node, TypeSymbol operandType, BoundTypeExpression typeExpression, BindingDiagnosticBag diagnostics) 3230if (!tryBindAsType(node.Right, diagnostics, out BindingDiagnosticBag isTypeDiagnostics, out BoundTypeExpression typeExpression) && 3342out BoundTypeExpression boundType) 3699var 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 SafeContext getDeclarationValEscape(BoundTypeExpression typeExpression, SafeContext 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); 11261public override BoundNode? VisitTypeExpression(BoundTypeExpression node) 11567var typeExpr = node.TargetType;
FlowAnalysis\NullableWalker.DebugVerifier.cs (1)
343public override BoundNode? VisitTypeExpression(BoundTypeExpression node)
Generated\BoundNodes.xml.Generated.cs (85)
1069public BoundTypeExpression(SyntaxNode syntax, AliasSymbol? aliasOpt, BoundTypeExpression? boundContainingTypeOpt, ImmutableArray<BoundExpression> boundDimensionsOpt, TypeWithAnnotations typeWithAnnotations, TypeSymbol type, bool hasErrors = false) 1082public BoundTypeExpression? BoundContainingTypeOpt { get; } 1090public BoundTypeExpression Update(AliasSymbol? aliasOpt, BoundTypeExpression? boundContainingTypeOpt, ImmutableArray<BoundExpression> boundDimensionsOpt, TypeWithAnnotations typeWithAnnotations, TypeSymbol type) 1094var result = new BoundTypeExpression(this.Syntax, aliasOpt, boundContainingTypeOpt, boundDimensionsOpt, typeWithAnnotations, type, this.HasErrors); 2233public BoundTypeOfOperator(SyntaxNode syntax, BoundTypeExpression sourceType, MethodSymbol? getTypeFromHandle, TypeSymbol type, bool hasErrors = false) 2243public BoundTypeExpression SourceType { get; } 2248public BoundTypeOfOperator Update(BoundTypeExpression sourceType, MethodSymbol? getTypeFromHandle, TypeSymbol type) 2817public BoundDefaultExpression(SyntaxNode syntax, BoundTypeExpression? targetType, ConstantValue? constantValueOpt, TypeSymbol type, bool hasErrors = false) 2828public BoundTypeExpression? TargetType { get; } 2834public BoundDefaultExpression Update(BoundTypeExpression? targetType, ConstantValue? constantValueOpt, TypeSymbol type) 2848public BoundIsOperator(SyntaxNode syntax, BoundExpression operand, BoundTypeExpression targetType, ConversionKind conversionKind, TypeSymbol type, bool hasErrors = false) 2863public BoundTypeExpression TargetType { get; } 2869public BoundIsOperator Update(BoundExpression operand, BoundTypeExpression targetType, ConversionKind conversionKind, TypeSymbol type) 2883public BoundAsOperator(SyntaxNode syntax, BoundExpression operand, BoundTypeExpression targetType, BoundValuePlaceholder? operandPlaceholder, BoundExpression? operandConversion, TypeSymbol type, bool hasErrors = false) 2899public BoundTypeExpression TargetType { get; } 2906public BoundAsOperator Update(BoundExpression operand, BoundTypeExpression targetType, BoundValuePlaceholder? operandPlaceholder, BoundExpression? operandConversion, TypeSymbol type) 2920public BoundSizeOfOperator(SyntaxNode syntax, BoundTypeExpression sourceType, ConstantValue? constantValueOpt, TypeSymbol type, bool hasErrors = false) 2932public BoundTypeExpression SourceType { get; } 2938public BoundSizeOfOperator Update(BoundTypeExpression sourceType, ConstantValue? constantValueOpt, TypeSymbol type) 3401public BoundLocalDeclaration(SyntaxNode syntax, LocalSymbol localSymbol, BoundTypeExpression? declaredTypeOpt, BoundExpression? initializerOpt, ImmutableArray<BoundExpression> argumentsOpt, bool inferredType, bool hasErrors = false) 3415public BoundTypeExpression? DeclaredTypeOpt { get; } 3423public BoundLocalDeclaration Update(LocalSymbol localSymbol, BoundTypeExpression? declaredTypeOpt, BoundExpression? initializerOpt, ImmutableArray<BoundExpression> argumentsOpt, bool inferredType) 4037public 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) 4063public BoundTypeExpression IterationVariableType { get; } 4074public 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) 8112public BoundDeclarationPattern(SyntaxNode syntax, BoundTypeExpression declaredType, bool isVar, Symbol? variable, BoundExpression? variableAccess, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors = false) 8128public BoundTypeExpression DeclaredType { get; } 8134public BoundDeclarationPattern Update(BoundTypeExpression declaredType, bool isVar, Symbol? variable, BoundExpression? variableAccess, TypeSymbol inputType, TypeSymbol narrowedType) 8148public 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) 8166public BoundTypeExpression? DeclaredType { get; } 8175public BoundRecursivePattern Update(BoundTypeExpression? declaredType, MethodSymbol? deconstructMethod, ImmutableArray<BoundPositionalSubpattern> deconstruction, ImmutableArray<BoundPropertySubpattern> properties, bool isExplicitNotNullTest, Symbol? variable, BoundExpression? variableAccess, TypeSymbol inputType, TypeSymbol narrowedType) 8416public BoundTypePattern(SyntaxNode syntax, BoundTypeExpression declaredType, bool isExplicitNotNullTest, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors = false) 8432public BoundTypeExpression DeclaredType { get; } 8438public BoundTypePattern Update(BoundTypeExpression declaredType, bool isExplicitNotNullTest, TypeSymbol inputType, TypeSymbol narrowedType) 8914return VisitTypeExpression((BoundTypeExpression)node, arg); 9363public virtual R VisitTypeExpression(BoundTypeExpression node, A arg) => this.DefaultVisit(node, arg); 9599public virtual BoundNode? VisitTypeExpression(BoundTypeExpression node) => this.DefaultVisit(node); 9871public override BoundNode? VisitTypeExpression(BoundTypeExpression node) 10949public override BoundNode? VisitTypeExpression(BoundTypeExpression node) 10951BoundTypeExpression? boundContainingTypeOpt = (BoundTypeExpression?)this.Visit(node.BoundContainingTypeOpt); 11167BoundTypeExpression sourceType = (BoundTypeExpression)this.Visit(node.SourceType); 11249BoundTypeExpression? targetType = node.TargetType; 11256BoundTypeExpression targetType = (BoundTypeExpression)this.Visit(node.TargetType); 11263BoundTypeExpression targetType = (BoundTypeExpression)this.Visit(node.TargetType); 11271BoundTypeExpression sourceType = (BoundTypeExpression)this.Visit(node.SourceType); 11338BoundTypeExpression? declaredTypeOpt = (BoundTypeExpression?)this.Visit(node.DeclaredTypeOpt); 11428BoundTypeExpression iterationVariableType = (BoundTypeExpression)this.Visit(node.IterationVariableType); 12105BoundTypeExpression declaredType = (BoundTypeExpression)this.Visit(node.DeclaredType); 12113BoundTypeExpression? declaredType = (BoundTypeExpression?)this.Visit(node.DeclaredType); 12169BoundTypeExpression declaredType = (BoundTypeExpression)this.Visit(node.DeclaredType); 12502public override BoundNode? VisitTypeExpression(BoundTypeExpression node) 12504BoundTypeExpression? boundContainingTypeOpt = (BoundTypeExpression?)this.Visit(node.BoundContainingTypeOpt); 12506BoundTypeExpression updatedNode; 13018BoundTypeExpression sourceType = (BoundTypeExpression)this.Visit(node.SourceType); 13232BoundTypeExpression? targetType = node.TargetType; 13250BoundTypeExpression targetType = (BoundTypeExpression)this.Visit(node.TargetType); 13268BoundTypeExpression targetType = (BoundTypeExpression)this.Visit(node.TargetType); 13287BoundTypeExpression sourceType = (BoundTypeExpression)this.Visit(node.SourceType); 13414BoundTypeExpression? declaredTypeOpt = (BoundTypeExpression?)this.Visit(node.DeclaredTypeOpt); 13471BoundTypeExpression iterationVariableType = (BoundTypeExpression)this.Visit(node.IterationVariableType); 14767BoundTypeExpression declaredType = (BoundTypeExpression)this.Visit(node.DeclaredType); 14778BoundTypeExpression? declaredType = (BoundTypeExpression?)this.Visit(node.DeclaredType); 14838BoundTypeExpression declaredType = (BoundTypeExpression)this.Visit(node.DeclaredType); 15166public 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)
201Debug.Assert(receiverOpt is not BoundTypeExpression || method.IsStatic); 202var 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"/>.