Binder\Binder_Expressions.cs (11)
1434BoundTypeExpression boundType = new BoundTypeExpression(typeSyntax, alias, typeWithAnnotations, type.IsErrorType());
1473BoundTypeExpression boundType = new BoundTypeExpression(typeSyntax, alias, typeWithAnnotations, typeHasErrors);
1635var typeExpression = new BoundTypeExpression(node.Type, aliasOpt: alias, typeWithAnnotations);
8142Debug.Assert(boundLeft is BoundTypeExpression);
8296if (receiver is not BoundTypeExpression)
8660qualifierOpt: left is BoundTypeExpression typeExpr ? typeExpr.Type : null);
8723boundContainingTypeOpt: left as BoundTypeExpression,
10020if (receiverOpt is not BoundTypeExpression { Type: { TypeKind: TypeKind.TypeParameter } })
11831case BoundTypeExpression:
11991BoundTypeExpression => !memberCountsAsStatic,
12026case BoundTypeExpression:
Binder\Binder_Patterns.cs (9)
560var result = BindTypePattern(node, innerExpression, ref unionType, inputType, (BoundTypeExpression)originalExpression, hasErrors, diagnostics, out hasUnionMatching);
1033(BoundTypeExpression boundDeclType, hasUnionMatching) = BindTypeForPattern(node, typeSyntax, unionType, inputType, ref hasErrors, diagnostics);
1043private (BoundTypeExpression, bool) BindTypeForPattern(
1053BoundTypeExpression boundDeclType = new BoundTypeExpression(typeSyntax, aliasOpt, typeWithAnnotations: declType);
1159BoundTypeExpression? boundDeclType;
1585var boundOperandType = new BoundTypeExpression(syntax: node, aliasOpt: null, typeWithAnnotations: declType); // fake a type expression for the variable's type
1906BoundTypeExpression patternType = new BoundTypeExpression(node.Type, aliasOpt, typeWithAnnotations: declType);
1915BoundTypeExpression patternType,
1936BoundTypeExpression patternType,
Generated\BoundNodes.xml.Generated.cs (85)
1079public BoundTypeExpression(SyntaxNode syntax, AliasSymbol? aliasOpt, BoundTypeExpression? boundContainingTypeOpt, ImmutableArray<BoundExpression> boundDimensionsOpt, TypeWithAnnotations typeWithAnnotations, TypeSymbol type, bool hasErrors = false)
1092public BoundTypeExpression? BoundContainingTypeOpt { get; }
1100public BoundTypeExpression Update(AliasSymbol? aliasOpt, BoundTypeExpression? boundContainingTypeOpt, ImmutableArray<BoundExpression> boundDimensionsOpt, TypeWithAnnotations typeWithAnnotations, TypeSymbol type)
1104var result = new BoundTypeExpression(this.Syntax, aliasOpt, boundContainingTypeOpt, boundDimensionsOpt, typeWithAnnotations, type, this.HasErrors);
2275public BoundTypeOfOperator(SyntaxNode syntax, BoundTypeExpression sourceType, MethodSymbol? getTypeFromHandle, TypeSymbol type, bool hasErrors = false)
2285public BoundTypeExpression SourceType { get; }
2290public BoundTypeOfOperator Update(BoundTypeExpression sourceType, MethodSymbol? getTypeFromHandle, TypeSymbol type)
2863public BoundDefaultExpression(SyntaxNode syntax, BoundTypeExpression? targetType, ConstantValue? constantValueOpt, TypeSymbol type, bool hasErrors = false)
2874public BoundTypeExpression? TargetType { get; }
2880public BoundDefaultExpression Update(BoundTypeExpression? targetType, ConstantValue? constantValueOpt, TypeSymbol type)
2894public BoundIsOperator(SyntaxNode syntax, BoundExpression operand, BoundTypeExpression targetType, ConversionKind conversionKind, TypeSymbol type, bool hasErrors = false)
2909public BoundTypeExpression TargetType { get; }
2915public BoundIsOperator Update(BoundExpression operand, BoundTypeExpression targetType, ConversionKind conversionKind, TypeSymbol type)
2929public BoundAsOperator(SyntaxNode syntax, BoundExpression operand, BoundTypeExpression targetType, BoundValuePlaceholder? operandPlaceholder, BoundExpression? operandConversion, TypeSymbol type, bool hasErrors = false)
2945public BoundTypeExpression TargetType { get; }
2952public BoundAsOperator Update(BoundExpression operand, BoundTypeExpression targetType, BoundValuePlaceholder? operandPlaceholder, BoundExpression? operandConversion, TypeSymbol type)
2966public BoundSizeOfOperator(SyntaxNode syntax, BoundTypeExpression sourceType, ConstantValue? constantValueOpt, TypeSymbol type, bool hasErrors = false)
2978public BoundTypeExpression SourceType { get; }
2984public BoundSizeOfOperator Update(BoundTypeExpression sourceType, ConstantValue? constantValueOpt, TypeSymbol type)
3451public BoundLocalDeclaration(SyntaxNode syntax, LocalSymbol localSymbol, BoundTypeExpression? declaredTypeOpt, BoundExpression? initializerOpt, ImmutableArray<BoundExpression> argumentsOpt, bool inferredType, bool hasErrors = false)
3465public BoundTypeExpression? DeclaredTypeOpt { get; }
3473public BoundLocalDeclaration Update(LocalSymbol localSymbol, BoundTypeExpression? declaredTypeOpt, BoundExpression? initializerOpt, ImmutableArray<BoundExpression> argumentsOpt, bool inferredType)
4077public BoundForEachStatement(SyntaxNode syntax, ForEachEnumeratorInfo? enumeratorInfoOpt, BoundValuePlaceholder? elementPlaceholder, BoundExpression? elementConversion, BoundTypeExpression iterationVariableType, ImmutableArray<LocalSymbol> iterationVariables, BoundExpression? iterationErrorExpressionOpt, BoundExpression expression, BoundForEachDeconstructStep? deconstructionOpt, BoundStatement body, LabelSymbol breakLabel, LabelSymbol continueLabel, bool hasErrors = false)
4102public BoundTypeExpression IterationVariableType { get; }
4112public BoundForEachStatement Update(ForEachEnumeratorInfo? enumeratorInfoOpt, BoundValuePlaceholder? elementPlaceholder, BoundExpression? elementConversion, BoundTypeExpression iterationVariableType, ImmutableArray<LocalSymbol> iterationVariables, BoundExpression? iterationErrorExpressionOpt, BoundExpression expression, BoundForEachDeconstructStep? deconstructionOpt, BoundStatement body, LabelSymbol breakLabel, LabelSymbol continueLabel)
8282public BoundDeclarationPattern(SyntaxNode syntax, BoundTypeExpression declaredType, bool isVar, bool isUnionMatching, Symbol? variable, BoundExpression? variableAccess, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors = false)
8299public BoundTypeExpression DeclaredType { get; }
8306public BoundDeclarationPattern Update(BoundTypeExpression declaredType, bool isVar, bool isUnionMatching, Symbol? variable, BoundExpression? variableAccess, TypeSymbol inputType, TypeSymbol narrowedType)
8320public BoundRecursivePattern(SyntaxNode syntax, BoundTypeExpression? declaredType, MethodSymbol? deconstructMethod, ImmutableArray<BoundPositionalSubpattern> deconstruction, ImmutableArray<BoundPropertySubpattern> properties, bool isExplicitNotNullTest, bool isUnionMatching, Symbol? variable, BoundExpression? variableAccess, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors = false)
8339public BoundTypeExpression? DeclaredType { get; }
8349public BoundRecursivePattern Update(BoundTypeExpression? declaredType, MethodSymbol? deconstructMethod, ImmutableArray<BoundPositionalSubpattern> deconstruction, ImmutableArray<BoundPropertySubpattern> properties, bool isExplicitNotNullTest, bool isUnionMatching, Symbol? variable, BoundExpression? variableAccess, TypeSymbol inputType, TypeSymbol narrowedType)
8594public BoundTypePattern(SyntaxNode syntax, BoundTypeExpression declaredType, bool isExplicitNotNullTest, bool isUnionMatching, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors = false)
8611public BoundTypeExpression DeclaredType { get; }
8618public BoundTypePattern Update(BoundTypeExpression declaredType, bool isExplicitNotNullTest, bool isUnionMatching, TypeSymbol inputType, TypeSymbol narrowedType)
9123return VisitTypeExpression((BoundTypeExpression)node, arg);
9581public virtual R VisitTypeExpression(BoundTypeExpression node, A arg) => this.DefaultVisit(node, arg);
9822public virtual BoundNode? VisitTypeExpression(BoundTypeExpression node) => this.DefaultVisit(node);
10103public override BoundNode? VisitTypeExpression(BoundTypeExpression node)
11228public override BoundNode? VisitTypeExpression(BoundTypeExpression node)
11231BoundTypeExpression? boundContainingTypeOpt = (BoundTypeExpression?)this.Visit(node.BoundContainingTypeOpt);
11470BoundTypeExpression sourceType = (BoundTypeExpression)this.Visit(node.SourceType);
11562BoundTypeExpression? targetType = node.TargetType;
11569BoundTypeExpression targetType = (BoundTypeExpression)this.Visit(node.TargetType);
11576BoundTypeExpression targetType = (BoundTypeExpression)this.Visit(node.TargetType);
11584BoundTypeExpression sourceType = (BoundTypeExpression)this.Visit(node.SourceType);
11658BoundTypeExpression? declaredTypeOpt = (BoundTypeExpression?)this.Visit(node.DeclaredTypeOpt);
11776BoundTypeExpression iterationVariableType = (BoundTypeExpression)this.Visit(node.IterationVariableType);
12537BoundTypeExpression declaredType = (BoundTypeExpression)this.Visit(node.DeclaredType);
12547BoundTypeExpression? declaredType = (BoundTypeExpression?)this.Visit(node.DeclaredType);
12608BoundTypeExpression declaredType = (BoundTypeExpression)this.Visit(node.DeclaredType);
12969public override BoundNode? VisitTypeExpression(BoundTypeExpression node)
12971BoundTypeExpression? boundContainingTypeOpt = (BoundTypeExpression?)this.Visit(node.BoundContainingTypeOpt);
12973BoundTypeExpression updatedNode;
13469BoundTypeExpression sourceType = (BoundTypeExpression)this.Visit(node.SourceType);
13691BoundTypeExpression? targetType = node.TargetType;
13709BoundTypeExpression targetType = (BoundTypeExpression)this.Visit(node.TargetType);
13727BoundTypeExpression targetType = (BoundTypeExpression)this.Visit(node.TargetType);
13746BoundTypeExpression sourceType = (BoundTypeExpression)this.Visit(node.SourceType);
13872BoundTypeExpression? declaredTypeOpt = (BoundTypeExpression?)this.Visit(node.DeclaredTypeOpt);
13929BoundTypeExpression iterationVariableType = (BoundTypeExpression)this.Visit(node.IterationVariableType);
15235BoundTypeExpression declaredType = (BoundTypeExpression)this.Visit(node.DeclaredType);
15246BoundTypeExpression? declaredType = (BoundTypeExpression?)this.Visit(node.DeclaredType);
15306BoundTypeExpression declaredType = (BoundTypeExpression)this.Visit(node.DeclaredType);
15649public override TreeDumperNode VisitTypeExpression(BoundTypeExpression node, object? arg) => new TreeDumperNode("typeExpression", null, new TreeDumperNode[]