7 types derived from TypeSymbol
Microsoft.CodeAnalysis.CSharp (7)
Symbols\ArrayTypeSymbol.cs (1)
21internal abstract partial class ArrayTypeSymbol : TypeSymbol, IArrayTypeSymbolInternal
Symbols\DynamicTypeSymbol.cs (1)
15internal sealed partial class DynamicTypeSymbol : TypeSymbol
Symbols\FunctionPointers\FunctionPointerTypeSymbol.cs (1)
17internal sealed partial class FunctionPointerTypeSymbol : TypeSymbol
Symbols\FunctionTypeSymbol.cs (1)
35internal sealed class FunctionTypeSymbol : TypeSymbol
Symbols\NamedTypeSymbol.cs (1)
25internal abstract partial class NamedTypeSymbol : TypeSymbol, INamedTypeSymbolInternal
Symbols\PointerTypeSymbol.cs (1)
19internal sealed partial class PointerTypeSymbol : TypeSymbol
Symbols\TypeParameterSymbol.cs (1)
21internal abstract partial class TypeParameterSymbol : TypeSymbol, ITypeParameterSymbolInternal
4753 references to TypeSymbol
Microsoft.CodeAnalysis.CSharp (4706)
Binder\Binder.cs (4)
796TypeSymbol? throughTypeOpt = null) 804TypeSymbol throughTypeOpt, 807ConsList<TypeSymbol>? basesBeingResolved = null) 877TypeSymbol getType()
Binder\Binder.IdentifierUsedAsValueFinder.cs (2)
210TypeSymbol type, 252TypeSymbol type,
Binder\Binder.NamespaceOrTypeOrAliasSymbolWithAnnotations.cs (3)
30Debug.Assert(!(symbol is TypeSymbol)); 58var type = symbol as TypeSymbol;
Binder\Binder.QueryUnboundLambdaState.cs (1)
57public override void GenerateAnonymousFunctionConversionError(BindingDiagnosticBag diagnostics, TypeSymbol targetType)
Binder\Binder.ValueChecks.cs (6)
988TypeSymbol.Equals( 1453? TypeSymbol.Equals(fieldSymbol.ContainingType, containing.ContainingType, TypeCompareKind.AllIgnoreOptions) 1455: TypeSymbol.Equals(fieldSymbol.ContainingType.OriginalDefinition, containing.ContainingType.OriginalDefinition, TypeCompareKind.AllIgnoreOptions))) 1786var accessThroughType = this.GetAccessThroughType(receiver); 1835var accessThroughType = this.GetAccessThroughType(receiver); 5629private SignatureOnlyMethodSymbol GetInlineArrayConversionEquivalentSignatureMethod(BoundExpression inlineArray, TypeSymbol resultType, out ImmutableArray<BoundExpression> arguments, out ImmutableArray<RefKind> refKinds)
Binder\Binder.WithQueryLambdaParametersBinder.cs (1)
105LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\Binder_AnonymousTypes.cs (3)
88TypeSymbol fieldType = GetAnonymousTypeFieldType(boundExpressions[i], fieldInitializer, diagnostics, ref hasError); 211private TypeSymbol GetAnonymousTypeFieldType(BoundExpression expression, CSharpSyntaxNode errorSyntax, BindingDiagnosticBag diagnostics, ref bool hasError) 214TypeSymbol? expressionType = expression.Type;
Binder\Binder_Attributes.cs (11)
549TypeSymbol namedArgumentType; 607private TypeSymbol BindNamedAttributeArgumentType(AttributeArgumentSyntax namedArgument, Symbol namedArgumentNameSymbol, NamedTypeSymbol attributeType, BindingDiagnosticBag diagnostics) 611return (TypeSymbol)namedArgumentNameSymbol; 620TypeSymbol? namedArgumentType = null; 729!((TypeSymbol)reorderedArgument.TypeInternal!).Equals(parameter.Type, TypeCompareKind.AllIgnoreOptions)) 875private TypedConstant VisitArrayCollectionExpression(TypeSymbol type, BoundCollectionExpression collection, BindingDiagnosticBag diagnostics, ref bool attrHasErrors, bool curArgumentHasErrors) 910var type = node.Type; 912var operandType = operand.Type; 937var typeOfArgument = (TypeSymbol?)node.SourceType.Type; 1015var type = node.Type;
Binder\Binder_Await.cs (9)
40TypeSymbol awaitExpressionType = info.GetResult?.ReturnType ?? (hasErrors ? CreateErrorType() : Compilation.DynamicType); 84var type = expression.Type; 262Debug.Assert(TypeSymbol.Equals(expression.Type, getAwaiterArgument.Type, TypeCompareKind.ConsiderEverything)); 286TypeSymbol awaiterType = getAwaiter.Type!; 368private bool GetIsCompletedProperty(TypeSymbol awaiterType, SyntaxNode node, TypeSymbol awaitedExpressionType, BindingDiagnosticBag diagnostics, [NotNullWhen(true)] out PropertySymbol? isCompletedProperty) 411private bool AwaiterImplementsINotifyCompletion(TypeSymbol awaiterType, SyntaxNode node, BindingDiagnosticBag diagnostics) 435private bool GetGetResultMethod(BoundExpression awaiterExpression, SyntaxNode node, TypeSymbol awaitedExpressionType, BindingDiagnosticBag diagnostics, out MethodSymbol? getResultMethod, [NotNullWhen(true)] out BoundExpression? getAwaiterGetResultCall) 437var awaiterType = awaiterExpression.Type;
Binder\Binder_Constraints.cs (3)
463TypeSymbol typeSymbol => typeSymbol, 465MethodSymbol method => (TypeSymbol)method.ContainingSymbol, 561TypeSymbol type = typeWithAnnotations.Type;
Binder\Binder_Conversions.cs (74)
22TypeSymbol destination, 35TypeSymbol destination, 47TypeSymbol destination, 60TypeSymbol destination, 102TypeSymbol destination, 211TypeSymbol? type = source.Type; 300void reportUseSiteDiagnostics(SyntaxNode syntax, Conversion conversion, BoundExpression source, TypeSymbol destination, BindingDiagnosticBag diagnostics) 314void ensureAllUnderlyingConversionsChecked(SyntaxNode syntax, BoundExpression source, Conversion conversion, bool wasCompilerGenerated, TypeSymbol destination, BindingDiagnosticBag diagnostics) 407void checkConstraintLanguageVersionAndRuntimeSupportForConversion(SyntaxNode syntax, Conversion conversion, BoundExpression source, TypeSymbol destination, BindingDiagnosticBag diagnostics) 525TypeSymbol sourceForCastUp = source.Type.IsSpan() 574internal static MethodSymbol? TryFindImplicitOperatorFromArray(TypeSymbol type) 584internal static MethodSymbol? TryFindImplicitOperatorFromSpan(TypeSymbol spanType, TypeSymbol readonlySpanType) 594private static MethodSymbol? TryFindImplicitOperator<TArg>(TypeSymbol type, TArg arg, 607internal static bool NeedsSpanCastUp(TypeSymbol source, TypeSymbol destination) 613var sourceElementType = ((NamedTypeSymbol)source).TypeArgumentsWithAnnotationsNoUseSiteDiagnostics[0].Type; 614var destinationElementType = ((NamedTypeSymbol)destination).TypeArgumentsWithAnnotationsNoUseSiteDiagnostics[0].Type; 624internal static MethodSymbol? TryFindCastUpMethod(TypeSymbol source, TypeSymbol destination) 652internal static MethodSymbol? TryFindAsSpanCharMethod(CSharpCompilation compilation, TypeSymbol readOnlySpanType) 686private static MethodSymbol? TryFindSingleMethod<TArg>(TypeSymbol type, string name, TArg arg, Func<TArg, MethodSymbol, bool> predicate) 707private BoundExpression BindUnconvertedInterpolatedExpressionToFormattableStringFactory(BoundUnconvertedInterpolatedString unconvertedSource, TypeSymbol destination, BindingDiagnosticBag diagnostics) 729private static void CheckInlineArrayTypeIsSupported(SyntaxNode syntax, TypeSymbol inlineArrayType, TypeSymbol elementType, BindingDiagnosticBag diagnostics) 742SyntaxNode syntax, BoundUnconvertedObjectCreationExpression node, Conversion conversion, bool isCast, TypeSymbol destination, 776TypeSymbol type, AnalyzedArguments arguments, BindingDiagnosticBag diagnostics) 809TypeSymbol targetType, 820var collectionTypeKind = conversion.GetCollectionExpressionTypeKind(out var elementType, out MethodSymbol? constructor, out bool isExpanded); 857collectionBuilderMethod = GetAndValidateCollectionBuilderMethod(syntax, namedType, diagnostics, out var updatedElementType); 986BoundNode bindSpreadElement(BoundCollectionExpressionSpreadElement element, TypeSymbol elementType, Conversion elementConversion, BindingDiagnosticBag diagnostics) 1014private bool HasCollectionInitializerTypeInProgress(SyntaxNode syntax, TypeSymbol targetType) 1036out TypeSymbol? elementType) 1039bool result = namedType.HasCollectionBuilderAttribute(out TypeSymbol? builderType, out string? methodName); 1077internal BoundExpression BindCollectionExpressionConstructor(SyntaxNode syntax, TypeSymbol targetType, MethodSymbol? constructor, BindingDiagnosticBag diagnostics) 1107internal bool HasCollectionExpressionApplicableConstructor(SyntaxNode syntax, TypeSymbol targetType, out MethodSymbol? constructor, out bool isExpanded, BindingDiagnosticBag diagnostics, bool isParamsModifierValidation = false) 1239internal bool HasCollectionExpressionApplicableAddMethod(SyntaxNode syntax, TypeSymbol targetType, out ImmutableArray<MethodSymbol> addMethods, BindingDiagnosticBag diagnostics) 1478TypeSymbol? receiverType = methodGroup.ReceiverOpt.Type; 1515TypeSymbol secondArgumentType = (constructed ?? member).Parameters[1].Type; 1707internal bool TryGetCollectionIterationType(SyntaxNode syntax, TypeSymbol collectionType, out TypeWithAnnotations iterationType) 1730TypeSymbol targetType, 1761TypeSymbol targetType, 1790var elementType = elementTypeWithAnnotations.Type; 1851TypeSymbol elementTypeOriginalDefinition, 1852TypeSymbol? builderType, 1911var spanTypeArg = ((NamedTypeSymbol)methodWithTargetTypeParameters.Parameters[0].Type).TypeArgumentsWithAnnotationsNoUseSiteDiagnostics[0].Type; 1942TypeSymbol destination, 1983private BoundExpression ConvertSwitchExpression(BoundUnconvertedSwitchExpression source, TypeSymbol destination, Conversion? conversionIfTargetTyped, BindingDiagnosticBag diagnostics, bool hasErrors = false) 2016TypeSymbol destination, 2082TypeSymbol conversionParameterType = conversion.BestUserDefinedConversionAnalysis.Operator.GetParameterType(0); 2086!TypeSymbol.Equals(conversion.BestUserDefinedConversionAnalysis.FromType, conversionParameterType, TypeCompareKind.ConsiderEverything2)) 2102TypeSymbol conversionReturnType = conversion.BestUserDefinedConversionAnalysis.Operator.ReturnType; 2103TypeSymbol conversionToType = conversion.BestUserDefinedConversionAnalysis.ToType; 2107!TypeSymbol.Equals(conversionToType, conversionReturnType, TypeCompareKind.ConsiderEverything2)) 2122if (conversionToType.IsNullableType() && TypeSymbol.Equals(conversionToType.GetNullableUnderlyingType(), conversionReturnType, TypeCompareKind.ConsiderEverything2)) 2181private BoundExpression CreateFunctionTypeConversion(SyntaxNode syntax, BoundExpression source, Conversion conversion, bool isCast, ConversionGroup? conversionGroup, TypeSymbol destination, BindingDiagnosticBag diagnostics) 2229private BoundExpression CreateAnonymousFunctionConversion(SyntaxNode syntax, BoundExpression source, Conversion conversion, bool isCast, ConversionGroup? conversionGroup, TypeSymbol destination, BindingDiagnosticBag diagnostics) 2256private BoundExpression CreateMethodGroupConversion(SyntaxNode syntax, BoundExpression source, Conversion conversion, bool isCast, ConversionGroup? conversionGroup, TypeSymbol destination, BindingDiagnosticBag diagnostics) 2278private static void CheckParameterModifierMismatchMethodConversion(SyntaxNode syntax, MethodSymbol lambdaOrMethod, TypeSymbol targetType, bool invokedAsExtensionMethod, BindingDiagnosticBag diagnostics) 2326private static void CheckLambdaConversion(LambdaSymbol lambdaSymbol, TypeSymbol targetType, BindingDiagnosticBag diagnostics) 2414private BoundExpression CreateStackAllocConversion(SyntaxNode syntax, BoundExpression source, Conversion conversion, bool isCast, ConversionGroup? conversionGroup, TypeSymbol destination, BindingDiagnosticBag diagnostics) 2419var elementType = boundStackAlloc.ElementType; 2420TypeSymbol stackAllocType; 2442private BoundExpression CreateTupleLiteralConversion(SyntaxNode syntax, BoundTupleLiteral sourceTuple, Conversion conversion, bool isCast, ConversionGroup? conversionGroup, TypeSymbol destination, BindingDiagnosticBag diagnostics) 2448var destinationWithoutNullable = destination; 2518if (!TypeSymbol.Equals(sourceTuple.Type, destination, TypeCompareKind.ConsiderEverything2)) 2826internal bool MethodIsCompatibleWithDelegateOrFunctionPointer(BoundExpression? receiverOpt, bool isExtensionMethod, MethodSymbol method, TypeSymbol delegateType, Location errorLocation, BindingDiagnosticBag diagnostics) 2898var methodReturnType = method.ReturnType; 2899var delegateReturnType = delegateOrFuncPtrMethod.ReturnType; 2945static bool hasConversion(TypeKind targetKind, Conversions conversions, TypeSymbol source, TypeSymbol destination, 3015TypeSymbol delegateOrFuncPtrType, 3111TypeSymbol destination, 3212TypeSymbol destination,
Binder\Binder_Crefs.cs (7)
458TypeSymbol returnType = BindCrefParameterOrReturnType(syntax.Type, syntax, diagnostics); 462symbol.Kind != SymbolKind.Method || TypeSymbol.Equals(((MethodSymbol)symbol).ReturnType, returnType, TypeCompareKind.ConsiderEverything2), returnType); 580if (containerType.Name == memberName && (hasParameterList || containerType.Arity == 0 || !TypeSymbol.Equals(this.ContainingType, containerType.OriginalDefinition, TypeCompareKind.ConsiderEverything2))) 711private static bool ContainsNestedTypeOfUnconstructedGenericType(TypeSymbol type) 1102TypeSymbol type = BindCrefParameterOrReturnType(parameter.Type, (MemberCrefSyntax)parameterListSyntax.Parent, diagnostics); 1113private TypeSymbol BindCrefParameterOrReturnType(TypeSyntax typeSyntax, MemberCrefSyntax memberCrefSyntax, BindingDiagnosticBag diagnostics) 1133TypeSymbol type = parameterOrReturnTypeBinder.BindType(typeSyntax, localDiagnostics).Type;
Binder\Binder_Deconstruct.cs (11)
128var type = boundRHS.Type ?? voidType; 159TypeSymbol returnType = hasErrors ? CreateErrorType() : lhsTuple.Type!; 220TypeSymbol? mergedTupleType = MakeMergedTupleType(checkedVariables, (BoundTupleLiteral)boundRHS, syntax, hadErrors ? null : diagnostics); 243TypeSymbol type, 251ImmutableArray<TypeSymbol> tupleOrDeconstructedTypes; 349private void SetInferredTypes(ArrayBuilder<DeconstructionVariable> variables, ImmutableArray<TypeSymbol> foundTypes, BindingDiagnosticBag diagnostics) 367private BoundExpression SetInferredType(BoundExpression expression, TypeSymbol type, BindingDiagnosticBag diagnostics) 471private TypeSymbol? MakeMergedTupleType(ArrayBuilder<DeconstructionVariable> lhsVariables, BoundTupleLiteral rhsLiteral, CSharpSyntaxNode syntax, BindingDiagnosticBag? diagnostics) 481TypeSymbol? mergedType = element.Type; 856var type = declTypeWithAnnotations.Type; 951Debug.Assert(TypeSymbol.Equals(declTypeWithAnnotations.Type, fieldType.Type, TypeCompareKind.ConsiderEverything2));
Binder\Binder_Expressions.cs (120)
204TypeSymbol resultType = expr.Type; 269internal BoundExpression BindToTypeForErrorRecovery(BoundExpression expression, TypeSymbol type = null) 297var commonType = expr.Type; 311TypeSymbol type = op.Type; 472TypeSymbol varType, 507|| this.ContainingMemberOrLambda is TypeSymbol { IsExtension: true }); 570TypeSymbol exprType = expr.Type; 850internal virtual BoundSwitchExpressionArm BindSwitchExpressionArm(SwitchExpressionArmSyntax node, TypeSymbol switchGoverningType, BindingDiagnosticBag diagnostics) 1227TypeSymbol typedReferenceType = this.Compilation.GetSpecialType(SpecialType.System_TypedReference); 1251TypeSymbol typedReferenceType = GetSpecialType(SpecialType.System_TypedReference, diagnostics, node); 1275TypeSymbol typedReferenceType = this.Compilation.GetSpecialType(SpecialType.System_TypedReference); 1276TypeSymbol typeType = this.GetWellKnownType(WellKnownType.System_Type, diagnostics, node); 1317TypeSymbol runtimeArgumentHandleType = GetSpecialType(SpecialType.System_RuntimeArgumentHandle, diagnostics, node); 1381TypeSymbol type = typeWithAnnotations.Type; 1409var type = typeWithAnnotations.Type; 1434TypeSymbol type = typeWithAnnotations.Type; 1529internal static bool CheckManagedAddr(CSharpCompilation compilation, TypeSymbol type, Location location, BindingDiagnosticBag diagnostics, bool errorForManaged = false) 1539internal static bool CheckManagedAddr(CSharpCompilation compilation, TypeSymbol type, ManagedKind managedKind, Location location, BindingDiagnosticBag diagnostics, bool errorForManaged = false) 1563internal static ConstantValue GetConstantSizeOf(TypeSymbol type) 1574TypeSymbol type = typeWithAnnotations.Type; 1970private bool IsBadLocalOrParameterCapture(Symbol symbol, TypeSymbol type, RefKind refKind) 2000TypeSymbol type; 2208return new BoundTypeExpression(node, null, (TypeSymbol)symbol, hasErrors: isError); 2236TypeSymbol typeSymbol => new BoundTypeExpression(node, alias, typeSymbol, hasErrors: isError), 2378TypeSymbol hostObjectType = Compilation.GetHostObjectTypeSymbol(); 2483var type = symbol as TypeSymbol; 2554TypeSymbol baseType = this.ContainingType is null ? null : this.ContainingType.BaseTypeNoUseSiteDiagnostics; 2586TypeSymbol targetType = targetTypeWithAnnotations.Type; 2592!TypeSymbol.Equals(targetType.GetNullableUnderlyingType(), operand.Type, TypeCompareKind.ConsiderEverything2)) 2610TypeSymbol intType = GetSpecialType(SpecialType.System_Int32, diagnostics, node); 2611TypeSymbol indexType = GetWellKnownType(WellKnownType.System_Index, diagnostics, node); 2647TypeSymbol rangeType = GetWellKnownType(WellKnownType.System_Range, diagnostics, node); 2718TypeSymbol indexType = GetWellKnownType(WellKnownType.System_Index, diagnostics, operand); 2748TypeSymbol targetType = targetTypeWithAnnotations.Type; 2769TypeSymbol targetType) 2906var targetElementType = targetElementTypesWithAnnotations[i].Type; 3178var type = declType.Type; 3278TypeSymbol fieldType = expressionVariableField.GetFieldType(this.FieldsBeingBound).Type; 3292internal static void CheckRestrictedTypeInAsyncMethod(Symbol containingSymbol, TypeSymbol type, BindingDiagnosticBag diagnostics, SyntaxNode syntax) 3665TypeSymbol handlerType, 3782TypeSymbol placeholderType; 4122TypeSymbol bestType = BestTypeInferrer.InferBestType(boundInitializerExpressions, this.Conversions, ref useSiteInfo, out _); 4149TypeSymbol bestType = BestTypeInferrer.InferBestType(boundInitializerExpressions, this.Conversions, ref useSiteInfo, out _); 4277TypeSymbol elemType = type.ElementType; 4515TypeSymbol type = GetStackAllocType(node, elementType, diagnostics, out bool hasErrors); 4598private TypeSymbol GetStackAllocType(SyntaxNode node, TypeWithAnnotations elementTypeWithAnnotations, BindingDiagnosticBag diagnostics, out bool hasErrors) 4658TypeSymbol type, 4659TypeSymbol elementType, 4838TypeSymbol constructorReturnType = constructor.ReturnType; 4963TypeSymbol constructorReturnType, 5194var type = typeWithAnnotations.Type; 5195var originalType = type; 5298var collectionType = enumeratorInfo.CollectionType; 5510private BoundExpression BindClassCreationExpression(ObjectCreationExpressionSyntax node, NamedTypeSymbol type, string typeName, BindingDiagnosticBag diagnostics, TypeSymbol initializerType = null) 5583private BoundExpression MakeBadExpressionForObjectCreation(ObjectCreationExpressionSyntax node, TypeSymbol type, AnalyzedArguments analyzedArguments, BindingDiagnosticBag diagnostics, bool wasCompilerGenerated = false) 5589private BoundExpression MakeBadExpressionForObjectCreation(SyntaxNode node, TypeSymbol type, AnalyzedArguments analyzedArguments, InitializerExpressionSyntax? initializerOpt, SyntaxNode? typeSyntax, BindingDiagnosticBag diagnostics, bool wasCompilerGenerated = false) 5609TypeSymbol type, 5641TypeSymbol type, 5663TypeSymbol initializerType, 5833var initializerType = implicitReceiver.Type; 6236TypeSymbol initializerType, 6290private bool CollectionInitializerTypeImplementsIEnumerable(TypeSymbol initializerType, CSharpSyntaxNode node, BindingDiagnosticBag diagnostics) 6328TypeSymbol initializerType, 6672TypeSymbol initializerTypeOpt = null, 6767TypeSymbol initializerTypeOpt, 6852TypeSymbol initializerTypeOpt, 6906private BoundObjectInitializerExpressionBase MakeBoundInitializerOpt(SyntaxNode typeNode, NamedTypeSymbol type, InitializerExpressionSyntax initializerSyntaxOpt, TypeSymbol initializerTypeOpt, BindingDiagnosticBag diagnostics) 6959Debug.Assert(TypeSymbol.Equals(interfaceType.ComImportCoClass, coClassType, TypeCompareKind.ConsiderEverything2)); 7357TypeSymbol type = null; 7443TypeSymbol pointedAtType; 7520var leftType = boundValue.Type; 7528if (TypeSymbol.Equals(boundType.Type, leftType, TypeCompareKind.AllIgnoreOptions)) 7555private bool IsPotentialColorColorReceiver(IdentifierNameSyntax id, TypeSymbol type) 7560TypeSymbol.Equals(BindNamespaceOrType(id, BindingDiagnosticBag.Discarded).Type, type, TypeCompareKind.AllIgnoreOptions); 7664TypeSymbol leftType = boundLeft.Type; 7879TypeSymbol leftType, 8072var leftType = boundLeft.Type; 8158private void LookupInstanceMember(LookupResult lookupResult, TypeSymbol leftType, bool leftIsBaseReference, string rightName, int rightArity, bool invoked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 8232private bool WouldUsingSystemFindExtension(TypeSymbol receiver, string methodName) 8244private bool ImplementsWinRTAsyncInterface(TypeSymbol type) 8249private bool IsWinRTAsyncInterface(TypeSymbol type) 8258TypeSymbol.Equals(namedType, Compilation.GetWellKnownType(WellKnownType.Windows_Foundation_IAsyncAction), TypeCompareKind.ConsiderEverything2) || 8259TypeSymbol.Equals(namedType, Compilation.GetWellKnownType(WellKnownType.Windows_Foundation_IAsyncActionWithProgress_T), TypeCompareKind.ConsiderEverything2) || 8260TypeSymbol.Equals(namedType, Compilation.GetWellKnownType(WellKnownType.Windows_Foundation_IAsyncOperation_T), TypeCompareKind.ConsiderEverything2) || 8261TypeSymbol.Equals(namedType, Compilation.GetWellKnownType(WellKnownType.Windows_Foundation_IAsyncOperationWithProgress_T2), TypeCompareKind.ConsiderEverything2); 8320private TypeSymbol GetNonMethodMemberType(Symbol symbolOpt) 8322TypeSymbol resultType = null; 8512TypeSymbol? returnType, 8592TypeSymbol? returnType, 8699TypeSymbol? returnType, 8719TypeSymbol? receiverType = left.Type; 8818static MethodGroupResolution makeErrorResult(TypeSymbol receiverType, string memberName, int arity, LookupResult lookupResult, SyntaxNode expression, BindingDiagnosticBag diagnostics) 8926TypeSymbol receiverType = receiver.Type; 8994TypeSymbol fieldType = fieldSymbol.GetFieldType(this.FieldsBeingBound).Type; 9077Debug.Assert(symbol is not TypeSymbol); 9125return !symbol.IsStatic && !(symbol is TypeSymbol) && 9407if (!TypeSymbol.IsInlineArrayElementFieldSupported(elementField)) 9432{ Code: (int)ErrorCode.ERR_BadIndexLHS, Arguments: [TypeSymbol type] } && type.Equals(expr.Type, TypeCompareKind.ConsiderEverything)) 9569TypeSymbol resultType; 9610if (TypeSymbol.Equals(convertedIndex.Type, compilation.GetWellKnownType(WellKnownType.System_Index), TypeCompareKind.AllIgnoreOptions)) 9661var exprType = expr.Type; 9742TypeSymbol resultType = indexOrRangeWellknownType == WellKnownType.System_Range 9838TypeSymbol type = GetWellKnownType(wellKnownType, ref useSiteInfo); 9860TypeSymbol type = GetSpecialType(specialType, attemptDiagnostics, node); 9873private BoundExpression TryImplicitConversionToArrayIndex(BoundExpression expr, TypeSymbol targetType, SyntaxNode node, BindingDiagnosticBag diagnostics) 9917TypeSymbol pointedAtType = pointerType.PointedAtType; 10285TypeSymbol.Equals(argType, Compilation.GetWellKnownType(WellKnownType.System_Index), TypeCompareKind.ConsiderEverything) ? ThreeState.True : 10286TypeSymbol.Equals(argType, Compilation.GetWellKnownType(WellKnownType.System_Range), TypeCompareKind.ConsiderEverything) ? ThreeState.False : 10547TypeSymbol receiverType, 10598TypeSymbol propertyType = GetCommonTypeOrReturnType(propertyGroup) ?? CreateErrorType(); 10624TypeSymbol returnType = null, 10648TypeSymbol returnType = null, 10680TypeSymbol returnType = null, 10751TypeSymbol returnType = null, 11284internal static bool ReportDelegateInvokeUseSiteDiagnostic(BindingDiagnosticBag diagnostics, TypeSymbol possibleDelegateType, 11340var receiverType = receiver.Type; 11349var accessType = access.Type; 11485var receiverType = receiver.Type; 11516var receiverType = receiver.Type;
Binder\Binder_Initializers.cs (3)
147Debug.Assert((ContainingMemberOrLambda is TypeSymbol containing && TypeSymbol.Equals(containing, fieldSymbol.ContainingType, TypeCompareKind.ConsiderEverything2)) || //should be the binder for the type 261var submissionResultType = scriptInitializer.ResultType;
Binder\Binder_InterpolatedString.cs (6)
336TypeSymbol destination, 519Func<BoundUnconvertedInterpolatedString, int, (ImmutableArray<ImmutableArray<BoundExpression>>, TypeSymbol), BoundExpression> interpolationFactory = 521Func<BoundBinaryOperator, BoundExpression, BoundExpression, (ImmutableArray<ImmutableArray<BoundExpression>>, TypeSymbol), BoundExpression> binaryOperatorFactory = 528static BoundInterpolatedString createInterpolation(BoundUnconvertedInterpolatedString expression, int i, (ImmutableArray<ImmutableArray<BoundExpression>> AppendCalls, TypeSymbol _) arg) 540static BoundBinaryOperator createBinaryOperator(BoundBinaryOperator original, BoundExpression left, BoundExpression right, (ImmutableArray<ImmutableArray<BoundExpression>> _, TypeSymbol @string) arg) 674TypeSymbol objectType = GetSpecialType(SpecialType.System_Object, diagnostics, syntax);
Binder\Binder_Invocation.cs (23)
269TypeSymbol objType = GetSpecialType(SpecialType.System_Object, diagnostics, node); 1067if (call.ReceiverOpt.Type.IsRestrictedType() && !call.Method.ContainingType.IsInterface && !TypeSymbol.Equals(call.Method.ContainingType, call.ReceiverOpt.Type, TypeCompareKind.ConsiderEverything2)) 1202var returnType = methodResult.Member.ReturnType; 1423var parameterType = parameter.Type; 1657TypeSymbol parameterType = parameter.Type; 1727TypeSymbol constantType = Compilation.GetSpecialType(defaultConstantValue.SpecialType); 1776TypeSymbol collectionType = paramsParameter.Type; 1781TypeSymbol int32Type = GetSpecialType(SpecialType.System_Int32, diagnostics, node); 1846TypeSymbol.Equals(containingMethod.ContainingType, method.ContainingType, TypeCompareKind.ConsiderEverything) && 2013var returnType = GetCommonTypeOrReturnType(methods) ?? new ExtendedErrorTypeSymbol(this.Compilation, string.Empty, arity: 0, errorInfo: null); 2014var methodContainer = (object)receiver != null && (object)receiver.Type != null 2119var parameterType = GetCorrespondingParameterType(analyzedArguments, i, parameterList); 2141var candidateType = getCorrespondingParameterType(i); 2188TypeSymbol getCorrespondingParameterType(int i) 2191TypeSymbol candidateType = null; 2194var parameterType = GetCorrespondingParameterType(analyzedArguments, i, parameterList); 2222private static TypeSymbol GetCorrespondingParameterType(AnalyzedArguments analyzedArguments, int i, ImmutableArray<ParameterSymbol> parameterList) 2254TypeSymbol returnType = new ExtendedErrorTypeSymbol(this.Compilation, string.Empty, arity: 0, errorInfo: null); 2255var methodContainer = expr.Type ?? this.ContainingType; 2266private static TypeSymbol GetCommonTypeOrReturnType<TMember>(ImmutableArray<TMember> members) 2269TypeSymbol type = null; 2272TypeSymbol returnType = members[i].GetTypeOrReturnType().Type; 2277else if (!TypeSymbol.Equals(type, returnType, TypeCompareKind.ConsiderEverything2))
Binder\Binder_Lambda.cs (1)
303var type = returnType.Type;
Binder\Binder_Lookup.cs (80)
32ConsList<TypeSymbol> basesBeingResolved, 67private Binder LookupSymbolsWithFallback(LookupResult result, string name, int arity, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, ConsList<TypeSymbol> basesBeingResolved = null, LookupOptions options = LookupOptions.Default) 88LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 122LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 136ConsList<TypeSymbol> basesBeingResolved, 154private void LookupMembersWithFallback(LookupResult result, NamespaceOrTypeSymbol nsOrType, string name, int arity, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, ConsList<TypeSymbol> basesBeingResolved = null, LookupOptions options = LookupOptions.Default) 170protected void LookupMembersInternal(LookupResult result, NamespaceOrTypeSymbol nsOrType, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 181this.LookupMembersInType(result, (TypeSymbol)nsOrType, name, arity, basesBeingResolved, options, originalBinder, diagnose, ref useSiteInfo); 253protected void LookupMembersInType(LookupResult result, TypeSymbol type, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 294private void LookupMembersInErrorType(LookupResult result, ErrorTypeSymbol errorType, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 303TypeSymbol candidateType = errorType.CandidateSymbols.First() as TypeSymbol; 329protected void LookupMembersInSubmissions(LookupResult result, TypeSymbol submissionClass, CompilationUnitSyntax declarationSyntax, bool inUsings, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, 478ConsList<TypeSymbol> basesBeingResolved, 567ConsList<TypeSymbol> basesBeingResolved, 851protected static void LookupMembersWithoutInheritance(LookupResult result, TypeSymbol type, string name, int arity, 852LookupOptions options, Binder originalBinder, TypeSymbol accessThroughType, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, ConsList<TypeSymbol> basesBeingResolved) 868TypeSymbol type, 871ConsList<TypeSymbol> basesBeingResolved, 883TypeSymbol type, 886ConsList<TypeSymbol> basesBeingResolved, 889TypeSymbol accessThroughType, 896TypeSymbol currentType = type; 1064TypeSymbol.Equals(iFaceOriginal, idictSymbol, TypeCompareKind.ConsiderEverything2) || 1067TypeSymbol.Equals(iFaceOriginal, iroDictSymbol, TypeCompareKind.ConsiderEverything2) || 1069TypeSymbol.Equals(iFaceOriginal, iListSymbol, TypeCompareKind.ConsiderEverything2) || 1070TypeSymbol.Equals(iFaceOriginal, iCollectionSymbol, TypeCompareKind.ConsiderEverything2) || 1071TypeSymbol.Equals(iFaceOriginal, inccSymbol, TypeCompareKind.ConsiderEverything2) || 1072TypeSymbol.Equals(iFaceOriginal, inpcSymbol, TypeCompareKind.ConsiderEverything2); 1076private static Symbol GetNearestOtherSymbol(ConsList<TypeSymbol> list, TypeSymbol type) 1078TypeSymbol other = type; 1080for (; list != null && list != ConsList<TypeSymbol>.Empty; list = list.Tail) 1082if (TypeSymbol.Equals(list.Head, type.OriginalDefinition, TypeCompareKind.ConsiderEverything2)) 1084if (TypeSymbol.Equals(other, type, TypeCompareKind.ConsiderEverything2) && list.Tail != null && list.Tail != ConsList<TypeSymbol>.Empty) 1105ConsList<TypeSymbol> basesBeingResolved, 1108TypeSymbol accessThroughType, 1117((options & LookupOptions.NamespacesOrTypesOnly) == 0 || !(current.IsSingleViable && TypeSymbol.Equals(current.SingleSymbolOrDefault.ContainingType, type, TypeCompareKind.AllIgnoreOptions)))) // The nested type will shadow everything from bases 1124private static ImmutableArray<NamedTypeSymbol> GetBaseInterfaces(NamedTypeSymbol type, ConsList<TypeSymbol> basesBeingResolved, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1177static void addAllInterfaces(NamedTypeSymbol @interface, HashSet<NamedTypeSymbol> visited, ArrayBuilder<NamedTypeSymbol> result, ConsList<TypeSymbol> basesBeingResolved, ConsList<NamedTypeSymbol> cycleGuard) 1208ConsList<TypeSymbol> basesBeingResolved, 1211TypeSymbol accessThroughType, 1238private void LookupMembersInInterface(LookupResult current, NamedTypeSymbol type, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1256private void LookupMembersInTypeParameter(LookupResult current, TypeParameterSymbol typeParameter, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1275private static bool IsDerivedType(NamedTypeSymbol baseType, NamedTypeSymbol derivedType, ConsList<TypeSymbol> basesBeingResolved, CSharpCompilation compilation, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1277Debug.Assert(!TypeSymbol.Equals(baseType, derivedType, TypeCompareKind.ConsiderEverything2)); 1283if (TypeSymbol.Equals(b, baseType, TypeCompareKind.ConsiderEverything2)) return true; 1296if (TypeSymbol.Equals(b, baseType, TypeCompareKind.ConsiderEverything2)) 1312private void MergeHidingLookupResults(LookupResult resultHiding, LookupResult resultHidden, ConsList<TypeSymbol> basesBeingResolved, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1383if ((options & LookupOptions.NamespacesOrTypesOnly) != 0 && nsOrType is TypeSymbol) 1407if ((options & LookupOptions.NamespacesOrTypesOnly) != 0 && nsOrType is TypeSymbol) 1473internal SingleLookupResult CheckViability(Symbol symbol, int arity, LookupOptions options, TypeSymbol accessThroughType, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, ConsList<TypeSymbol> basesBeingResolved = null) 1504(unwrappedSymbol is not TypeSymbol && IsInstance(unwrappedSymbol) || !(unwrappedSymbol.IsAbstract || unwrappedSymbol.IsVirtual))) 1671internal bool CanAddLookupSymbolInfo(Symbol symbol, LookupOptions options, LookupSymbolsInfo info, TypeSymbol accessThroughType, AliasSymbol aliasSymbol = null) 1723private static TypeSymbol RefineAccessThroughType(LookupOptions options, TypeSymbol accessThroughType) 1759internal bool IsAccessible(Symbol symbol, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, TypeSymbol accessThroughType = null, ConsList<TypeSymbol> basesBeingResolved = null) 1778internal bool IsAccessible(Symbol symbol, TypeSymbol accessThroughType, out bool failedThroughTypeCheck, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, ConsList<TypeSymbol> basesBeingResolved = null) 1790/// Should only be called by <see cref="IsAccessible(Symbol, TypeSymbol, out bool, ref CompoundUseSiteInfo{AssemblySymbol}, ConsList{TypeSymbol})"/>, 1793internal virtual bool IsAccessibleHelper(Symbol symbol, TypeSymbol accessThroughType, out bool failedThroughTypeCheck, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, ConsList<TypeSymbol> basesBeingResolved) 1820TypeSymbol type = null; 1951this.AddMemberLookupSymbolsInfoInType(result, (TypeSymbol)nsOrType, options, originalBinder); 1955private void AddMemberLookupSymbolsInfoInType(LookupSymbolsInfo result, TypeSymbol type, LookupOptions options, Binder originalBinder) 1979protected void AddMemberLookupSymbolsInfoInSubmissions(LookupSymbolsInfo result, TypeSymbol scriptClass, bool inUsings, LookupOptions options, Binder originalBinder) 2052private static void AddMemberLookupSymbolsInfoWithoutInheritance(LookupSymbolsInfo result, TypeSymbol type, LookupOptions options, Binder originalBinder, TypeSymbol accessThroughType) 2064private void AddWinRTMembersLookupSymbolsInfo(LookupSymbolsInfo result, NamedTypeSymbol type, LookupOptions options, Binder originalBinder, TypeSymbol accessThroughType) 2079private void AddMemberLookupSymbolsInfoInClass(LookupSymbolsInfo result, TypeSymbol type, LookupOptions options, Binder originalBinder, TypeSymbol accessThroughType) 2110private void AddMemberLookupSymbolsInfoInInterface(LookupSymbolsInfo result, TypeSymbol type, LookupOptions options, Binder originalBinder, TypeSymbol accessThroughType)
Binder\Binder_Operators.cs (70)
209var leftType = left.Type; 264var leftType = left.Type; 387TypeSymbol getResultType(ExpressionSyntax node, TypeSymbol leftType, BindingDiagnosticBag diagnostics) 412TypeSymbol delegateType = left.Type; 431TypeSymbol type; 492TypeSymbol type = operand.Type; 666TypeSymbol leftType = left.Type; 667TypeSymbol rightType = right.Type; 775TypeSymbol resultType = signature.ReturnType; 871TypeSymbol leftType = left.Type; 872TypeSymbol rightType = right.Type; 1025bool isReadOnlySpanOfByte(TypeSymbol? type) 1160var trueFalseParameterType = (resultKind.Operator() == BinaryOperatorKind.And ? falseOperator : trueOperator).Parameters[0].Type; 1219var type = left.Type; 1277TypeSymbol parameterType = userDefinedOperator.Parameters[0].Type; 1348bool typesAreSame = TypeSymbol.Equals(signature.LeftType, signature.RightType, TypeCompareKind.ConsiderEverything2) && TypeSymbol.Equals(signature.LeftType, signature.ReturnType, TypeCompareKind.ConsiderEverything2); 1350bool typeMatchesContainer = TypeSymbol.Equals(signature.ReturnType.StrippedType(), t, TypeCompareKind.ConsiderEverything2) || 1457private bool HasApplicableBooleanOperator(NamedTypeSymbol containingType, string name, TypeSymbol argumentType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, out MethodSymbol @operator) 1486private TypeSymbol GetBinaryOperatorErrorType(BinaryOperatorKind kind, BindingDiagnosticBag diagnostics, CSharpSyntaxNode node) 1676static bool isNuint(TypeSymbol type) 1856internal static TypeSymbol GetEnumType(BinaryOperatorKind kind, BoundExpression left, BoundExpression right) 1908TypeSymbol resultTypeSymbol, 1921TypeSymbol enumType = GetEnumType(kind, left, right); 1922TypeSymbol underlyingType = enumType.GetEnumUnderlyingType()!; 1932TypeSymbol operandType = (operandSpecialType == underlyingType.SpecialType) ? 1968TypeSymbol resultType = kind == BinaryOperatorKind.EnumSubtraction ? underlyingType : enumType; 1983TypeSymbol resultTypeSymbol, 2485var operandType = operand.Type; 2582var operandType = operand.Type; 2702TypeSymbol getResultType(ExpressionSyntax node, TypeSymbol operandType, bool resultIsUsed, BindingDiagnosticBag diagnostics) 2708private ArrayBuilder<MethodSymbol>? LookupUserDefinedInstanceOperators(TypeSymbol lookupInType, string? checkedName, string ordinaryName, int parameterCount, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2821private bool CheckConstraintLanguageVersionAndRuntimeSupportForOperator(SyntaxNode node, MethodSymbol? methodOpt, bool isUnsignedRightShift, TypeSymbol? constrainedToTypeOpt, BindingDiagnosticBag diagnostics) 2908TypeSymbol pointedAtType; 2915private static void BindPointerIndirectionExpressionInternal(CSharpSyntaxNode node, BoundExpression operand, BindingDiagnosticBag diagnostics, out TypeSymbol pointedAtType, out bool hasErrors) 2972TypeSymbol operandType = operand.Type; 2994TypeSymbol pointerType = new PointerTypeSymbol(TypeWithAnnotations.Create(operandType)); 3230var resultType = signature.ReturnType; 3287TypeSymbol resultTypeSymbol, 3631private bool IsOperatorErrors(CSharpSyntaxNode node, TypeSymbol operandType, BoundTypeExpression typeExpression, BindingDiagnosticBag diagnostics) 3633var targetType = typeExpression.Type; 3660var resultType = (TypeSymbol)GetSpecialType(SpecialType.System_Boolean, diagnostics, node); 3702var targetType = typeExpression.Type; 3761var operandType = operand.Type; 3782TypeSymbol targetType = targetTypeWithAnnotations.Type; 3792TypeSymbol operandType, 3793TypeSymbol targetType, 3827TypeSymbol operandType, 3828TypeSymbol targetType, 4134TypeSymbol targetType = targetTypeWithAnnotations.Type; 4137var resultType = targetType; 4238var operandType = operand.Type; 4289TypeSymbol operandType, 4290TypeSymbol targetType, 4351TypeSymbol operandType, 4352TypeSymbol targetType, 4382internal static ConstantValue GetAsOperatorConstantResult(TypeSymbol operandType, TypeSymbol targetType, ConversionKind conversionKind, ConstantValue operandConstantValue) 4450TypeSymbol optLeftType = leftOperand.Type; // "A" 4451TypeSymbol optRightType = rightOperand.Type; // "B" 4453TypeSymbol optLeftType0 = isLeftNullable ? // "A0" 4626TypeSymbol leftType = leftOperand.Type; 4642var underlyingLeftType = leftType.GetNullableUnderlyingType(); 4745TypeSymbol? bestType = BestTypeInferrer.InferBestTypeForConditionalOperator(trueExpr, falseExpr, this.Conversions, out bool hadMultipleCandidates, ref useSiteInfo); 4785TypeSymbol trueType = trueExpr.Type; 4786TypeSymbol falseType = falseExpr.Type; 4788TypeSymbol type;
Binder\Binder_Patterns.cs (69)
24TypeSymbol? expressionType = expression.Type; 49TypeSymbol boolType, 165TypeSymbol inputType, 191TypeSymbol inputType, 203TypeSymbol inputType, 227TypeSymbol sliceType; 260TypeSymbol inputType, 261TypeSymbol elementType, 290TypeSymbol inputType, 297TypeSymbol elementType; 300TypeSymbol narrowedType = inputType.StrippedType(); 346private bool IsCountableAndIndexable(SyntaxNode node, TypeSymbol inputType, out PropertySymbol? lengthProperty) 354private bool BindLengthAndIndexerForListPattern(SyntaxNode node, TypeSymbol inputType, BindingDiagnosticBag diagnostics, 401private static BoundPattern BindDiscardPattern(DiscardPatternSyntax node, TypeSymbol inputType, BindingDiagnosticBag diagnostics) 409TypeSymbol inputType, 419TypeSymbol inputType, 427var convertedType = convertedExpression.Type ?? inputType; 453private bool ShouldBlockINumberBaseConversion(Conversion patternConversion, TypeSymbol inputType) 498TypeSymbol inputType, 526TypeSymbol inputType, 544TypeSymbol inputType, 560var strippedInputType = inputType.StrippedType(); 588TypeSymbol inputType, 723TypeSymbol inputType, 724TypeSymbol patternType, 804TypeSymbol expressionType, 805TypeSymbol patternType, 838TypeSymbol inputType, 853TypeSymbol inputType, 928TypeSymbol inputType, 949internal static bool IsZeroElementTupleType(TypeSymbol type) 958TypeSymbol inputType, 974TypeSymbol declType = declTypeWithAnnotations.Type; 1067TypeSymbol elementType = isError ? CreateErrorType() : outPlaceholders[i].Type; 1155TypeSymbol declType, 1172TypeSymbol elementType = isError ? CreateErrorType() : elementTypesWithAnnotations[i].Type; 1197TypeSymbol declType, 1235TypeSymbol declType, 1284bool hasBaseInterface(TypeSymbol type, NamedTypeSymbol possibleBaseInterface) 1318TypeSymbol inputType, 1344TypeSymbol inputType, 1377var strippedInputType = inputType.StrippedType(); 1422TypeSymbol elementType = isError ? CreateErrorType() : outPlaceholders[i].Type; 1445TypeSymbol elementType = isError ? CreateErrorType() : elementTypes[i].Type; 1460TypeSymbol inputType, 1474TypeSymbol memberType; 1493TypeSymbol receiverType = member.Receiver?.Type ?? inputType; 1510TypeSymbol inputType, ExpressionSyntax expr, BindingDiagnosticBag diagnostics, ref bool hasErrors) 1529TypeSymbol memberType = symbol switch 1540TypeSymbol inputType, 1612TypeSymbol inputType, 1625TypeSymbol inputType, 1633var type = value.Type ?? inputType; 1695internal static BinaryOperatorKind RelationalOperatorType(TypeSymbol type) => type.SpecialType switch 1718TypeSymbol inputType, 1732TypeSymbol inputType, 1753var narrowedTypeCandidates = ArrayBuilder<TypeSymbol>.GetInstance(2); 1778TypeSymbol inputType, 1779ArrayBuilder<TypeSymbol> narrowedTypeCandidates, 1797TypeSymbol? leastSpecificType(SyntaxNode node, ArrayBuilder<TypeSymbol> candidates, BindingDiagnosticBag diagnostics) 1801TypeSymbol? bestSoFar = candidates[0]; 1805TypeSymbol candidate = candidates[i]; 1811TypeSymbol candidate = candidates[i]; 1812TypeSymbol? spoiler = lessSpecificCandidate(candidate, bestSoFar, ref useSiteInfo); 1828TypeSymbol? lessSpecificCandidate(TypeSymbol bestSoFar, TypeSymbol possiblyLessSpecificCandidate, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1863static void collectCandidates(BoundPattern pat, ArrayBuilder<TypeSymbol> candidates)
Binder\Binder_Query.cs (1)
821private TypeSymbol TypeOrError(BoundExpression e)
Binder\Binder_QueryErrors.cs (16)
80private bool ImplementsStandardQueryInterface(TypeSymbol instanceType, string name, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 88var originalType = instanceType.OriginalDefinition; 91bool isIenumerable = TypeSymbol.Equals(originalType, ienumerable_t, TypeCompareKind.ConsiderEverything2) || HasUniqueInterface(instanceType, ienumerable_t, ref nonUnique, ref useSiteInfo); 92bool isQueryable = TypeSymbol.Equals(originalType, iqueryable_t, TypeCompareKind.ConsiderEverything2) || HasUniqueInterface(instanceType, iqueryable_t, ref nonUnique, ref useSiteInfo); 96private static bool HasUniqueInterface(TypeSymbol instanceType, NamedTypeSymbol interfaceType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 102private static bool HasUniqueInterface(TypeSymbol instanceType, NamedTypeSymbol interfaceType, ref bool nonUnique, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 104TypeSymbol candidate = null; 107if (TypeSymbol.Equals(i.OriginalDefinition, interfaceType, TypeCompareKind.ConsiderEverything2)) 113else if (!TypeSymbol.Equals(candidate, i, TypeCompareKind.ConsiderEverything2)) 124private bool HasCastToQueryProvider(TypeSymbol instanceType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 126var originalType = instanceType.OriginalDefinition; 129bool isIenumerable = TypeSymbol.Equals(originalType, ienumerable, TypeCompareKind.ConsiderEverything2) || HasUniqueInterface(instanceType, ienumerable, ref useSiteInfo); 130bool isQueryable = TypeSymbol.Equals(originalType, iqueryable, TypeCompareKind.ConsiderEverything2) || HasUniqueInterface(instanceType, iqueryable, ref useSiteInfo); 219TypeSymbol type = null; 223foreach (var t in unbound.Data.InferredReturnTypes()) 238TypeSymbol receiverType = receiver?.Type;
Binder\Binder_Statements.cs (36)
237TypeSymbol elementType = GetIteratorElementType().Type; 407var type = boundExpr.Type; 1022TypeSymbol initializerType = initializerOpt?.Type; 1222private bool IsValidFixedVariableInitializer(TypeSymbol declType, ref BoundExpression initializerOpt, BindingDiagnosticBag diagnostics) 1232TypeSymbol initializerType = initializerOpt.Type; 1241TypeSymbol elementType; 1355TypeSymbol elementType, 1356TypeSymbol declType, 1365TypeSymbol pointerType = new PointerTypeSymbol(TypeWithAnnotations.Create(elementType)); 1459var inferredType = op2.Type; 1524TypeSymbol type; 1785TypeSymbol.Equals(sourceProperty.ContainingType, fromMember.ContainingType, TypeCompareKind.AllIgnoreOptions) && 1816private TypeSymbol GetAccessThroughType(BoundExpression receiver) 1837TypeSymbol destinationType, 1932internal BoundExpression GenerateConversionForAssignment(TypeSymbol targetType, BoundExpression expression, BindingDiagnosticBag diagnostics, ConversionForAssignmentFlags flags = ConversionForAssignmentFlags.None) 1935internal BoundExpression GenerateConversionForAssignment(TypeSymbol targetType, BoundExpression expression, BindingDiagnosticBag diagnostics, out Conversion conversion, ConversionForAssignmentFlags flags = ConversionForAssignmentFlags.None) 2015UnboundLambda anonymousFunction, TypeSymbol targetType) 2207var lambdaParameterType = anonymousFunction.ParameterType(i); 2214var delegateParameterType = delegateParameters[i].Type; 2248Conversion conversion, TypeSymbol sourceType, TypeSymbol targetType, ConstantValue sourceConstantValueOpt = null) 2299else if (TypeSymbol.Equals(sourceType, targetType, TypeCompareKind.ConsiderEverything2)) 2320TypeSymbol targetType) 2449var sourceType = operand.Type; 2538var targetElementType = targetElementTypes[i].Type; 2982protected virtual TypeSymbol GetCurrentReturnType(out RefKind refKind) 2989TypeSymbol returnType = symbol.ReturnType; 3024TypeSymbol retType = GetCurrentReturnType(out sigRefKind); 3116var requiredType = IsEffectivelyGenericTaskReturningAsyncMethod() 3147TypeSymbol returnType) 3196&& TypeSymbol.Equals(argument.Type, this.GetCurrentReturnType(out unusedRefKind), TypeCompareKind.ConsiderEverything2)) 3256TypeSymbol type = null; 3275TypeSymbol effectiveType = type.EffectiveType(ref useSiteInfo); 3329else if (TypeSymbol.Equals(previousType, Compilation.GetWellKnownType(WellKnownType.System_Exception), TypeCompareKind.ConsiderEverything2) && 3352Debug.Assert(local.Type.IsErrorType() || (TypeSymbol.Equals(local.Type, type, TypeCompareKind.ConsiderEverything2))); 3467var returnType = GetCurrentReturnType(out returnRefKind);
Binder\Binder_Symbols.cs (34)
185/// Otherwise, call <see cref="Binder.BindTypeOrAlias(ExpressionSyntax, BindingDiagnosticBag, ConsList{TypeSymbol}, bool)"/> instead. 260var type = UnwrapAlias(symbol, diagnostics, syntax) as TypeSymbol; 302internal TypeWithAnnotations BindType(ExpressionSyntax syntax, BindingDiagnosticBag diagnostics, ConsList<TypeSymbol> basesBeingResolved = null, bool suppressUseSiteDiagnostics = false) 311internal TypeWithAnnotations BindType(ExpressionSyntax syntax, BindingDiagnosticBag diagnostics, out AliasSymbol alias, ConsList<TypeSymbol> basesBeingResolved = null) 320internal NamespaceOrTypeOrAliasSymbolWithAnnotations BindTypeOrAlias(ExpressionSyntax syntax, BindingDiagnosticBag diagnostics, ConsList<TypeSymbol> basesBeingResolved = null, bool suppressUseSiteDiagnostics = false) 328(symbol.IsAlias && UnwrapAliasNoDiagnostics(symbol.Symbol, basesBeingResolved) is TypeSymbol)) 353&& containing is not TypeSymbol { IsExtension: true }) 383internal NamespaceOrTypeOrAliasSymbolWithAnnotations BindNamespaceOrTypeSymbol(ExpressionSyntax syntax, BindingDiagnosticBag diagnostics, ConsList<TypeSymbol> basesBeingResolved = null) 393internal NamespaceOrTypeOrAliasSymbolWithAnnotations BindNamespaceOrTypeSymbol(ExpressionSyntax syntax, BindingDiagnosticBag diagnostics, ConsList<TypeSymbol> basesBeingResolved, bool suppressUseSiteDiagnostics) 407/// <see cref="BindQualifiedName(ExpressionSyntax, SimpleNameSyntax, BindingDiagnosticBag, ConsList{TypeSymbol}, bool)"/> 416internal NamespaceOrTypeOrAliasSymbolWithAnnotations BindNamespaceOrTypeOrAliasSymbol(ExpressionSyntax syntax, BindingDiagnosticBag diagnostics, ConsList<TypeSymbol> basesBeingResolved, bool suppressUseSiteDiagnostics) 639ConsList<TypeSymbol> basesBeingResolved, 684private TypeSymbol BindTupleType(TupleTypeSyntax syntax, BindingDiagnosticBag diagnostics, ConsList<TypeSymbol> basesBeingResolved) 828ConsList<TypeSymbol> basesBeingResolved, 855ConsList<TypeSymbol> basesBeingResolved, 919if (aliasTarget is TypeSymbol type) 1092private static Symbol UnwrapAliasNoDiagnostics(Symbol symbol, ConsList<TypeSymbol> basesBeingResolved = null) 1102private NamespaceOrTypeOrAliasSymbolWithAnnotations UnwrapAlias(in NamespaceOrTypeOrAliasSymbolWithAnnotations symbol, BindingDiagnosticBag diagnostics, SyntaxNode syntax, ConsList<TypeSymbol> basesBeingResolved = null) 1113private NamespaceOrTypeOrAliasSymbolWithAnnotations UnwrapAlias(in NamespaceOrTypeOrAliasSymbolWithAnnotations symbol, out AliasSymbol alias, BindingDiagnosticBag diagnostics, SyntaxNode syntax, ConsList<TypeSymbol> basesBeingResolved = null) 1124private Symbol UnwrapAlias(Symbol symbol, BindingDiagnosticBag diagnostics, SyntaxNode syntax, ConsList<TypeSymbol> basesBeingResolved = null) 1130private Symbol UnwrapAlias(Symbol symbol, out AliasSymbol alias, BindingDiagnosticBag diagnostics, SyntaxNode syntax, ConsList<TypeSymbol> basesBeingResolved = null) 1139var type = result as TypeSymbol; 1161ConsList<TypeSymbol> basesBeingResolved, 1269ConsList<TypeSymbol> basesBeingResolved, 1345private ImmutableArray<TypeWithAnnotations> BindTypeArguments(SeparatedSyntaxList<TypeSyntax> typeArguments, BindingDiagnosticBag diagnostics, ConsList<TypeSymbol> basesBeingResolved = null) 1357private TypeWithAnnotations BindTypeArgument(TypeSyntax typeArgument, BindingDiagnosticBag diagnostics, ConsList<TypeSymbol> basesBeingResolved = null) 1531ArrayBuilder<Symbol> members, TypeSymbol receiverType, 1581ConsList<TypeSymbol> basesBeingResolved, 1613ConsList<TypeSymbol> basesBeingResolved, 2257var singleType = singleResult as TypeSymbol;
Binder\Binder_TupleOperators.cs (15)
33TypeSymbol resultType = GetSpecialType(SpecialType.System_Boolean, diagnostics, node); 40TypeSymbol convertedType = isRight ? @operator.RightConvertedTypeOpt : @operator.LeftConvertedTypeOpt; 85TypeSymbol leftType = left.Type; 86TypeSymbol rightType = right.Type; 125private void PrepareBoolConversionAndTruthOperator(TypeSymbol type, BinaryExpressionSyntax node, BinaryOperatorKind binaryOperator, BindingDiagnosticBag diagnostics, 131TypeSymbol boolean = GetSpecialType(SpecialType.System_Boolean, diagnostics, node); 194TypeSymbol dynamicType = hasError ? CreateErrorType() : Compilation.DynamicType; 251TypeSymbol leftTupleType = MakeConvertedType(operators.SelectAsArray(o => o.LeftConvertedTypeOpt), node.Left, leftParts, leftNames, isNullable, compilation, diagnostics); 252TypeSymbol rightTupleType = MakeConvertedType(operators.SelectAsArray(o => o.RightConvertedTypeOpt), node.Right, rightParts, rightNames, isNullable, compilation, diagnostics); 325internal static BoundExpression GiveTupleTypeToDefaultLiteralIfNeeded(BoundExpression expr, TypeSymbol targetType) 356TypeSymbol type = expr.Type; 383TypeSymbol tupleType = expr.Type.StrippedType(); 395private TypeSymbol MakeConvertedType(ImmutableArray<TypeSymbol> convertedTypes, CSharpSyntaxNode syntax, 399foreach (var convertedType in convertedTypes)
Binder\Binder_Unsafe.cs (2)
27internal bool ReportUnsafeIfNotAllowed(SyntaxNode node, BindingDiagnosticBag diagnostics, TypeSymbol sizeOfTypeOpt = null) 53private CSDiagnosticInfo GetUnsafeDiagnosticInfo(TypeSymbol sizeOfTypeOpt)
Binder\Binder_WithExpression.cs (1)
20var receiverType = receiver.Type;
Binder\BuckStopsHereBinder.cs (3)
67internal override bool IsAccessibleHelper(Symbol symbol, TypeSymbol accessThroughType, out bool failedThroughTypeCheck, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, ConsList<TypeSymbol> basesBeingResolved) 204internal override BoundSwitchExpressionArm BindSwitchExpressionArm(SwitchExpressionArmSyntax node, TypeSymbol switchGoverningType, BindingDiagnosticBag diagnostics)
Binder\CollectionInitializerAddMethodBinder.cs (2)
15public TypeSymbol CollectionType { get; } 17internal CollectionInitializerAddMethodBinder(SyntaxNode syntax, TypeSymbol collectionType, Binder next)
Binder\DecisionDagBuilder.cs (15)
372bool isDerivedType(TypeSymbol possibleDerived, TypeSymbol possibleBase) 397TypeSymbol? type = declaration.DeclaredType?.Type; 424TypeSymbol type = typePattern.DeclaredType.Type; 451TypeSymbol type, 458TypeSymbol inputType = input.Type.StrippedType(); // since a null check has already been done 523var inputType = recursive.DeclaredType?.Type ?? input.Type.StrippedType(); 708var type = rel.Value.Type ?? input.Type; 727private TypeSymbol ErrorType(string name = "") 1540TypeSymbol expressionType, 1541TypeSymbol patternType, 1549static bool isRuntimeSimilar(TypeSymbol expressionType, TypeSymbol patternType) 1556TypeSymbol e1 = array1.ElementType.EnumUnderlyingTypeOrSelf(); 1557TypeSymbol e2 = array2.ElementType.EnumUnderlyingTypeOrSelf();
Binder\ExecutableCodeBinder.cs (1)
140var returnType = iterator.ReturnType;
Binder\ForEachEnumeratorInfo.cs (5)
18public readonly TypeSymbol CollectionType; 25public TypeSymbol ElementType => ElementTypeWithAnnotations.Type; 52TypeSymbol collectionType, 97public TypeSymbol CollectionType; 102public TypeSymbol ElementType => ElementTypeWithAnnotations.Type;
Binder\ForEachLoopBinder.cs (27)
540TypeSymbol getEnumeratorType = getEnumeratorMethod.ReturnType; 610var awaitableType = builder.PatternDisposeInfo is null 638TypeSymbol collectionType, 715TypeSymbol collectionExprType = collectionExpr.Type; 792TypeSymbol collectionExprType = collectionExpr.Type; 860if (!TypeSymbol.IsInlineArrayElementFieldSupported(elementField)) 934TypeSymbol collectionExprType = collectionExpr.Type; 974var unwrappedCollectionExprType = unwrappedCollectionExpr.Type; 1071private EnumeratorResult SatisfiesIEnumerableInterfaces(SyntaxNode collectionSyntax, ref ForEachEnumeratorInfo.Builder builder, BoundExpression collectionExpr, bool isAsync, BindingDiagnosticBag diagnostics, TypeSymbol unwrappedCollectionExprType) 1136TypeSymbol enumeratorType = specificGetEnumeratorMethod.ReturnType; 1221TypeSymbol enumeratorType = builder.GetEnumeratorInfo.Method.ReturnType; 1284bool implementsInterface(TypeSymbol enumeratorType, bool isAsync, BindingDiagnosticBag diagnostics) 1307private ForEachEnumeratorInfo.Builder GetDefaultEnumeratorInfo(SyntaxNode syntax, ForEachEnumeratorInfo.Builder builder, BindingDiagnosticBag diagnostics, TypeSymbol collectionExprType) 1316(TypeSymbol)DynamicTypeSymbol.Instance : 1334TypeSymbol.Equals(builder.GetEnumeratorInfo.Method.ReturnType, this.Compilation.GetSpecialType(SpecialType.System_Collections_IEnumerator), TypeCompareKind.ConsiderEverything2)); 1381private MethodArgumentInfo FindForEachPatternMethod(SyntaxNode syntax, SyntaxNode collectionSyntax, TypeSymbol patternType, string methodName, LookupResult lookupResult, bool warningsOnly, BindingDiagnosticBag diagnostics, bool isAsync) 1448private MethodArgumentInfo PerformForEachPatternOverloadResolution(SyntaxNode syntax, SyntaxNode collectionSyntax, TypeSymbol patternType, ArrayBuilder<MethodSymbol> candidateMethods, bool warningsOnly, BindingDiagnosticBag diagnostics, bool isAsync) 1648TypeSymbol enumeratorType = getEnumeratorMethod.ReturnType; 1761private void ReportEnumerableWarning(SyntaxNode collectionSyntax, BindingDiagnosticBag diagnostics, TypeSymbol enumeratorType, Symbol patternMemberCandidate) 1772internal static bool IsIEnumerable(TypeSymbol type) 1774switch (((TypeSymbol)type.OriginalDefinition).SpecialType) 1784private bool IsIAsyncEnumerable(TypeSymbol type) 1803TypeSymbol type, 1839TypeSymbol type, bool isAsync, CSharpCompilation compilation, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, 1876TypeSymbol.Equals(@interface, result, TypeCompareKind.IgnoreTupleNames)) 1889internal static bool IsIEnumerableT(TypeSymbol type, bool isAsync, CSharpCompilation compilation) 1909private void ReportPatternMemberLookupDiagnostics(SyntaxNode collectionSyntax, LookupResult lookupResult, TypeSymbol patternType, string memberName, bool warningsOnly, BindingDiagnosticBag diagnostics)
Binder\HostObjectModeBinder.cs (5)
22private TypeSymbol GetHostObjectType() 24TypeSymbol result = this.Compilation.GetHostObjectTypeSymbol(); 33LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 35var hostObjectType = GetHostObjectType(); 54var hostObjectType = GetHostObjectType();
Binder\ImportChain.cs (3)
89var typeRef = GetTypeReference((TypeSymbol)namespaceOrType, nsOrType.UsingDirective, moduleBuilder, diagnostics); 121var typeRef = GetTypeReference((TypeSymbol)target, syntax, moduleBuilder, diagnostics); 132private static Cci.ITypeReference GetTypeReference(TypeSymbol type, SyntaxNode syntaxNode, Emit.PEModuleBuilder moduleBuilder, DiagnosticBag diagnostics)
Binder\InContainerBinder.cs (3)
57internal override bool IsAccessibleHelper(Symbol symbol, TypeSymbol accessThroughType, out bool failedThroughTypeCheck, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, ConsList<TypeSymbol> basesBeingResolved) 112LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\InMethodBinder.cs (10)
128TypeSymbol returnType = _methodSymbol.ReturnType; 146RefKind refKind, TypeSymbol returnType, Location errorLocation, BindingDiagnosticBag diagnostics) 150TypeSymbol originalDefinition = returnType.OriginalDefinition; 167if (TypeSymbol.Equals(originalDefinition, compilation.GetWellKnownType(WellKnownType.System_Collections_Generic_IAsyncEnumerable_T), TypeCompareKind.ConsiderEverything) || 168TypeSymbol.Equals(originalDefinition, compilation.GetWellKnownType(WellKnownType.System_Collections_Generic_IAsyncEnumerator_T), TypeCompareKind.ConsiderEverything)) 177internal static bool IsAsyncStreamInterface(CSharpCompilation compilation, RefKind refKind, TypeSymbol returnType) 181TypeSymbol originalDefinition = returnType.OriginalDefinition; 183if (TypeSymbol.Equals(originalDefinition, compilation.GetWellKnownType(WellKnownType.System_Collections_Generic_IAsyncEnumerable_T), TypeCompareKind.ConsiderEverything) || 184TypeSymbol.Equals(originalDefinition, compilation.GetWellKnownType(WellKnownType.System_Collections_Generic_IAsyncEnumerator_T), TypeCompareKind.ConsiderEverything)) 194LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\InSubmissionClassBinder.cs (1)
48LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\LocalScopeBinder.cs (1)
422LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\LockBinder.cs (6)
14using LockTypeInfo = (MethodSymbol EnterScopeMethod, TypeSymbol ScopeType, MethodSymbol ScopeDisposeMethod); 40TypeSymbol? exprType = expr.Type; 75internal static LockTypeInfo? TryFindLockTypeInfo(TypeSymbol lockType, BindingDiagnosticBag diagnostics, SyntaxNode syntax) 86var scopeType = enterScopeMethod.ReturnType; 88!TypeSymbol.Equals(scopeType.ContainingType, lockType, TypeCompareKind.ConsiderEverything)) 110private static MethodSymbol? TryFindPublicVoidParameterlessMethod(TypeSymbol type, string name)
Binder\LockOrUsingBinder.cs (1)
78protected BoundExpression BindTargetExpression(BindingDiagnosticBag diagnostics, Binder originalBinder, TypeSymbol targetTypeOpt = null)
Binder\NameofBinder.cs (1)
60internal override void LookupSymbolsInSingleBinder(LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\PatternExplainer.cs (5)
641private static string SampleValueString(IValueSet remainingValues, TypeSymbol type, bool requireExactType, ref bool unnamedEnumValue) 672var underlyingType = type.EnumUnderlyingTypeOrSelf(); 691private static string ValueString(ConstantValue value, TypeSymbol type, bool requireExactType) 698static bool typeHasExactTypeLiteral(TypeSymbol type) => type.SpecialType switch 714private static string PrimitiveValueString(ConstantValue value, TypeSymbol type)
Binder\Semantics\AccessCheck.cs (21)
41TypeSymbol throughTypeOpt = null) 55TypeSymbol throughTypeOpt, 58ConsList<TypeSymbol> basesBeingResolved = null) 136TypeSymbol throughTypeOpt, 140ConsList<TypeSymbol> basesBeingResolved = null) 223private static bool IsNamedTypeAccessible(NamedTypeSymbol type, Symbol within, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, ConsList<TypeSymbol> basesBeingResolved = null) 301TypeSymbol throughTypeOpt, 305ConsList<TypeSymbol> basesBeingResolved = null) 346TypeSymbol throughTypeOpt, 350ConsList<TypeSymbol> basesBeingResolved = null) 418TypeSymbol throughTypeOpt, 423ConsList<TypeSymbol> basesBeingResolved = null) 461var originalThroughTypeOpt = (object)throughTypeOpt == null ? null : throughTypeOpt.OriginalDefinition as TypeSymbol; 545this TypeSymbol type, 549ConsList<TypeSymbol> basesBeingResolved = null) 565var current = type; 586var next = current.GetNextBaseTypeNoUseSiteDiagnostics(basesBeingResolved, compilation, ref visited); 593current = (TypeSymbol)next.OriginalDefinition; 636static void getBaseInterfaces(TypeSymbol derived, ArrayBuilder<NamedTypeSymbol> baseInterfaces, PooledHashSet<NamedTypeSymbol> interfacesLookedAt, ConsList<TypeSymbol> basesBeingResolved)
Binder\Semantics\BestTypeInferrer.cs (22)
51public static TypeSymbol? InferBestType( 68IEqualityComparer<TypeSymbol> comparer = conversions.IncludeNullability ? Symbols.SymbolEqualityComparer.ConsiderEverything : Symbols.SymbolEqualityComparer.IgnoringNullable; 69HashSet<TypeSymbol> candidateTypes = new HashSet<TypeSymbol>(comparer); 73TypeSymbol? type = expr.GetTypeOrFunctionType(); 96var builder = ArrayBuilder<TypeSymbol>.GetInstance(candidateTypes.Count); 98var result = GetBestType(builder, conversions, ref useSiteInfo); 116public static TypeSymbol? InferBestTypeForConditionalOperator( 132ArrayBuilder<TypeSymbol> candidateTypes = ArrayBuilder<TypeSymbol>.GetInstance(); 177internal static TypeSymbol? GetBestType( 178ArrayBuilder<TypeSymbol> types, 197TypeSymbol? best = null; 201TypeSymbol? type = checkType(types[i]); 213var better = Better(best, type, conversions, ref useSiteInfo); 236TypeSymbol? type = checkType(types[i]); 241TypeSymbol? better = Better(best, type, conversions, ref useSiteInfo); 250static TypeSymbol? checkType(TypeSymbol type) => 259private static TypeSymbol? Better( 260TypeSymbol type1, 261TypeSymbol? type2,
Binder\Semantics\Conversions\Conversion.cs (4)
110CollectionExpressionTypeKind collectionExpressionTypeKind, TypeSymbol elementType, 124internal readonly TypeSymbol ElementType; 130CollectionExpressionTypeKind collectionExpressionTypeKind, TypeSymbol elementType, 547internal CollectionExpressionTypeKind GetCollectionExpressionTypeKind(out TypeSymbol? elementType, out MethodSymbol? constructor, out bool isExpanded)
Binder\Semantics\Conversions\ConversionEasyOut.cs (2)
72public static ConversionKind ClassifyConversion(TypeSymbol source, TypeSymbol target)
Binder\Semantics\Conversions\Conversions.cs (11)
44public override Conversion GetMethodGroupDelegateConversion(BoundMethodGroup source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 131protected override Conversion GetInterpolatedStringConversion(BoundExpression source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 153return (TypeSymbol.Equals(destination, Compilation.GetWellKnownType(WellKnownType.System_IFormattable), TypeCompareKind.ConsiderEverything) || 154TypeSymbol.Equals(destination, Compilation.GetWellKnownType(WellKnownType.System_FormattableString), TypeCompareKind.ConsiderEverything)) 161TypeSymbol targetType, 166var elementType = elementTypeWithAnnotations.Type; 220Conversion convertElement(BoundNode element, TypeSymbol elementType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 232TypeSymbol targetType, 278private static (MethodSymbol, bool isFunctionPointer, CallingConventionInfo callingConventionInfo) GetDelegateInvokeOrFunctionPointerMethodIfAvailable(TypeSymbol type) 300public static bool ReportDelegateOrFunctionPointerMethodGroupDiagnostics(Binder binder, BoundMethodGroup expr, TypeSymbol targetType, BindingDiagnosticBag diagnostics) 507public override Conversion GetStackAllocConversion(BoundStackAllocArrayCreation sourceExpression, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\Semantics\Conversions\ConversionsBase.cs (211)
67public abstract Conversion GetMethodGroupDelegateConversion(BoundMethodGroup source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo); 71public abstract Conversion GetStackAllocConversion(BoundStackAllocArrayCreation sourceExpression, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo); 75protected abstract Conversion GetInterpolatedStringConversion(BoundExpression source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo); 78protected abstract Conversion GetCollectionExpressionConversion(BoundUnconvertedCollectionExpression source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo); 98public Conversion ClassifyImplicitConversionFromExpression(BoundExpression sourceExpression, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 104var sourceType = sourceExpression.Type; 169public Conversion ClassifyImplicitConversionFromType(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 204public Conversion ClassifyImplicitConversionFromTypeWhenNeitherOrBothFunctionTypes(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 234public Conversion ClassifyConversionFromExpressionType(TypeSymbol source, TypeSymbol destination, bool isChecked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 248private static bool TryGetVoidConversion(TypeSymbol source, TypeSymbol destination, out Conversion conversion) 283public Conversion ClassifyConversionFromExpression(BoundExpression sourceExpression, TypeSymbol destination, bool isChecked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, bool forCast = false) 317public Conversion ClassifyConversionFromType(TypeSymbol source, TypeSymbol destination, bool isChecked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, bool forCast = false) 375private Conversion ClassifyConversionFromExpressionForCast(BoundExpression source, TypeSymbol destination, bool isChecked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 429private Conversion ClassifyConversionFromTypeForCast(TypeSymbol source, TypeSymbol destination, bool isChecked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 488public static Conversion FastClassifyConversion(TypeSymbol source, TypeSymbol target) 499public Conversion ClassifyBuiltInConversion(TypeSymbol source, TypeSymbol destination, bool isChecked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 529public Conversion ClassifyStandardConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 541public Conversion ClassifyStandardConversion(BoundExpression sourceExpression, TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 605private Conversion ClassifyStandardImplicitConversion(BoundExpression sourceExpression, TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 695private Conversion ClassifyStandardImplicitConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 701Conversion classifyConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 763private Conversion ClassifyImplicitBuiltInConversionSlow(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 782private Conversion GetImplicitUserDefinedConversion(BoundExpression sourceExpression, TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 788private Conversion GetImplicitUserDefinedConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 793private Conversion ClassifyExplicitBuiltInOnlyConversion(TypeSymbol source, TypeSymbol destination, bool isChecked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, bool forCast) 872private Conversion GetExplicitUserDefinedConversion(BoundExpression sourceExpression, TypeSymbol source, TypeSymbol destination, bool isChecked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 878private Conversion GetExplicitUserDefinedConversion(TypeSymbol source, TypeSymbol destination, bool isChecked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 883private Conversion DeriveStandardExplicitFromOppositeStandardImplicitConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 916var strippedSource = source.StrippedType(); 917var strippedDestination = destination.StrippedType(); 950public bool IsBaseInterface(TypeSymbol baseType, TypeSymbol derivedType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 985public bool IsBaseClass(TypeSymbol derivedType, TypeSymbol baseType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 996for (TypeSymbol b = derivedType.BaseTypeWithDefinitionUseSiteDiagnostics(ref useSiteInfo); (object)b != null; b = b.BaseTypeWithDefinitionUseSiteDiagnostics(ref useSiteInfo)) 1029private Conversion ClassifyImplicitBuiltInConversionFromExpression(BoundExpression sourceExpression, TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1159private Conversion GetImplicitCollectionExpressionConversion(BoundUnconvertedCollectionExpression collectionExpression, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1171if (destination.IsNullableType(out var underlyingDestination)) 1184private Conversion GetSwitchExpressionConversion(BoundExpression source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1213private Conversion GetConditionalExpressionConversion(BoundExpression source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1231private static Conversion ClassifyNullLiteralConversion(BoundExpression source, TypeSymbol destination) 1270private static Conversion ClassifyImplicitConstantExpressionConversion(BoundExpression source, TypeSymbol destination) 1283if (destination.IsNullableType(out var underlyingDestination) && 1293private Conversion ClassifyImplicitTupleLiteralConversion(BoundTupleLiteral source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1307if (destination.IsNullableType(out var underlyingDestination)) 1319private Conversion ClassifyExplicitTupleLiteralConversion(BoundTupleLiteral source, TypeSymbol destination, bool isChecked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, bool forCast) 1335if (destination.IsNullableType(out var underlyingDestination)) 1349internal static bool HasImplicitConstantExpressionConversion(BoundExpression source, TypeSymbol destination) 1401private Conversion ClassifyExplicitOnlyConversionFromExpression(BoundExpression sourceExpression, TypeSymbol destination, bool isChecked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, bool forCast) 1419var sourceType = sourceExpression.Type; 1441private static bool HasImplicitEnumerationConversion(BoundExpression source, TypeSymbol destination) 1467private static LambdaConversionResult IsAnonymousFunctionCompatibleWithDelegate(UnboundLambda anonymousFunction, TypeSymbol type, CSharpCompilation compilation, bool isTargetExpressionTree) 1603var delegateType = type.TypeArgumentsWithAnnotationsNoUseSiteDiagnostics[0].Type; 1617internal bool IsAssignableFromMulticastDelegate(TypeSymbol type, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1624public static LambdaConversionResult IsAnonymousFunctionCompatibleWithType(UnboundLambda anonymousFunction, TypeSymbol type, CSharpCompilation compilation) 1641private static bool HasAnonymousFunctionConversion(BoundExpression source, TypeSymbol destination, CSharpCompilation compilation) 1654internal static CollectionExpressionTypeKind GetCollectionExpressionTypeKind(CSharpCompilation compilation, TypeSymbol destination, out TypeWithAnnotations elementType) 1698static bool implementsSpecialInterface(CSharpCompilation compilation, TypeSymbol targetType, SpecialType specialInterface) 1706internal static bool IsSpanOrListType(CSharpCompilation compilation, TypeSymbol targetType, WellKnownType spanType, [NotNullWhen(true)] out TypeWithAnnotations elementType) 1719internal Conversion ClassifyImplicitUserDefinedConversionForV6SwitchGoverningType(TypeSymbol sourceType, out TypeSymbol switchGoverningType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1751internal Conversion GetCallerLineNumberConversion(TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1756TypeSymbol expectedAttributeType = corLibrary.GetSpecialType(SpecialType.System_Int32); 1776internal bool HasCallerLineNumberConversion(TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1781internal bool HasCallerInfoStringConversion(TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1783TypeSymbol expectedAttributeType = corLibrary.GetSpecialType(SpecialType.System_String); 1788public static bool HasIdentityConversion(TypeSymbol type1, TypeSymbol type2) 1793private static bool HasIdentityConversionInternal(TypeSymbol type1, TypeSymbol type2, bool includeNullability) 1815private bool HasIdentityConversionInternal(TypeSymbol type1, TypeSymbol type2) 1880var type = typeWithAnnotations.Type; 1910public Conversion ConvertExtensionMethodThisArg(TypeSymbol parameterType, TypeSymbol thisType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, bool isMethodGroupConversion) 1920public Conversion ClassifyImplicitExtensionMethodThisArgConversion(BoundExpression sourceExpressionOpt, TypeSymbol sourceType, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, bool isMethodGroupConversion) 2032private static ConversionKind GetNumericConversion(TypeSymbol source, TypeSymbol destination) 2054private static bool HasImplicitNumericConversion(TypeSymbol source, TypeSymbol destination) 2059private static bool HasExplicitNumericConversion(TypeSymbol source, TypeSymbol destination) 2097private static bool IsNumericType(TypeSymbol type) 2121private static bool HasSpecialIntPtrConversion(TypeSymbol source, TypeSymbol target) 2157var s0 = source.StrippedType(); 2158var t0 = target.StrippedType(); 2160TypeSymbol otherType; 2203static bool isIntPtrOrUIntPtr(TypeSymbol type) => 2207private static bool HasExplicitEnumerationConversion(TypeSymbol source, TypeSymbol destination) 2236private Conversion ClassifyImplicitNullableConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2252TypeSymbol unwrappedDestination = destination.GetNullableUnderlyingType(); 2253TypeSymbol unwrappedSource = source.StrippedType(); 2282private Conversion GetImplicitTupleLiteralConversion(BoundTupleLiteral source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2300private Conversion GetExplicitTupleLiteralConversion(BoundTupleLiteral source, TypeSymbol destination, bool isChecked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, bool forCast) 2320TypeSymbol destination, 2358private Conversion ClassifyImplicitTupleConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2377private Conversion ClassifyExplicitTupleConversion(TypeSymbol source, TypeSymbol destination, bool isChecked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, bool forCast) 2397TypeSymbol source, 2398TypeSymbol destination, 2431private Conversion ClassifyExplicitNullableConversion(TypeSymbol source, TypeSymbol destination, bool isChecked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, bool forCast) 2449TypeSymbol unwrappedSource = source.StrippedType(); 2450TypeSymbol unwrappedDestination = destination.StrippedType(); 2486private bool HasCovariantArrayConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2508public bool HasIdentityOrImplicitReferenceConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2521private static bool HasImplicitDynamicConversionFromExpression(TypeSymbol expressionType, TypeSymbol destination) 2530private static bool HasExplicitDynamicConversion(TypeSymbol source, TypeSymbol destination) 2540private bool HasArrayConversionToInterface(ArrayTypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2621internal bool HasImplicitReferenceConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2684private bool HasImplicitConversionToInterface(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2718private bool HasImplicitConversionFromArray(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2759private bool HasImplicitConversionFromDelegate(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2795private bool HasImplicitFunctionTypeConversion(FunctionTypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2806internal bool IsValidFunctionTypeConversionTarget(TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2849public bool HasImplicitTypeParameterConversion(TypeParameterSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2871private bool HasImplicitReferenceTypeParameterConversion(TypeParameterSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2914private bool HasImplicitEffectiveBaseConversion(TypeParameterSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2938private bool HasImplicitEffectiveInterfaceSetConversion(TypeParameterSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2943private bool HasVarianceCompatibleInterfaceInEffectiveInterfaceSet(TypeParameterSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2963private bool HasAnyBaseInterfaceConversion(TypeSymbol derivedType, TypeSymbol baseType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2968private bool ImplementsVarianceCompatibleInterface(TypeSymbol derivedType, TypeSymbol baseType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2994internal bool ImplementsVarianceCompatibleInterface(NamedTypeSymbol derivedType, TypeSymbol baseType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2996return ImplementsVarianceCompatibleInterface((TypeSymbol)derivedType, baseType, ref useSiteInfo); 2999internal bool HasImplicitConversionToOrImplementsVarianceCompatibleInterface(TypeSymbol typeToCheck, NamedTypeSymbol targetInterfaceType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, out bool needSupportForRefStructInterfaces) 3019private bool IsRefLikeOrAllowsRefLikeTypeImplementingVarianceCompatibleInterface(TypeSymbol typeToCheck, NamedTypeSymbol targetInterfaceType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 3043if (expressionToCheck.Type is TypeSymbol typeToCheck && IsRefLikeOrAllowsRefLikeTypeImplementingVarianceCompatibleInterface(typeToCheck, targetInterfaceType, ref useSiteInfo)) 3067private bool HasInterfaceVarianceConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 3086private bool HasDelegateVarianceConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 3147if (!TypeSymbol.Equals(typeSymbol, destination.OriginalDefinition, TypeCompareKind.ConsiderEverything2)) 3170Debug.Assert(TypeSymbol.Equals(source.OriginalDefinition, destination.OriginalDefinition, TypeCompareKind.AllIgnoreOptions)); 3199TypeSymbol.Equals(destinationTypeArgument.Type, sourceTypeArgument.Type, TypeCompareKind.AllNullableIgnoreOptions) && 3248private bool HasImplicitBoxingTypeParameterConversion(TypeParameterSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 3302public bool HasBoxingConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 3363internal static bool HasImplicitPointerToVoidConversion(TypeSymbol source, TypeSymbol destination) 3374internal bool HasImplicitPointerConversion(TypeSymbol? source, TypeSymbol? destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 3431private bool HasIdentityOrReferenceConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 3454private bool HasExplicitReferenceConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 3528private bool HasExplicitReferenceTypeParameterConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 3580private bool HasUnboxingTypeParameterConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 3603if (TypeSymbol.Equals(type, source, TypeCompareKind.ConsiderEverything2)) 3631private bool HasExplicitDelegateConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 3662if (!TypeSymbol.Equals(source.OriginalDefinition, destination.OriginalDefinition, TypeCompareKind.ConsiderEverything2)) 3686var sourceArg = sourceTypeArguments[i].Type; 3687var destinationArg = destinationTypeArguments[i].Type; 3720private bool HasExplicitArrayConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 3781var specialDefinition = ((TypeSymbol)source.OriginalDefinition).SpecialType; 3789var sourceElement = ((NamedTypeSymbol)source).TypeArgumentWithDefinitionUseSiteDiagnostics(0, ref useSiteInfo).Type; 3790var destinationElement = destinationArray.ElementType; 3812private bool HasUnboxingConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 3880private static bool HasPointerToPointerConversion(TypeSymbol source, TypeSymbol destination) 3888private static bool HasPointerToIntegerConversion(TypeSymbol source, TypeSymbol destination) 3906private static bool HasIntegerToPointerConversion(TypeSymbol source, TypeSymbol destination) 3920private static bool IsIntegerTypeSupportingPointerConversions(TypeSymbol type) 3951private bool HasImplicitSpanConversion(TypeSymbol? source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 4014private bool HasExplicitSpanConversion(TypeSymbol? source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 4035private bool IgnoreUserDefinedSpanConversions(TypeSymbol? source, TypeSymbol? target)
Binder\Semantics\Conversions\TypeConversions.cs (4)
36public override Conversion GetMethodGroupDelegateConversion(BoundMethodGroup source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 48public override Conversion GetStackAllocConversion(BoundStackAllocArrayCreation sourceExpression, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 54protected override Conversion GetInterpolatedStringConversion(BoundExpression source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 60protected override Conversion GetCollectionExpressionConversion(BoundUnconvertedCollectionExpression source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\Semantics\Conversions\UserDefinedConversionAnalysis.cs (8)
21public readonly TypeSymbol FromType; 22public readonly TypeSymbol ToType; 35TypeSymbol fromType, 36TypeSymbol toType) 53TypeSymbol fromType, 54TypeSymbol toType) 72TypeSymbol fromType, 73TypeSymbol toType)
Binder\Semantics\Conversions\UserDefinedConversions.cs (2)
17public static void AddTypesParticipatingInUserDefinedConversion(ArrayBuilder<(NamedTypeSymbol ParticipatingType, TypeParameterSymbol? ConstrainedToTypeOpt)> result, TypeSymbol type, bool includeBaseTypes, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 114static void addFromClassOrStruct(ArrayBuilder<(NamedTypeSymbol ParticipatingType, TypeParameterSymbol? ConstrainedToTypeOpt)> result, bool excludeExisting, TypeSymbol type, bool includeBaseTypes, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\Semantics\Conversions\UserDefinedExplicitConversions.cs (28)
22TypeSymbol source, 23TypeSymbol target, 52TypeSymbol sx = MostSpecificSourceTypeForExplicitUserDefinedConversion(u, sourceExpression, source, ref useSiteInfo); 59TypeSymbol tx = MostSpecificTargetTypeForExplicitUserDefinedConversion(u, target, ref useSiteInfo); 74private static void ComputeUserDefinedExplicitConversionTypeSet(TypeSymbol source, TypeSymbol target, ArrayBuilder<(NamedTypeSymbol ParticipatingType, TypeParameterSymbol ConstrainedToTypeOpt)> d, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 87TypeSymbol source, 88TypeSymbol target, 130TypeSymbol source, 131TypeSymbol target, 143TypeSymbol source, 144TypeSymbol target, 271TypeSymbol convertsFrom = op.GetParameterType(0); 272TypeSymbol convertsTo = op.ReturnType; 323TypeSymbol nullableFrom = MakeNullableType(convertsFrom); 324TypeSymbol nullableTo = convertsTo.IsValidNullableTypeArgument() ? MakeNullableType(convertsTo) : convertsTo; 369private TypeSymbol MostSpecificSourceTypeForExplicitUserDefinedConversion( 372TypeSymbol source, 407if (u.Any(static (conv, source) => TypeSymbol.Equals(conv.FromType, source, TypeCompareKind.ConsiderEverything2), source)) 416var result = MostEncompassedType(u, isValid, conv => conv.FromType, ref inLambdaUseSiteInfo); 427private TypeSymbol MostSpecificTargetTypeForExplicitUserDefinedConversion( 429TypeSymbol target, 461if (u.Any(static (conv, target) => TypeSymbol.Equals(conv.ToType, target, TypeCompareKind.ConsiderEverything2), target)) 470var result = MostEncompassingType(u, isValid, conv => conv.ToType, ref inLambdaUseSiteInfo); 479private Conversion EncompassingExplicitConversion(BoundExpression expr, TypeSymbol a, TypeSymbol b, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 502private Conversion EncompassingExplicitConversion(TypeSymbol a, TypeSymbol b, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\Semantics\Conversions\UserDefinedImplicitConversions.cs (50)
27TypeSymbol source, 28TypeSymbol target, 96TypeSymbol sx = MostSpecificSourceTypeForImplicitUserDefinedConversion(u, source, ref useSiteInfo); 103TypeSymbol tx = MostSpecificTargetTypeForImplicitUserDefinedConversion(u, target, ref useSiteInfo); 118private static void ComputeUserDefinedImplicitConversionTypeSet(TypeSymbol s, TypeSymbol t, ArrayBuilder<(NamedTypeSymbol ParticipatingType, TypeParameterSymbol ConstrainedToTypeOpt)> d, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 144TypeSymbol source, 145TypeSymbol target, 283TypeSymbol source, 284TypeSymbol target, 300TypeSymbol convertsFrom = op.GetParameterType(0); 301TypeSymbol convertsTo = op.ReturnType; 348TypeSymbol nullableFrom = MakeNullableType(convertsFrom); 349TypeSymbol nullableTo = convertsTo.IsValidNullableTypeArgument() ? MakeNullableType(convertsTo) : convertsTo; 365private TypeSymbol MostSpecificSourceTypeForImplicitUserDefinedConversion(ImmutableArray<UserDefinedConversionAnalysis> u, TypeSymbol source, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 370if (u.Any(static (conv, source) => TypeSymbol.Equals(conv.FromType, source, TypeCompareKind.ConsiderEverything2), source)) 381private TypeSymbol MostSpecificTargetTypeForImplicitUserDefinedConversion(ImmutableArray<UserDefinedConversionAnalysis> u, TypeSymbol target, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 404if (u.Any(static (conv, target) => TypeSymbol.Equals(conv.ToType, target, TypeCompareKind.ConsiderEverything2), target)) 415if (!TypeSymbol.Equals(conv.FromType, conv.Operator.GetParameterType(0), TypeCompareKind.ConsiderEverything2)) 420if (!TypeSymbol.Equals(conv.ToType, conv.Operator.ReturnType, TypeCompareKind.ConsiderEverything2)) 428private static int? MostSpecificConversionOperator(TypeSymbol sx, TypeSymbol tx, ImmutableArray<UserDefinedConversionAnalysis> u) 430return MostSpecificConversionOperator(conv => TypeSymbol.Equals(conv.FromType, sx, TypeCompareKind.ConsiderEverything2) && TypeSymbol.Equals(conv.ToType, tx, TypeCompareKind.ConsiderEverything2), u); 575private bool IsEncompassedBy(BoundExpression aExpr, TypeSymbol a, TypeSymbol b, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 589private bool IsEncompassedBy(TypeSymbol a, TypeSymbol b, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 594private Conversion EncompassingImplicitConversion(BoundExpression aExpr, TypeSymbol a, TypeSymbol b, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 609private Conversion EncompassingImplicitConversion(TypeSymbol a, TypeSymbol b, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 689private TypeSymbol MostEncompassedType<T>( 691Func<T, TypeSymbol> extract, 697private TypeSymbol MostEncompassedType<T>( 700Func<T, TypeSymbol> extract, 731TypeSymbol leftType = extract(left); 732TypeSymbol rightType = extract(right); 733if (TypeSymbol.Equals(leftType, rightType, TypeCompareKind.ConsiderEverything2)) 751private TypeSymbol MostEncompassingType<T>( 753Func<T, TypeSymbol> extract, 759private TypeSymbol MostEncompassingType<T>( 762Func<T, TypeSymbol> extract, 770TypeSymbol leftType = extract(left); 771TypeSymbol rightType = extract(right); 772if (TypeSymbol.Equals(leftType, rightType, TypeCompareKind.ConsiderEverything2)) 885private NamedTypeSymbol MakeNullableType(TypeSymbol type) 894protected UserDefinedConversionResult AnalyzeImplicitUserDefinedConversionForV6SwitchGoverningType(TypeSymbol source, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\Semantics\Operators\BinaryOperatorEasyOut.cs (4)
255public static BinaryOperatorKind OpKind(BinaryOperatorKind kind, TypeSymbol left, TypeSymbol right) 288var leftType = left.Type; 294var rightType = right.Type;
Binder\Semantics\Operators\BinaryOperatorOverloadResolution.cs (39)
67TypeSymbol leftOperatorSourceOpt = left.Type?.StrippedType(); 68TypeSymbol rightOperatorSourceOpt = right.Type?.StrippedType(); 127var lookedInInterfaces = PooledDictionary<TypeSymbol, bool>.GetInstance(); 129TypeSymbol firstOperatorSourceOpt; 130TypeSymbol secondOperatorSourceOpt; 210TypeSymbol operatorSourceOpt, bool sourceIsInterface, 212Dictionary<TypeSymbol, bool> lookedInInterfaces, ArrayBuilder<BinaryOperatorAnalysisResult> candidates) 223TypeSymbol constrainedToTypeOpt = null; 305private void AddDelegateOperation(BinaryOperatorKind kind, TypeSymbol delegateType, 360var leftType = left.Type; 362var rightType = right.Type; 380TypeSymbol systemDelegateType = _binder.Compilation.GetSpecialType(SpecialType.System_Delegate); 452TypeSymbol delegateType = leftDelegate ? leftType : rightType; 464private void GetEnumOperation(BinaryOperatorKind kind, TypeSymbol enumType, BoundExpression right, ArrayBuilder<BinaryOperatorSignature> operators) 504bool isExactSubtraction = TypeSymbol.Equals(right.Type?.StrippedType(), underlying, TypeCompareKind.ConsiderEverything2); 608var leftType = left.Type; 614var rightType = right.Type; 777Conversion getOperandConversionForAllowByRefLikeNullCheck(bool isChecked, BoundExpression operand, TypeSymbol objectType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 847static bool equalsIgnoringNullable(TypeSymbol a, TypeSymbol b) => a.Equals(b, TypeCompareKind.AllNullableIgnoreOptions); 848static bool equalsIgnoringNullableAndDynamic(TypeSymbol a, TypeSymbol b) => a.Equals(b, TypeCompareKind.AllNullableIgnoreOptions | TypeCompareKind.IgnoreDynamic); 854TypeSymbol type0, 917TypeSymbol constrainedToTypeOpt, 959void getDeclaredOperators(TypeSymbol constrainedToTypeOpt, NamedTypeSymbol type, BinaryOperatorKind kind, string name, ArrayBuilder<BinaryOperatorSignature> operators) 972TypeSymbol leftOperandType = op.GetParameterType(0); 973TypeSymbol rightOperandType = op.GetParameterType(1); 974TypeSymbol resultType = op.ReturnType; 982void addLiftedOperators(TypeSymbol constrainedToTypeOpt, BinaryOperatorKind kind, ArrayBuilder<BinaryOperatorSignature> operators) 987TypeSymbol leftOperandType = op.GetParameterType(0); 988TypeSymbol rightOperandType = op.GetParameterType(1); 989TypeSymbol resultType = op.ReturnType; 1016private static LiftingResult UserDefinedBinaryOperatorCanBeLifted(TypeSymbol left, TypeSymbol right, TypeSymbol result, BinaryOperatorKind kind) 1045if (!TypeSymbol.Equals(left, right, TypeCompareKind.ConsiderEverything2)) return LiftingResult.NotLifted; 1322TypeSymbol op1Left, op1Right, op2Left, op2Right; 1357using var uninst1 = TemporaryArray<TypeSymbol>.Empty; 1358using var uninst2 = TemporaryArray<TypeSymbol>.Empty;
Binder\Semantics\Operators\BinaryOperatorSignature.cs (14)
18public readonly TypeSymbol LeftType; 19public readonly TypeSymbol RightType; 20public readonly TypeSymbol ReturnType; 22public readonly TypeSymbol ConstrainedToTypeOpt; 32public BinaryOperatorSignature(BinaryOperatorKind kind, TypeSymbol leftType, TypeSymbol rightType, TypeSymbol returnType) 43public BinaryOperatorSignature(BinaryOperatorKind kind, TypeSymbol leftType, TypeSymbol rightType, TypeSymbol returnType, MethodSymbol method, TypeSymbol constrainedToTypeOpt) 63TypeSymbol.Equals(this.LeftType, other.LeftType, TypeCompareKind.ConsiderEverything2) && 64TypeSymbol.Equals(this.RightType, other.RightType, TypeCompareKind.ConsiderEverything2) && 65TypeSymbol.Equals(this.ReturnType, other.ReturnType, TypeCompareKind.ConsiderEverything2) &&
Binder\Semantics\Operators\OperatorFacts.cs (1)
15public static bool DefinitelyHasNoUserDefinedOperators(TypeSymbol type)
Binder\Semantics\Operators\UnaryOperatorEasyOut.cs (2)
84public static UnaryOperatorKind OpKind(UnaryOperatorKind kind, TypeSymbol operand) 99var operandType = operand.Type;
Binder\Semantics\Operators\UnaryOperatorOverloadResolution.cs (11)
18private NamedTypeSymbol MakeNullable(TypeSymbol type) 296var enumType = operand.Type; 379TypeSymbol type0 = operand.Type.StrippedType(); 380TypeSymbol constrainedToTypeOpt = type0 as TypeParameterSymbol; 473TypeSymbol constrainedToTypeOpt, 515static void getDeclaredOperators(TypeSymbol constrainedToTypeOpt, NamedTypeSymbol type, UnaryOperatorKind kind, string name, ArrayBuilder<UnaryOperatorSignature> operators) 528TypeSymbol operandType = op.GetParameterType(0); 529TypeSymbol resultType = op.ReturnType; 537void addLiftedOperators(TypeSymbol constrainedToTypeOpt, UnaryOperatorKind kind, ArrayBuilder<UnaryOperatorSignature> operators) 557TypeSymbol operandType = op.GetParameterType(0); 558TypeSymbol resultType = op.ReturnType;
Binder\Semantics\Operators\UnaryOperatorSignature.cs (8)
18public readonly TypeSymbol ConstrainedToTypeOpt; 19public readonly TypeSymbol OperandType; 20public readonly TypeSymbol ReturnType; 23public UnaryOperatorSignature(UnaryOperatorKind kind, TypeSymbol operandType, TypeSymbol returnType) 32public UnaryOperatorSignature(UnaryOperatorKind kind, TypeSymbol operandType, TypeSymbol returnType, MethodSymbol method, TypeSymbol constrainedToTypeOpt)
Binder\Semantics\OverloadResolution\MethodTypeInference.cs (50)
509TypeSymbol.Equals(typeParameter, _methodTypeParameters[ordinal], TypeCompareKind.ConsiderEverything2) && 558private TypeSymbol GetFixedDelegateOrFunctionPointer(TypeSymbol delegateOrFunctionPointerType) 668TypeSymbol targetType = target.Type; 1008private static bool DoesInputTypeContain(BoundExpression argument, TypeSymbol formalParameterType, TypeParameterSymbol typeParameter) 1014var delegateOrFunctionPointerType = formalParameterType.GetDelegateOrFunctionPointerType(); 1044private bool HasUnfixedParamInInputType(BoundExpression pSource, TypeSymbol pDest) 1063private static bool DoesOutputTypeContain(BoundExpression argument, TypeSymbol formalParameterType, 1070var delegateOrFunctionPointerType = formalParameterType.GetDelegateOrFunctionPointerType(); 1095var returnType = method.ReturnType; 1104private bool HasUnfixedParamInOutputType(BoundExpression argument, TypeSymbol formalParameterType) 1144var formalParameterType = _formalParameterTypes[iArg].Type; 1436private bool MethodGroupReturnTypeInference(Binder binder, BoundExpression source, TypeSymbol target, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1451var delegateOrFunctionPointerType = target.GetDelegateOrFunctionPointerType(); 1737private bool ExactSpanInference(TypeSymbol source, TypeSymbol target, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1764private static TypeWithAnnotations GetSpanElementType(TypeSymbol type) 1770private static TypeWithAnnotations GetSpanOrSZArrayElementType(TypeSymbol type) 1877if (!TypeSymbol.Equals(namedSource.OriginalDefinition, namedTarget.OriginalDefinition, TypeCompareKind.ConsiderEverything2)) 1944Debug.Assert(TypeSymbol.Equals(source.OriginalDefinition, target.OriginalDefinition, TypeCompareKind.ConsiderEverything2)); 2076private static TypeWithAnnotations GetMatchingElementType(ArrayTypeSymbol source, TypeSymbol target, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2111private bool LowerBoundArrayInference(TypeSymbol source, TypeSymbol target, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2149private bool LowerBoundSpanInference(TypeSymbol source, TypeSymbol target, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2192private bool LowerBoundConstructedInference(TypeSymbol source, TypeSymbol target, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2219TypeSymbol.Equals(constructedSource.OriginalDefinition, constructedTarget.OriginalDefinition, TypeCompareKind.ConsiderEverything2)) 2256private bool LowerBoundClassInference(TypeSymbol source, NamedTypeSymbol target, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2291if (TypeSymbol.Equals(sourceBase.OriginalDefinition, target.OriginalDefinition, TypeCompareKind.ConsiderEverything2)) 2301private bool LowerBoundInterfaceInference(TypeSymbol source, NamedTypeSymbol target, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2386Debug.Assert(TypeSymbol.Equals(source.OriginalDefinition, target.OriginalDefinition, TypeCompareKind.ConsiderEverything2)); 2425private bool LowerBoundFunctionPointerTypeInference(TypeSymbol source, TypeSymbol target, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2597var source = sourceWithAnnotations.Type; 2598var target = targetWithAnnotations.Type; 2619TypeSymbol.Equals(constructedSource.OriginalDefinition, target.OriginalDefinition, TypeCompareKind.ConsiderEverything2)) 2653private bool UpperBoundClassInference(NamedTypeSymbol source, TypeSymbol target, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2670if (TypeSymbol.Equals(targetBase.OriginalDefinition, source.OriginalDefinition, TypeCompareKind.ConsiderEverything2)) 2682private bool UpperBoundInterfaceInference(NamedTypeSymbol source, TypeSymbol target, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2736Debug.Assert(TypeSymbol.Equals(source.OriginalDefinition, target.OriginalDefinition, TypeCompareKind.ConsiderEverything2)); 2775private bool UpperBoundFunctionPointerTypeInference(TypeSymbol source, TypeSymbol target, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 3023static bool isExpressionType(TypeSymbol? type) 3039var source = sourceWithAnnotations.Type; 3040var destination = destinationWithAnnotations.Type; 3161if (TypeSymbol.Equals(currentInterface.OriginalDefinition, target.OriginalDefinition, TypeCompareKind.ConsiderEverything)) 3167else if (!TypeSymbol.Equals(matchingInterface, currentInterface, TypeCompareKind.ConsiderEverything)) 3306TypeSymbol source = argument.Type; 3351private static bool IsReallyAType(TypeSymbol? type)
Binder\Semantics\OverloadResolution\OverloadResolution.cs (75)
146TypeSymbol returnType = null, 194TypeSymbol returnType = null, 435TypeSymbol returnType, 851TypeSymbol returnType, 1324public static bool TryInferParamsCollectionIterationType(Binder binder, TypeSymbol type, out TypeWithAnnotations elementType) 1486bool typeArgumentsAccessible(ImmutableArray<TypeSymbol> typeArguments, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1488foreach (TypeSymbol arg in typeArguments) 1619private static bool IsLessDerivedThanAny<TMember>(int index, TypeSymbol type, ArrayBuilder<MemberResolutionResult<TMember>> results, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2199var type1 = getParameterTypeAndRefKind(i, m1.Result, m1LeastOverriddenParameters, m1.Result.ParamsElementTypeOpt, m1.LeastOverriddenMember, out RefKind parameter1RefKind); 2201var type2 = getParameterTypeAndRefKind(i, m2.Result, m2LeastOverriddenParameters, m2.Result.ParamsElementTypeOpt, m2.LeastOverriddenMember, out RefKind parameter2RefKind); 2217var type1Normalized = type1; 2218var type2Normalized = type2; 2341var type1 = getParameterTypeAndRefKind(i, m1.Result, m1LeastOverriddenParameters, m1.Result.ParamsElementTypeOpt, m1.LeastOverriddenMember, out _); 2343var type2 = getParameterTypeAndRefKind(i, m2.Result, m2LeastOverriddenParameters, m2.Result.ParamsElementTypeOpt, m2.LeastOverriddenMember, out _); 2345var type1Normalized = type1; 2346var type2Normalized = type2; 2485using (var uninst1 = TemporaryArray<TypeSymbol>.Empty) 2486using (var uninst2 = TemporaryArray<TypeSymbol>.Empty) 2573TypeSymbol t1 = m1LeastOverriddenParameters[^1].Type; 2574TypeSymbol t2 = m2LeastOverriddenParameters[^1].Type; 2590static TypeSymbol getParameterTypeAndRefKind(int i, MemberAnalysisResult memberResolutionResult, ImmutableArray<ParameterSymbol> parameters, 2597var type = parameter.Type; 2733private static BetterResult MoreSpecificType(ref TemporaryArray<TypeSymbol> t1, ref TemporaryArray<TypeSymbol> t2, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2765private static BetterResult MoreSpecificType(TypeSymbol t1, TypeSymbol t2, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2842using var allTypeArgs1 = TemporaryArray<TypeSymbol>.Empty; 2843using var allTypeArgs2 = TemporaryArray<TypeSymbol>.Empty; 2853private BetterResult BetterConversionFromExpression(BoundExpression node, TypeSymbol t1, TypeSymbol t2, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2869TypeSymbol t1, 2872TypeSymbol t2, 2923private BetterResult BetterConversionFromExpression(BoundExpression node, TypeSymbol t1, Conversion conv1, TypeSymbol t2, Conversion conv2, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, out bool okToDowngradeToNeither) 3032TypeSymbol t1, Conversion conv1, 3033TypeSymbol t2, Conversion conv2, 3036var kind1 = conv1.GetCollectionExpressionTypeKind(out TypeSymbol elementType1, out _, out _); 3037var kind2 = conv2.GetCollectionExpressionTypeKind(out TypeSymbol elementType2, out _, out _); 3066TypeSymbol t1, CollectionExpressionTypeKind kind1, TypeSymbol elementType1, ImmutableArray<Conversion> underlyingElementConversions1, 3067TypeSymbol t2, CollectionExpressionTypeKind kind2, TypeSymbol elementType2, ImmutableArray<Conversion> underlyingElementConversions2, 3173TypeSymbol t1, CollectionExpressionTypeKind kind1, TypeSymbol elementType1, 3174TypeSymbol t2, CollectionExpressionTypeKind kind2, TypeSymbol elementType2, 3204bool hasImplicitConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) => 3208private BetterResult BetterParamsCollectionType(TypeSymbol t1, TypeSymbol t2, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 3230private static bool IsSZArrayOrArrayInterface(TypeSymbol type, out TypeSymbol elementType) 3248private bool ExpressionMatchExactly(BoundExpression node, TypeSymbol t, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 3272TypeSymbol y; 3364private bool ExpressionMatchExactly(BoundTupleLiteral tupleSource, TypeSymbol targetType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 3435TypeSymbol type1, 3436TypeSymbol type2, 3451TypeSymbol type1, 3453TypeSymbol type2, 3463TypeSymbol type1, 3465TypeSymbol type2, 3563TypeSymbol r1 = invoke1.ReturnType; 3564TypeSymbol r2 = invoke2.ReturnType; 3639static bool isBetterSpanConversionTarget(TypeSymbol type1, TypeSymbol type2) 3644var type1Element = ((NamedTypeSymbol)type1).TypeArgumentsWithAnnotationsNoUseSiteDiagnostics[0].Type; 3645var type2Element = ((NamedTypeSymbol)type2).TypeArgumentsWithAnnotationsNoUseSiteDiagnostics[0].Type; 3667private bool CanDowngradeConversionFromLambdaToNeither(BetterResult currentResult, UnboundLambda lambda, TypeSymbol type1, TypeSymbol type2, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, bool fromTypeAnalysis) 3696TypeSymbol r1 = invoke1.ReturnType; 3697TypeSymbol r2 = invoke2.ReturnType; 3791private static bool IsSignedIntegralType(TypeSymbol type) 3812private static bool IsUnsignedIntegralType(TypeSymbol type) 4675TypeSymbol parameterType, 4708var argType = argument.Type;
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (7)
203TypeSymbol delegateOrFunctionPointerType = null, 646TypeSymbol delegateOrFunctionPointerType) 697private bool HadReturnMismatch(Location location, BindingDiagnosticBag diagnostics, TypeSymbol delegateOrFunctionPointerType) 1056TypeSymbol formalParameterType = method.GetParameterType(result.Result.BadParameter); 1214TypeSymbol parameterType = unwrapIfParamsCollection(badArg, parameter, isLastParameter) is TypeSymbol t ? t : parameter.Type; 1328if (argument.Display is TypeSymbol argType)
Binder\SwitchBinder.cs (3)
48protected TypeSymbol SwitchGoverningType => SwitchGoverningExpression.Type; 380var switchGoverningType = switchGoverningExpression.Type; 410TypeSymbol resultantGoverningType;
Binder\SwitchExpressionArmBinder.cs (2)
32TypeSymbol inputType = _switchExpressionBinder.GetInputType(); 36internal override BoundSwitchExpressionArm BindSwitchExpressionArm(SwitchExpressionArmSyntax node, TypeSymbol switchGoverningType, BindingDiagnosticBag diagnostics)
Binder\SwitchExpressionBinder.cs (8)
33TypeSymbol? naturalType = InferResultType(switchArms, diagnostics); 139private TypeSymbol? InferResultType(ImmutableArray<BoundSwitchExpressionArm> switchCases, BindingDiagnosticBag diagnostics) 141var seenTypes = Symbols.SpecializedSymbolCollections.GetPooledSymbolHashSetInstance<TypeSymbol>(); 142var typesInOrder = ArrayBuilder<TypeSymbol>.GetInstance(); 145var type = @case.Value.Type; 154var commonType = BestTypeInferrer.GetBestType(typesInOrder, Conversions, ref useSiteInfo); 178TypeSymbol inputType = GetInputType(inputExpression); 190internal TypeSymbol GetInputType(BoundExpression? inputExpression = null)
Binder\UsingStatementBinder.cs (4)
111TypeSymbol? declarationTypeOpt = null; 113TypeSymbol? awaitableTypeOpt; 184bool bindDisposable(bool fromExpression, out MethodArgumentInfo? patternDisposeInfo, out TypeSymbol? awaitableType) 189TypeSymbol? type = fromExpression ? expressionOpt!.Type : declarationTypeOpt;
Binder\WithClassTypeParametersBinder.cs (2)
30internal override bool IsAccessibleHelper(Symbol symbol, TypeSymbol accessThroughType, out bool failedThroughTypeCheck, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, ConsList<TypeSymbol> basesBeingResolved)
Binder\WithExtensionParameterBinder.cs (1)
37LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\WithExternAliasesBinder.cs (1)
33LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\WithExternAndUsingAliasesBinder.cs (5)
34protected abstract ImmutableDictionary<string, AliasAndUsingDirective> GetUsingAliasesMap(ConsList<TypeSymbol>? basesBeingResolved); 37LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 84internal bool IsUsingAlias(string name, bool callerIsSemanticModel, ConsList<TypeSymbol>? basesBeingResolved) 151protected override ImmutableDictionary<string, AliasAndUsingDirective> GetUsingAliasesMap(ConsList<TypeSymbol>? basesBeingResolved) 255protected override ImmutableDictionary<string, AliasAndUsingDirective> GetUsingAliasesMap(ConsList<TypeSymbol>? basesBeingResolved)
Binder\WithLambdaParametersBinder.cs (2)
47protected override TypeSymbol GetCurrentReturnType(out RefKind refKind) 87LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\WithParametersBinder.cs (1)
46LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\WithPrimaryConstructorParametersBinder.cs (1)
64LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\WithTypeParametersBinder.cs (1)
38LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\WithUsingNamespacesAndTypesBinder.cs (6)
35internal abstract ImmutableArray<NamespaceOrTypeAndUsingDirective> GetUsings(ConsList<TypeSymbol>? basesBeingResolved); 158LookupResult result, string name, int arity, ConsList<TypeSymbol>? basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 308internal override ImmutableArray<NamespaceOrTypeAndUsingDirective> GetUsings(ConsList<TypeSymbol>? basesBeingResolved) 338internal override ImmutableArray<NamespaceOrTypeAndUsingDirective> GetUsings(ConsList<TypeSymbol>? basesBeingResolved) 343private Imports GetImports(ConsList<TypeSymbol>? basesBeingResolved) 372internal override ImmutableArray<NamespaceOrTypeAndUsingDirective> GetUsings(ConsList<TypeSymbol>? basesBeingResolved)
BoundTree\BoundBinaryOperator.UncommonData.cs (3)
33public static UncommonData? CreateIfNeeded(ConstantValue? constantValue, MethodSymbol? method, TypeSymbol? constrainedToType, ImmutableArray<MethodSymbol> originalUserDefinedOperatorsOpt) 45public readonly TypeSymbol? ConstrainedToType; 54private UncommonData(ConstantValue? constantValue, MethodSymbol? method, TypeSymbol? constrainedToType, ImmutableArray<MethodSymbol> originalUserDefinedOperatorsOpt, bool isUnconvertedInterpolatedStringAddition, InterpolatedStringHandlerData? interpolatedStringHandlerData)
BoundTree\BoundDagTemp.cs (1)
21public static BoundDagTemp ForOriginalInput(SyntaxNode syntax, TypeSymbol type) => new BoundDagTemp(syntax, type, source: null, 0);
BoundTree\BoundExpression.cs (4)
303public BoundLocal(SyntaxNode syntax, LocalSymbol localSymbol, ConstantValue? constantValueOpt, TypeSymbol type, bool hasErrors = false) 308public BoundLocal Update(LocalSymbol localSymbol, ConstantValue? constantValueOpt, TypeSymbol type) 410internal TypeSymbol? ConstrainedToType => Data?.ConstrainedToType; 541TypeSymbol? changeTypeOpt = null)
BoundTree\BoundExpressionExtensions.cs (3)
131var type = node.Type; 144public static TypeSymbol? GetTypeOrFunctionType(this BoundExpression expr) 264TypeSymbol? receiverType = expressionOpt.Type;
BoundTree\BoundExpressionWithNullability.cs (1)
11public BoundExpressionWithNullability(SyntaxNode syntax, BoundExpression expression, NullableAnnotation nullableAnnotation, TypeSymbol? type)
BoundTree\BoundNullCoalescingAssignmentOperator.cs (2)
15var leftType = LeftOperand.Type; 21var nullableUnderlying = leftType.GetNullableUnderlyingType();
BoundTree\BoundObjectCreationExpression.cs (3)
14BoundObjectInitializerExpressionBase? initializerExpressionOpt, TypeSymbol type, bool hasErrors = false) 19ImmutableArray<int> argsToParamsOpt, BitVector defaultArguments, ConstantValue? constantValueOpt, BoundObjectInitializerExpressionBase? initializerExpressionOpt, TypeSymbol type) 26BitVector defaultArguments, ConstantValue? constantValueOpt, BoundObjectInitializerExpressionBase? initializerExpressionOpt, TypeSymbol type)
BoundTree\BoundSpillSequence.cs (1)
20TypeSymbol type,
BoundTree\BoundTreeRewriter.cs (4)
17public virtual TypeSymbol? VisitType(TypeSymbol? type) 146if (symbol is TypeSymbol type) 281var type = this.VisitType(binary.Type);
BoundTree\Constructors.cs (32)
30TypeSymbol type, 43TypeSymbol type, 54TypeSymbol typeSymbol) 100TypeSymbol type, 118TypeSymbol type) 302TypeSymbol type, 317TypeSymbol type) 328public static BoundConversion SynthesizedNonUserDefined(SyntaxNode syntax, BoundExpression operand, Conversion conversion, TypeSymbol type, ConstantValue? constantValueOpt = null) 356TypeSymbol type, 382TypeSymbol type, 407TypeSymbol? constrainedToTypeOpt, 410TypeSymbol type, 428TypeSymbol? constrainedToTypeOpt, 432TypeSymbol type, 441TypeSymbol? constrainedToTypeOpt, 445TypeSymbol type) 488public BoundTypeExpression(SyntaxNode syntax, AliasSymbol? aliasOpt, TypeSymbol type, bool hasErrors = false) 520TypeSymbol type, bool isRef = false, bool hasErrors = false) 528public BoundBadExpression(SyntaxNode syntax, LookupResultKind resultKind, ImmutableArray<Symbol?> symbols, ImmutableArray<BoundExpression> childBoundNodes, TypeSymbol type) 608public BoundDefaultExpression(SyntaxNode syntax, TypeSymbol type, bool hasErrors = false) 624public BoundAddressOfOperator(SyntaxNode syntax, BoundExpression operand, TypeSymbol type, bool hasErrors = false) 632public BoundDagTemp(SyntaxNode syntax, TypeSymbol type, BoundDagEvaluation? source) 651TypeSymbol type, 665TypeSymbol type) 677TypeSymbol? constrainedToTypeOpt, 679TypeSymbol type, 689TypeSymbol? constrainedToTypeOpt, 691TypeSymbol type) 702TypeSymbol? constrainedToTypeOpt, 708TypeSymbol type, 714public BoundIncrementOperator Update(UnaryOperatorKind operatorKind, BoundExpression operand, MethodSymbol? methodOpt, TypeSymbol? constrainedToTypeOpt, BoundValuePlaceholder? operandPlaceholder, BoundExpression? operandConversion, BoundValuePlaceholder? resultPlaceholder, BoundExpression? resultConversion, LookupResultKind resultKind, TypeSymbol type)
BoundTree\InterpolatedStringHandlerData.cs (2)
13public readonly TypeSymbol? BuilderType; 30TypeSymbol builderType,
BoundTree\NullabilityRewriter.cs (3)
94bool foundInfo = _updatedNullabilities.TryGetValue(currentBinary, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType); 96var type = foundInfo ? infoAndType.Type : currentBinary.Type; 216if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
BoundTree\TupleBinaryOperatorInfo.cs (10)
29internal readonly TypeSymbol? LeftConvertedTypeOpt; 30internal readonly TypeSymbol? RightConvertedTypeOpt; 36private TupleBinaryOperatorInfo(TypeSymbol? leftConvertedTypeOpt, TypeSymbol? rightConvertedTypeOpt) 49internal readonly TypeSymbol? ConstrainedToTypeOpt; 57TypeSymbol? leftConvertedTypeOpt, 58TypeSymbol? rightConvertedTypeOpt, 61TypeSymbol? constrainedToTypeOpt, 108internal Multiple(ImmutableArray<TupleBinaryOperatorInfo> operators, TypeSymbol? leftConvertedTypeOpt, TypeSymbol? rightConvertedTypeOpt)
BoundTree\UnboundLambda.cs (16)
82public BoundLambda(SyntaxNode syntax, UnboundLambda unboundLambda, BoundBlock body, ReadOnlyBindingDiagnostic<AssemblySymbol> diagnostics, Binder binder, TypeSymbol? delegateType, InferredLambdaReturnType inferredReturnType) 183internal static readonly TypeSymbol NoReturnExpression = new UnsupportedMetadataTypeSymbol(); 186BoundLambda node, Binder binder, TypeSymbol? delegateType, bool isAsync, ConversionsBase conversions) 193UnboundLambda node, Binder binder, TypeSymbol? delegateType, bool isAsync, ConversionsBase conversions) 203BoundNode node, Binder binder, TypeSymbol? delegateType, bool isAsync, ConversionsBase conversions, bool withDependencies) 245TypeSymbol? delegateType, 268var bestType = returns[0].expr.GetTypeOrFunctionType(); 289var bestType = BestTypeInferrer.InferBestType(returns.SelectAsArray(pair => pair.expr), conversions, ref useSiteInfo, out inferredFromFunctionType); 377var type = (expression is null) ? 489public void GenerateAnonymousFunctionConversionError(BindingDiagnosticBag diagnostics, TypeSymbol targetType) { Data.GenerateAnonymousFunctionConversionError(diagnostics, targetType); } 495public TypeSymbol ParameterType(int index) { return ParameterTypeWithAnnotations(index).Type; } 612public virtual void GenerateAnonymousFunctionConversionError(BindingDiagnosticBag diagnostics, TypeSymbol targetType) 631internal IEnumerable<TypeSymbol> InferredReturnTypes() 1055Debug.Assert(taskLikeReturnTypeOpt is null || ((object)taskLikeReturnTypeOpt == taskLikeReturnTypeOpt.ConstructedFrom && taskLikeReturnTypeOpt.IsCustomTaskType(out var builderArgument))); 1072!TypeSymbol.Equals(other.TaskLikeReturnTypeOpt, this.TaskLikeReturnTypeOpt, TypeCompareKind.ConsiderEverything2)) 1145if (delegateReturnType.IsCustomTaskType(out var builderType))
CodeGen\CodeGenerator.cs (1)
344private void EmitSymbolToken(TypeSymbol symbol, SyntaxNode syntaxNode)
CodeGen\CodeGenerator_HasHome.cs (2)
68var type = expression.Type; 245if (!TypeSymbol.Equals(field.ContainingType, containingSymbol.ContainingSymbol as NamedTypeSymbol, TypeCompareKind.AllIgnoreOptions))
CodeGen\EmitAddress.cs (5)
134var type = expression.Type; 239var receiverType = expression.Type; 406var elementType = arrayAccess.Type; 504var receiverType = receiver.Type; 534private static bool BoxNonVerifierReferenceReceiver(TypeSymbol receiverType, AddressKind addressKind)
CodeGen\EmitArrayInitializer.cs (5)
225TypeSymbol type = init.Type.EnumUnderlyingTypeOrSelf(); 246private ArrayInitializerStyle ShouldEmitBlockInitializer(TypeSymbol elementType, ImmutableArray<BoundExpression> inits) 470TypeSymbol? elementType = null; 630bool tryEmitAsCachedArrayFromBlob(NamedTypeSymbol spanType, BoundExpression wrappedExpression, int elementCount, ImmutableArray<byte> data, ref ArrayTypeSymbol arrayType, TypeSymbol elementType) 680bool tryEmitAsCachedArrayOfConstants(BoundArrayCreation arrayCreation, ArrayTypeSymbol arrayType, TypeSymbol elementType, NamedTypeSymbol spanType, bool used, BoundExpression? inPlaceTarget, out bool avoidInPlace)
CodeGen\EmitConversion.cs (10)
16private static bool IsNumeric(TypeSymbol type) 139var fromType = conversion.Operand.Type; 142var toType = conversion.Type; 214var fromType = conversion.Operand.Type; 218var toType = conversion.Type; 239var resultType = conversion.Type; 290var fromType = conversion.Operand.Type; 299var toType = conversion.Type; 311private void EmitDelegateCreation(BoundExpression node, BoundExpression receiver, bool isExtensionMethod, MethodSymbol method, TypeSymbol delegateType, bool used) 377private MethodSymbol DelegateConstructor(SyntaxNode syntax, TypeSymbol delegateType)
CodeGen\EmitExpression.cs (41)
382var receiverType = expression.Type; 409var receiverType = receiver.Type; 808var thisType = thisRef.Type; 1016var elementType = arrayAccess.Type; 1170TypeSymbol fieldType = field.Type; 1319var type = expr.Type; 1426var parameterType = parameter.ParameterSymbol.Type; 1431private void EmitLoadIndirect(TypeSymbol type, SyntaxNode syntaxNode) 1645Debug.Assert(TypeSymbol.Equals(method.ContainingType, receiver.Type, TypeCompareKind.ConsiderEverything2)); 1714var parentCallReceiverType = call.Type; 1831var receiverType = receiver.Type; 1867Debug.Assert(TypeSymbol.Equals(receiverType, methodContainingType, TypeCompareKind.ObliviousNullableModifierMatchesAny)); 1917var receiverType = receiver.Type; 2023var receiverType = receiver.Type; 2086var receiverType = receiver.Type; 2598var rightType = right.Type; 3212var elementType = arrayType.ElementType; 3310private void EmitIndirectStore(TypeSymbol type, SyntaxNode syntaxNode) 3412var operandType = operand.Type; 3413var targetType = asOp.Type; 3431private void EmitDefaultValue(TypeSymbol type, bool used, SyntaxNode syntaxNode) 3475private void EmitConstantExpression(TypeSymbol type, ConstantValue constantValue, bool used, SyntaxNode syntaxNode) 3494private void EmitInitObj(TypeSymbol type, bool used, SyntaxNode syntaxNode) 3517TypeSymbol type = boundTypeOfOperator.SourceType.Type; 3525TypeSymbol type = boundSizeOfOperator.SourceType.Type; 3692if (!TypeSymbol.Equals(node.Type, getMethod.ReturnType, TypeCompareKind.ConsiderEverything2)) 3719if (!TypeSymbol.Equals(node.Type, getField.ReturnType, TypeCompareKind.ConsiderEverything2)) 3784var mergeTypeOfAlternative = StackMergeType(expr.Alternative); 3792else if (expr.Type.IsInterfaceType() && !TypeSymbol.Equals(expr.Type, mergeTypeOfAlternative, TypeCompareKind.ConsiderEverything2)) 3810var mergeTypeOfConsequence = StackMergeType(expr.Consequence); 3816else if (expr.Type.IsInterfaceType() && !TypeSymbol.Equals(expr.Type, mergeTypeOfConsequence, TypeCompareKind.ConsiderEverything2)) 3845var mergeTypeOfLeftValue = StackMergeType(expr.LeftOperand); 3853else if (expr.Type.IsInterfaceType() && !TypeSymbol.Equals(expr.Type, mergeTypeOfLeftValue, TypeCompareKind.ConsiderEverything2)) 3877var mergeTypeOfRightValue = StackMergeType(expr.RightOperand); 3903private TypeSymbol StackMergeType(BoundExpression expr) 3961private static bool IsVarianceCast(TypeSymbol to, TypeSymbol from) 3963if (TypeSymbol.Equals(to, from, TypeCompareKind.ConsiderEverything2)) 3981return (to.IsDelegateType() && !TypeSymbol.Equals(to, from, TypeCompareKind.ConsiderEverything2)) || 3985private void EmitStaticCast(TypeSymbol to, SyntaxNode syntax) 4005private void EmitBox(TypeSymbol type, SyntaxNode syntaxNode)
CodeGen\EmitOperators.cs (4)
458var comparandType = comparand.Type; 472var comparandType = comparand.Type; 647TypeSymbol enumType; 659Debug.Assert(TypeSymbol.Equals(expression.Left.Type, expression.Right.Type, TypeCompareKind.ConsiderEverything2));
CodeGen\EmitStackAllocInitializer.cs (7)
16private void EmitStackAlloc(TypeSymbol type, BoundArrayInitialization? inits, BoundExpression count) 27var elementType = (type.TypeKind == TypeKind.Pointer 75Debug.Assert(TypeSymbol.Equals(readOnlySpan.OriginalDefinition, _module.Compilation.GetWellKnownType(WellKnownType.System_ReadOnlySpan_T), TypeCompareKind.ConsiderEverything)); 129private ArrayInitializerStyle ShouldEmitBlockInitializerForStackAlloc(TypeSymbol elementType, ImmutableArray<BoundExpression> inits) 181private void EmitElementStackAllocInitializers(TypeSymbol elementType, ImmutableArray<BoundExpression> inits, bool includeConstants) 199private void EmitPointerElementAccess(BoundExpression init, TypeSymbol elementType, int elementTypeSizeInBytes, int index) 226private void EmitIntConstantOrSizeOf(BoundExpression init, TypeSymbol elementType, int elementTypeSizeInBytes)
CodeGen\EmitStatement.cs (12)
178var exprType = thrown.Type; 200private static bool CanPassToBrfalse(TypeSymbol ts) 252var nonConstType = nonConstOp.Type; 530var receiverType = receiver.Type; 610var conditionType = condition.Type; 1345TypeSymbol keyType) 1460void emitFinalDispatches(LengthBasedStringSwitchData lengthBasedSwitchInfo, LocalOrParameter keyTemp, TypeSymbol keyType, LabelSymbol fallThroughLabel, SyntaxNode syntaxNode) 1490TypeSymbol keyType) 1631private Cci.IMethodReference? GetLengthMethodRef(SyntaxNode syntaxNode, TypeSymbol keyType, bool isReadOnlySpan, bool isSpanOrReadOnlySpan) 1655private Microsoft.Cci.IMethodReference? GetIndexerRef(SyntaxNode syntaxNode, TypeSymbol keyType, bool isReadOnlySpan, bool isSpanOrReadOnlySpan) 1801TypeSymbol pointedAtType = pointerType.PointedAtType; 1907private LocalDefinition AllocateTemp(TypeSymbol type, SyntaxNode syntaxNode, LocalSlotConstraints slotConstraints = LocalSlotConstraints.None)
CodeGen\Optimizer.cs (8)
1194var receiverType = receiver.Type; 1229var receiverType = receiver.Type; 1525var type = this.VisitType(binary.Type); 1741var exceptionTypeOpt = this.VisitType(node.ExceptionTypeOpt); 2100var type = this.VisitType(binary.Type); 2144TypeSymbol type = this.VisitType(node.Type); 2279TypeSymbol? type = this.VisitType(node.Type); 2288var type = node.ExceptionTypeOpt;
Compilation\BuiltInOperators.cs (10)
261TypeSymbol opType; 690internal void GetUtf8ConcatenationBuiltInOperator(TypeSymbol readonlySpanOfByte, ArrayBuilder<BinaryOperatorSignature> operators) 704var left = LeftType(kind); 720TypeSymbol rightType = _compilation.GetSpecialType(SpecialType.System_Int32); 738private TypeSymbol LeftType(BinaryOperatorKind kind) 770private TypeSymbol RightType(BinaryOperatorKind kind) 802private TypeSymbol ReturnType(BinaryOperatorKind kind) 833private TypeSymbol LiftedType(BinaryOperatorKind kind) 855internal static bool IsValidObjectEquality(Conversions Conversions, TypeSymbol leftType, bool leftIsNull, bool leftIsDefault, TypeSymbol rightType, bool rightIsNull, bool rightIsDefault, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Compilation\CSharpCompilation.cs (42)
62private TypeSymbol? _lazyHostObjectTypeSymbol; 150private ConcurrentCache<TypeSymbol, NamedTypeSymbol>? _lazyTypeToNullableVersion; 1683private ConcurrentCache<TypeSymbol, NamedTypeSymbol> TypeToNullableVersion 1687return InterlockedOperations.Initialize(ref _lazyTypeToNullableVersion, static () => new ConcurrentCache<TypeSymbol, NamedTypeSymbol>(size: 100)); 1698internal NamedTypeSymbol GetOrCreateNullableType(TypeSymbol typeArgument) 1715static bool isSupportedType(TypeSymbol typeArgument) 1759internal TypeSymbol GetTypeByReflectionType(Type type, BindingDiagnosticBag diagnostics) 1761var result = Assembly.GetTypeByReflectionType(type); 1786internal TypeSymbol? GetHostObjectTypeSymbol() 1790TypeSymbol? symbol = Assembly.GetTypeByReflectionType(HostObjectType); 1832internal new TypeSymbol DynamicType 2207if (!(TypeSymbol.Equals(namedType.ConstructedFrom, GetWellKnownType(WellKnownType.System_Threading_Tasks_Task), TypeCompareKind.ConsiderEverything2) || 2208TypeSymbol.Equals(namedType.ConstructedFrom, GetWellKnownType(WellKnownType.System_Threading_Tasks_Task_T), TypeCompareKind.ConsiderEverything2))) 2238TypeSymbol returnType = method.ReturnType; 2333TypeSymbol? cssource = source.EnsureCSharpSymbolOrNull(nameof(source)); 2334TypeSymbol? csdest = destination.EnsureCSharpSymbolOrNull(nameof(destination)); 2392internal ArrayTypeSymbol CreateArrayTypeSymbol(TypeSymbol elementType, int rank = 1, NullableAnnotation elementNullableAnnotation = NullableAnnotation.Oblivious) 2410internal PointerTypeSymbol CreatePointerTypeSymbol(TypeSymbol elementType, NullableAnnotation elementNullableAnnotation = NullableAnnotation.Oblivious) 2427TypeSymbol? throughType0 = throughType.EnsureCSharpSymbolOrNull(nameof(throughType)); 4194var elementType = typeSymbol.EnsureCSharpSymbolOrNull($"{nameof(elementTypes)}[{i}]"); 4260var type = memberTypes[i].GetSymbol(); 4278var csharpReturnType = returnType.EnsureCSharpSymbolOrNull(nameof(returnType)); 4279var csharpLeftType = leftType.EnsureCSharpSymbolOrNull(nameof(leftType)); 4280var csharpRightType = rightType.EnsureCSharpSymbolOrNull(nameof(rightType)); 4348TypeSymbol.Equals(csharpLeftType, csharpRightType, TypeCompareKind.ConsiderEverything)) 4361TypeSymbol.Equals(csharpLeftType, csharpReturnType, TypeCompareKind.ConsiderEverything)) 4382TypeSymbol.Equals(csharpLeftType, csharpRightType, TypeCompareKind.ConsiderEverything)) 4393TypeSymbol.Equals(csharpLeftType, csharpRightType, TypeCompareKind.ConsiderEverything) && 4394TypeSymbol.Equals(csharpReturnType, csharpRightType, TypeCompareKind.ConsiderEverything)) 4407TypeSymbol.Equals(csharpLeftType, csharpReturnType, TypeCompareKind.ConsiderEverything)) 4414TypeSymbol.Equals(csharpRightType, csharpReturnType, TypeCompareKind.ConsiderEverything)) 4423TypeSymbol.Equals(csharpLeftType, csharpRightType, TypeCompareKind.ConsiderEverything)) 4447TypeSymbol.Equals(csharpLeftType, csharpReturnType, TypeCompareKind.ConsiderEverything)) 4456TypeSymbol.Equals(csharpRightType, csharpReturnType, TypeCompareKind.ConsiderEverything)) 4465TypeSymbol.Equals(csharpLeftType, csharpReturnType, TypeCompareKind.ConsiderEverything)) 4474TypeSymbol.Equals(csharpLeftType, csharpRightType, TypeCompareKind.ConsiderEverything)) 4491bool isAllowedPointerArithmeticIntegralType(TypeSymbol type) 4494bool isReadOnlySpanOfByteType(TypeSymbol type) 4503var csharpReturnType = returnType.EnsureCSharpSymbolOrNull(nameof(returnType)); 4504var csharpOperandType = operandType.EnsureCSharpSymbolOrNull(nameof(operandType)); 4557TypeSymbol.Equals(csharpOperandType, csharpReturnType, TypeCompareKind.ConsiderEverything)) 4565TypeSymbol.Equals(csharpOperandType, csharpReturnType, TypeCompareKind.ConsiderEverything))
Compilation\CSharpCompilation.UsingsFromOptionsAndDiagnostics.cs (2)
149var typeSymbol = (TypeSymbol)target;
Compilation\CSharpCompilationExtensions.cs (1)
22internal static bool ShouldEmitNativeIntegerAttributes(this CSharpCompilation compilation, TypeSymbol type)
Compilation\CSharpSemanticModel.cs (25)
966var declarationTypeSymbol = declarationType.GetSymbol(); 1593TypeSymbol containingType = binder.ContainingType; 1594TypeSymbol baseType = null; 1657if ((options & LookupOptions.IncludeExtensionMembers) != 0 && container is TypeSymbol receiverType) 2056TypeSymbol type = null; 2096TypeSymbol convertedType; 2275static (TypeSymbol, NullabilityInfo) getTypeAndNullability(BoundExpression expr) => (expr.Type, expr.TopLevelNullability); 2326TypeSymbol type = unwrapped as TypeSymbol; 2363TypeSymbol type = UnwrapAlias(symbol) as TypeSymbol; 2843TypeSymbol cdestination = destination.EnsureCSharpSymbolOrNull(nameof(destination)); 2889internal abstract Conversion ClassifyConversionForCast(ExpressionSyntax expression, TypeSymbol destination); 2905internal Conversion ClassifyConversionForCast(int position, ExpressionSyntax expression, TypeSymbol destination) 3741private static ParameterSymbol GetThisParameter(TypeSymbol typeOfThis, NamedTypeSymbol containingType, Symbol containingMember, out LookupResultKind resultKind) 3843TypeSymbol opType = increment.Operand.Type.StrippedType(); 3895private static Symbol GetIntrinsicOperatorSymbol(BinaryOperatorKind op, bool isDynamic, TypeSymbol leftType, TypeSymbol rightType, TypeSymbol returnType, bool isChecked) 3999TypeSymbol.Equals((TypeSymbol)unwrappedSymbols[0], boundAttribute.Type.GetNonErrorGuess(), TypeCompareKind.ConsiderEverything2)); 4096TypeSymbol type = boundNode.Type; 4685TypeSymbol receiverType, 4711TypeSymbol receiverType, 4754TypeSymbol receiverType = null;
Compilation\MemberSemanticModel.cs (2)
439TypeSymbol csdestination = destination.EnsureCSharpSymbolOrNull(nameof(destination)); 488TypeSymbol destination)
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),
Compilation\SpeculativeSemanticModelWithMemberModel.cs (1)
230TypeSymbol destination)
Compilation\SyntaxTreeSemanticModel.cs (5)
501private ConsList<TypeSymbol> GetBasesBeingResolved(TypeSyntax expression) 513return ConsList<TypeSymbol>.Empty.Prepend(symbol.GetSymbol().OriginalDefinition); 522TypeSymbol csdestination = destination.EnsureCSharpSymbolOrNull(nameof(destination)); 558internal override Conversion ClassifyConversionForCast(ExpressionSyntax expression, TypeSymbol destination) 1405if (symbol is TypeSymbol { IsExtension: true } && symbol.HasLocationContainedWithin(this.SyntaxTree, declarationSpan, out var wasZeroWidthMatch))
Compilation\TypeInfo.cs (6)
23public readonly TypeSymbol Type; 31public readonly TypeSymbol ConvertedType; 41internal CSharpTypeInfo(TypeSymbol type, TypeSymbol convertedType, NullabilityInfo nullability, NullabilityInfo convertedNullability, Conversion implicitConversion) 67&& TypeSymbol.Equals(this.Type, other.Type, TypeCompareKind.ConsiderEverything2) 68&& TypeSymbol.Equals(this.ConvertedType, other.ConvertedType, TypeCompareKind.ConsiderEverything2)
Compiler\ClsComplianceChecker.cs (8)
716TypeSymbol type; 981private bool IsCompliantType(TypeSymbol type, NamedTypeSymbol context) 1100return !TypeSymbol.Equals(containingType, contextBaseType, TypeCompareKind.AllIgnoreOptions); 1116System.Diagnostics.Debug.Assert(symbol.Kind == SymbolKind.NamedType || !((symbol is TypeSymbol)), 1369TypeSymbol xType = xParameterTypes[i].Type; 1370TypeSymbol yType = yParameterTypes[i].Type; 1385bool elementTypesDiffer = !TypeSymbol.Equals(xArrayType.ElementType, yArrayType.ElementType, TypeCompareKind.ConsiderEverything2); 1398else if (!TypeSymbol.Equals(xType, yType, TypeCompareKind.ConsiderEverything2))
Compiler\DocumentationCommentCompiler.cs (1)
1135diagnostics.AddDependencies(symbol as TypeSymbol ?? symbol.ContainingType);
Compiler\MethodBodySynthesizer.cs (3)
348TypeSymbol delegateType = eventSymbol.Type; 352TypeSymbol boolType = compilation.GetSpecialType(SpecialType.System_Boolean); 421compareExchangeMethod = compareExchangeMethod.Construct(ImmutableArray.Create<TypeSymbol>(delegateType));
Compiler\MethodBodySynthesizer.Lowered.cs (3)
249this.ImplementingMethod.Construct(this.TypeParameters.Cast<TypeParameterSymbol, TypeSymbol>()) : 329methodBeingWrapped = methodBeingWrapped.ConstructedFrom.Construct(StaticCast<TypeSymbol>.From(this.TypeParameters)); 360TypeSymbol system_Int32 = currentHashValue.Type!;
Compiler\MethodCompiler.cs (3)
245var returnType = entryPoint.ReturnType; 588TypeSymbol discarded = fieldSymbol.FixedImplementationType(compilationState.ModuleBuilderOpt); 2470if (ctorCall != null && !ctorCall.HasAnyErrors && ctorCall.Method != method && TypeSymbol.Equals(ctorCall.Method.ContainingType, method.ContainingType, TypeCompareKind.ConsiderEverything2))
Declarations\DeclarationTreeBuilder.cs (1)
221name: TypeSymbol.ImplicitTypeName,
DocumentationComments\DocumentationCommentIDVisitor.PartVisitor.cs (1)
190if (!_inParameterOrReturnType && TypeSymbol.Equals(symbol, symbol.ConstructedFrom, TypeCompareKind.AllIgnoreOptions))
Emitter\EditAndContinue\CSharpDefinitionMap.cs (2)
68foreach (var member in ((TypeSymbol)stateMachineType).GetMembers()) 144ImmutableArray<LocalInfo<TypeSymbol>> slotMetadata)
Emitter\EditAndContinue\CSharpSymbolMatcher.cs (28)
156var otherElementType = (TypeSymbol?)Visit(symbol.ElementType); 302var newType = (TypeSymbol?)v.Visit(t.Type); 382var otherPointedAtType = (TypeSymbol?)Visit(symbol.PointedAtType); 397var otherReturnType = (TypeSymbol?)Visit(sig.ReturnType); 416var otherType = (TypeSymbol?)Visit(param.Type); 533var otherType = type.WithTypeAndModifiers((TypeSymbol?)this.Visit(type.Type), this.VisitCustomModifiers(type.CustomModifiers)); 754private bool AreTypesEqual(TypeSymbol type, TypeSymbol other) 829public bool Equals(TypeSymbol source, TypeSymbol other) 836var visitedSource = (TypeSymbol?)_matcher.Visit(source); 837var visitedOther = (_deepTranslator != null) ? (TypeSymbol)_deepTranslator.Visit(other) : other; 868var translatedElementType = (TypeSymbol)this.Visit(symbol.ElementType); 890var translatedTypeArguments = type.GetAllTypeArguments(ref discardedUseSiteInfo).SelectAsArray((t, v) => t.WithTypeAndModifiers((TypeSymbol)v.Visit(t.Type), 911var translatedPointedAtType = (TypeSymbol)this.Visit(symbol.PointedAtType); 919var translatedReturnType = (TypeSymbol)Visit(sig.ReturnType); 933var translatedParamType = (TypeSymbol)Visit(param.Type);
Emitter\EditAndContinue\PEDeltaAssemblyBuilder.cs (3)
82internal override Cci.ITypeReference EncTranslateLocalVariableType(TypeSymbol type, DiagnosticBag diagnostics) 86var visited = (TypeSymbol)_deepTranslator.Visit(type);
Emitter\Model\AttributeDataAdapter.cs (4)
149return new MetadataTypeOf(moduleBeingBuilt.Translate((TypeSymbol)argument.ValueInternal, syntaxNodeOpt, diagnostics), 150moduleBeingBuilt.Translate((TypeSymbol)argument.TypeInternal, syntaxNodeOpt, diagnostics)); 156return moduleBeingBuilt.CreateConstant((TypeSymbol)type, value, syntaxNodeOpt: (CSharpSyntaxNode)context.SyntaxNode, diagnostics: context.Diagnostics); 163TypeSymbol type;
Emitter\Model\FieldSymbolAdapter.cs (1)
38var implType = isFixed ? AdaptedFieldSymbol.FixedImplementationType(moduleBeingBuilt) : fieldTypeWithAnnotations.Type;
Emitter\Model\NamedTypeSymbolAdapter.cs (1)
366TypeSymbol objectType = AdaptedNamedTypeSymbol.DeclaringCompilation.GetSpecialType(CodeAnalysis.SpecialType.System_Object);
Emitter\Model\ParameterSymbolAdapter.cs (1)
85TypeSymbol type;
Emitter\Model\PEModuleBuilder.cs (9)
26internal abstract class PEModuleBuilder : PEModuleBuilder<CSharpCompilation, SourceModuleSymbol, AssemblySymbol, TypeSymbol, NamedTypeSymbol, MethodSymbol, SyntaxNode, NoPia.EmbeddedTypesManager, ModuleCompilationState> 33private readonly ConcurrentSet<TypeSymbol> _reportedErrorTypesMap = new ConcurrentSet<TypeSymbol>(); 1136TypeSymbol typeSymbol, 1637internal SynthesizedAttributeData SynthesizeNativeIntegerAttribute(Symbol symbol, TypeSymbol type) 1825TypeSymbol returnType = factory.SpecialType(SpecialType.System_Void); 1826TypeSymbol unmatchedValueType = factory.SpecialType(SpecialType.System_Object); 1872TypeSymbol returnType = factory.SpecialType(SpecialType.System_Void); 1892TypeSymbol returnType = factory.SpecialType(SpecialType.System_Void);
Emitter\NoPia\EmbeddedTypesManager.cs (1)
67if (TypeSymbol.Equals(Interlocked.CompareExchange(ref _lazySystemStringType, typeSymbol, ErrorTypeSymbol.UnknownResultType), ErrorTypeSymbol.UnknownResultType, TypeCompareKind.ConsiderEverything2))
Errors\LazyMissingNonNullTypesContextDiagnosticInfo.cs (1)
83internal static bool IsNullableReference(TypeSymbol type)
FlowAnalysis\AbstractFlowPass.cs (1)
1455private static bool TypeIsImmutable(TypeSymbol t)
FlowAnalysis\DefiniteAssignment.cs (9)
244Debug.Assert(member is TypeSymbol type && 482TypeSymbol parameterType = parameter.Type; 900internal static bool WriteConsideredUse(TypeSymbol type, BoundExpression value) 1128private bool MayRequireTrackingReceiverType(TypeSymbol type) 1692TypeSymbol structType = variable.Symbol.GetTypeOrReturnType().Type; 1728TypeSymbol type = id.Symbol.GetTypeOrReturnType().Type; 1764TypeSymbol type = id.Symbol.GetTypeOrReturnType().Type; 2595if (refKind != RefKind.None && ((object)method == null || method.IsExtern) && arg.Type is TypeSymbol type) 2642private void MarkFieldsUsed(TypeSymbol type)
FlowAnalysis\DefiniteAssignment.LocalFunctions.cs (1)
105var type = id.Symbol.GetTypeOrReturnType().Type;
FlowAnalysis\EmptyStructTypeCache.cs (8)
70public override bool IsEmptyStructType(TypeSymbol type) 79public virtual bool IsEmptyStructType(TypeSymbol type) 89private bool IsEmptyStructType(TypeSymbol type, ConsList<NamedTypeSymbol> typesWithMembersOfThisType) 124public static bool IsTrackableStructType(TypeSymbol type) 148var actualFieldType = field.Type; 163public IEnumerable<FieldSymbol> GetStructInstanceFields(TypeSymbol type) 216private bool ShouldIgnoreStructField(Symbol member, TypeSymbol memberType) 229private static bool IsIgnorableType(TypeSymbol type)
FlowAnalysis\FlowAnalysisPass.cs (1)
79var submissionResultType = (method as SynthesizedInteractiveInitializerMethod)?.ResultType;
FlowAnalysis\LocalDataFlowPass.cs (4)
92protected virtual bool IsEmptyStructType(TypeSymbol type) 126var variableType = symbol.GetTypeOrReturnType().Type; 165TypeSymbol containingType = symbol.ContainingType; 172while (!TypeSymbol.Equals(containingType, symbol.ContainingType, TypeCompareKind.ConsiderEverything))
FlowAnalysis\NullableWalker.cs (172)
126public VisitResult(TypeSymbol? type, NullableAnnotation annotation, NullableFlowState state) 130Debug.Assert(TypeSymbol.Equals(RValueType.Type, LValueType.Type, TypeCompareKind.ConsiderEverything)); 222private readonly ImmutableDictionary<BoundExpression, (NullabilityInfo Info, TypeSymbol? Type)>.Builder? _analyzedNullabilityMapOpt; 467ImmutableDictionary<BoundExpression, (NullabilityInfo, TypeSymbol?)>.Builder? analyzedNullabilityMapOpt, 957static ImmutableArray<Symbol> getAllTypeAndRequiredMembers(TypeSymbol containingType) 1585ImmutableDictionary<BoundExpression, (NullabilityInfo, TypeSymbol?)> analyzedNullabilitiesMap; 1590private static (SnapshotManager?, ImmutableDictionary<BoundExpression, (NullabilityInfo, TypeSymbol?)>) AnalyzeWithSemanticInfo( 1600var analyzedNullabilities = ImmutableDictionary.CreateBuilder<BoundExpression, (NullabilityInfo, TypeSymbol?)>(EqualityComparer<BoundExpression>.Default, NullabilityInfoTypeComparer.Instance); 1658var analyzedNullabilities = ImmutableDictionary.CreateBuilder<BoundExpression, (NullabilityInfo, TypeSymbol?)>(EqualityComparer<BoundExpression>.Default, NullabilityInfoTypeComparer.Instance); 1698private static BoundNode Rewrite(ImmutableDictionary<BoundExpression, (NullabilityInfo, TypeSymbol?)> updatedNullabilities, SnapshotManager? snapshotManager, BoundNode node, ref ImmutableDictionary<Symbol, Symbol>? remappedSymbols) 1824ImmutableDictionary<BoundExpression, (NullabilityInfo, TypeSymbol?)>.Builder? analyzedNullabilityMapOpt, 2102TypeSymbol slotType = NominalSlotType(result); 2103TypeSymbol? nodeType = node.Type; 2139var operandType = operand.Type; 2140var convertedType = conv.Type; 2157TypeSymbol.Equals(conv.Type, conv.Operand.Type, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes): 2326private static object GetTypeAsDiagnosticArgument(TypeSymbol? typeOpt) 2684private void InheritNullableStateOfTrackableStruct(TypeSymbol targetType, int targetSlot, int valueSlot, bool isDefaultValue, int skipSlot = -1) 2709TypeSymbol possibleBase = possibleMember.ContainingType; 2710TypeSymbol possibleDerived = NominalSlotType(slot); 2793private TypeSymbol NominalSlotType(int slot) 2825private void InheritDefaultState(TypeSymbol targetType, int targetSlot) 2830var actualType = GetTypeOrReturnType(_variables[targetSlot].Symbol); 2855private static TypeSymbol GetTypeOrReturnType(Symbol symbol) => symbol.GetTypeOrReturnType().Type; 3720private static bool AreCloseEnough(TypeSymbol? typeA, TypeSymbol? typeB) 3736static bool canIgnoreAnyType(TypeSymbol type) 3740static bool canIgnoreType(TypeSymbol type) 3786private static bool TypeAllowsConditionalState(TypeSymbol? type) 3792private void UnsplitIfNeeded(TypeSymbol? type) 3853var elementConversionCompletions = ArrayBuilder<Func<TypeWithAnnotations /*targetElementType*/, TypeSymbol /*targetCollectionType*/, TypeWithState>>.GetInstance(); 3881void visitElement(BoundNode element, BoundCollectionExpression node, TypeWithAnnotations targetElementType, ArrayBuilder<Func<TypeWithAnnotations, TypeSymbol, TypeWithState>> elementConversionCompletions) 3973TypeWithState convertCollection(BoundCollectionExpression node, TypeWithAnnotations targetCollectionType, ArrayBuilder<Func<TypeWithAnnotations, TypeSymbol, TypeWithState>> completions) 3975var strippedTargetCollectionType = targetCollectionType.Type.StrippedType(); 3976Debug.Assert(TypeSymbol.Equals(strippedTargetCollectionType, node.Type, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes)); 4015(CollectionExpressionTypeKind, TypeWithAnnotations) getCollectionDetails(BoundCollectionExpression node, TypeSymbol collectionType) 4079var type = node.Type; 4081(int slot, NullableFlowState resultState, Func<TypeSymbol, MethodSymbol?, int>? initialStateInferenceCompletion) = 4084Action<int, TypeSymbol>? initializerCompletion = null; 4096TypeSymbol? type, 4099Func<TypeSymbol, MethodSymbol?, int>? initialStateInferenceCompletion, 4100Action<int, TypeSymbol>? initializerCompletion, 4128Func<TypeSymbol, MethodSymbol?, int> initialStateInferenceCompletion, 4129Action<int, TypeSymbol>? initializerCompletion, 4137Debug.Assert(TypeSymbol.Equals(resultTypeWithAnnotations.Type, node.Type, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes)); 4139var type = resultTypeWithAnnotations.Type; 4152static MethodSymbol? getConstructor(BoundObjectCreationExpressionBase node, TypeSymbol type) 4164(int slot, NullableFlowState resultState, Func<TypeSymbol, MethodSymbol?, int>? completion) inferInitialObjectState( 4165BoundExpression node, TypeSymbol type, MethodSymbol? constructor, 4235Func<TypeSymbol, MethodSymbol?, int> inferInitialObjectStateAsContinuation( 4241return (TypeSymbol type, MethodSymbol? constructor) => 4255private Action<int, TypeSymbol>? VisitObjectCreationInitializer(int containingSlot, TypeSymbol containingType, BoundObjectInitializerExpressionBase node, bool delayCompletionForType) 4258Action<int, TypeSymbol>? completion = null; 4305private Action<int, TypeSymbol>? VisitObjectElementInitializer(int containingSlot, TypeSymbol containingType, BoundAssignmentOperator node, bool delayCompletionForType) 4324Action<int, TypeSymbol>? visitMemberInitializer(int containingSlot, TypeSymbol containingType, BoundAssignmentOperator node, bool delayCompletionForType) 4363Action<int, TypeSymbol>? setAnalyzedNullability( 4385Action<int, TypeSymbol>? setAnalyzedNullabilityAsContinuation( 4391return (int containingSlot, TypeSymbol containingType) => 4405static Symbol? getTargetMember(TypeSymbol containingType, BoundObjectInitializerMember objectInitializer) 4411Debug.Assert(TypeSymbol.Equals(objectInitializer.Type, GetTypeOrReturnType(symbol), TypeCompareKind.IgnoreNullableModifiersForReferenceTypes)); 4423Action<int, Symbol>? visitNestedInitializer(int containingSlot, TypeSymbol containingType, Symbol symbol, BoundObjectInitializerExpressionBase initializer, bool delayCompletionForType) 4428Action<int, TypeSymbol>? nestedCompletion = VisitObjectCreationInitializer(slot, GetTypeOrReturnType(symbol), initializer, delayCompletionForType); 4434Symbol symbol, BoundObjectInitializerExpressionBase initializer, int slot, Action<int, TypeSymbol>? nestedCompletion, 4455Action<int, Symbol>? completeNestedInitializerAnalysisAsContinuation(BoundObjectInitializerExpressionBase initializer, Action<int, TypeSymbol>? nestedCompletion) 4516private Action<int, TypeSymbol>? VisitCollectionElementInitializer(BoundCollectionElementInitializer node, TypeSymbol containingType, bool delayCompletionForType) 4542Debug.Assert(TypeSymbol.Equals(containingType, receiverResult.RValueType.Type, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes)); 4543Debug.Assert(TypeSymbol.Equals(containingType, receiverResult.LValueType.Type, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes)); 4549Action<int, TypeSymbol>? setUpdatedSymbol( 4551TypeSymbol containingType, 4576Action<int, TypeSymbol>? setUpdatedSymbolAsContinuation( 4581return (int containingSlot, TypeSymbol containingType) => 4591static MethodSymbol addMethodAsMemberOfContainingType(BoundCollectionElementInitializer node, TypeSymbol containingType, ref ImmutableArray<VisitResult> argumentResults) 4600Debug.Assert(TypeSymbol.Equals(containingType, receiverResult.RValueType.Type, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes)); 4601Debug.Assert(TypeSymbol.Equals(containingType, receiverResult.LValueType.Type, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes)); 4639protected override bool IsEmptyStructType(TypeSymbol type) 4775var arrayType = VisitArrayInitialization(node.Type, initialization, node.HasErrors); 4780private TypeSymbol VisitArrayInitialization(TypeSymbol type, BoundArrayInitialization initialization, bool hasErrors) 4797var resultType = type; 4830TypeSymbol? bestType = null; 4885static TypeSymbol setSpanElementType(NamedTypeSymbol namedType, TypeWithAnnotations elementType) 4949TypeSymbol? bestType = BestTypeInferrer.InferBestType(placeholders, walker._conversions, ref discardedUseSiteInfo, out inferredFromFunctionType); 5016TypeSymbol.Equals(node.Indices[0].Type, compilation.GetWellKnownType(WellKnownType.System_Range), TypeCompareKind.ConsiderEverything2)) 5033var expressionType = VisitRvalueWithState(node.Expression).Type; 5052private TypeWithState InferResultNullability(BinaryOperatorKind operatorKind, MethodSymbol? methodOpt, TypeSymbol resultType, TypeWithState leftType, TypeWithState rightType) 5292TypeSymbol returnType, 5310TypeSymbol methodContainer = method.ContainingType; 5314TypeSymbol asMemberOfType = getTypeIfContainingType(methodContainer, leftUnderlyingType.Type, leftOperand) ?? 5371TypeSymbol? getTypeIfContainingType(TypeSymbol baseType, TypeSymbol? derivedType, BoundExpression operand) 5560var receiverType = conditional.Receiver.Type!; 5606private static bool PossiblyNullableType([NotNullWhen(true)] TypeSymbol? operandType) => operandType?.CanContainNull() == true; 5662private void LearnFromNullTest(int slot, TypeSymbol? expressionType, ref LocalState state, bool markDependentSlotsNotNull) 5682private void MarkDependentSlotsNotNull(int slot, TypeSymbol expressionType, ref LocalState state, int depth = 2) 5704static IEnumerable<Symbol> getMembers(TypeSymbol type) 5722static NamedTypeSymbol effectiveBase(TypeSymbol type) => type switch 5728static ImmutableArray<NamedTypeSymbol> inheritedInterfaces(TypeSymbol type) => type switch 5774TypeSymbol.Equals(targetType.Type.GetNullableUnderlyingType(), node.Type, TypeCompareKind.AllIgnoreOptions)); 5784Debug.Assert(TypeSymbol.Equals(targetType.Type, rightResult.Type, TypeCompareKind.AllIgnoreOptions)); 5827var leftResultType = leftResult.Type; 5828var rightResultType = rightResult.Type; 5844(TypeSymbol ResultType, NullableFlowState LeftState) getLeftResultType(TypeSymbol leftType, TypeSymbol rightType) 5862(TypeSymbol ResultType, NullableFlowState LeftState) getResultStateWithRightType(TypeSymbol leftType, TypeSymbol rightType) 6049TypeSymbol accessType = accessTypeWithAnnotations.Type; 6050var oldType = node.Type; 6051var resultType = 6115TypeSymbol? refResultType = node.Type?.SetUnknownNullabilityForReferenceTypes(); 6151TypeSymbol? resultType; 6376var rvalueType = _currentConditionalReceiverVisitResult.RValueType.Type; 6676static bool isWellKnownEqualityMethodOrImplementation(CSharpCompilation compilation, MethodSymbol method, TypeSymbol? receiverType, WellKnownMember wellKnownMember) 6696for (var baseType = receiverType; baseType is object && method is object; baseType = baseType.BaseTypeNoUseSiteDiagnostics) 6874var type = receiverType.Type; 7531void applyMemberPostConditions(int receiverSlot, TypeSymbol type, ImmutableArray<string> members, ref LocalState state) 7544void markMembersAsNotNull(int receiverSlot, TypeSymbol type, string memberName, ref LocalState state) 7728var argumentResultType = resultType.Type; 7816static bool hasNoNonNullableCounterpart(TypeSymbol? type) 8478private Conversion GenerateConversionForConditionalOperator(BoundExpression sourceExpression, TypeSymbol? sourceType, TypeSymbol destinationType, bool reportMismatch, bool isChecked) 8489private Conversion GenerateConversion(Conversions conversions, BoundExpression? sourceExpression, TypeSymbol? sourceType, TypeSymbol destinationType, bool fromExplicitCast, bool extensionMethodThisArgument, bool isChecked) 8567private static Symbol AsMemberOfType(TypeSymbol? type, Symbol symbol) 8781private static bool AreNullableAndUnderlyingTypes([NotNullWhen(true)] TypeSymbol? nullableTypeOpt, [NotNullWhen(true)] TypeSymbol? underlyingTypeOpt, out TypeWithAnnotations underlyingTypeWithAnnotations) 8907private void TrackNullableStateOfNullableValue(int containingSlot, TypeSymbol containingType, BoundExpression? value, TypeWithState valueType, int valueSlot) 8924TypeSymbol targetType, 8925TypeSymbol operandType, 9033private void ReportNullabilityMismatchWithTargetDelegate(Location location, TypeSymbol targetType, MethodSymbol targetInvokeMethod, MethodSymbol sourceInvokeMethod, bool invokedAsExtensionMethod) 9051void reportBadDelegateReturn(BindingDiagnosticBag bag, MethodSymbol targetInvokeMethod, MethodSymbol sourceInvokeMethod, bool topLevel, (TypeSymbol targetType, Location location) arg) 9058void reportBadDelegateParameter(BindingDiagnosticBag bag, MethodSymbol sourceInvokeMethod, MethodSymbol targetInvokeMethod, ParameterSymbol parameter, bool topLevel, (TypeSymbol targetType, Location location) arg) 9236TypeSymbol targetType = targetTypeWithNullability.Type; 9260static (MethodSymbol invokeSignature, ImmutableArray<ParameterSymbol>) getDelegateOrFunctionPointerInfo(TypeSymbol targetType) 9530static TypeWithState calculateResultType(TypeWithAnnotations targetTypeWithNullability, bool fromExplicitCast, NullableFlowState resultState, bool isSuppressed, TypeSymbol targetType) 9554var type = operandType.Type; 9585var type = operandType.Type; 9746TypeSymbol targetType = targetTypeWithNullability.Type; 9917TypeSymbol type = typeNeedsLifting ? MakeNullableOf(returnType) : returnType.Type; 9926var type = typeWithState.Type; 9942private TypeSymbol MakeNullableOf(TypeWithAnnotations underlying) 10051Debug.Assert(TypeSymbol.Equals(resultTypeWithAnnotations.Type, node.Type, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes)); 10129TypeSymbol argType = arg.Type; 10148TypeSymbol argType = arg.Type; 11070private void ReportNullabilityMismatchInRefArgument(BoundExpression argument, TypeSymbol argumentType, ParameterSymbol parameter, TypeSymbol parameterType) 11082private void ReportNullabilityMismatchInArgument(SyntaxNode argument, TypeSymbol argumentType, ParameterSymbol parameter, TypeSymbol parameterType, bool forOutput) 11087private void ReportNullabilityMismatchInArgument(Location argumentLocation, TypeSymbol argumentType, ParameterSymbol? parameterOpt, TypeSymbol parameterType, bool forOutput) 11178var receiverType = VisitRvalueWithState(receiverOpt).Type; 11315private int GetNullableOfTValueSlot(TypeSymbol containingType, int containingSlot, out Symbol? valueProperty, bool forceSlotEvenIfEmpty = false) 11318Debug.Assert(TypeSymbol.Equals(NominalSlotType(containingSlot), containingType, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes)); 11381var resultType = resultTypeWithState.Type; 11487TypeSymbol? getEnumeratorType; 11978TypeSymbol type = node.Type; 12031var type = node.Type; 12288var resultTypeSymbol = resultType.Type; 12308private bool ReportPossibleNullReceiverIfNeeded(TypeSymbol type, NullableFlowState state, bool checkNullableValueType, SyntaxNode syntax, out bool reportedDiagnostic) 12349private static bool IsNullabilityMismatch(TypeSymbol type1, TypeSymbol type2) 12436var type = VisitArrayInitialization(node.Type, initialization, node.HasErrors); 13143private sealed class NullabilityInfoTypeComparer : IEqualityComparer<(NullabilityInfo info, TypeSymbol? type)> 13147public bool Equals((NullabilityInfo info, TypeSymbol? type) x, (NullabilityInfo info, TypeSymbol? type) y) 13153public int GetHashCode((NullabilityInfo info, TypeSymbol? type) obj)
FlowAnalysis\NullableWalker.DebugVerifier.cs (3)
21private readonly ImmutableDictionary<BoundExpression, (NullabilityInfo Info, TypeSymbol? Type)> _analyzedNullabilityMap; 26private DebugVerifier(ImmutableDictionary<BoundExpression, (NullabilityInfo Info, TypeSymbol? Type)> analyzedNullabilityMap, SnapshotManager? snapshotManager) 37public static void Verify(ImmutableDictionary<BoundExpression, (NullabilityInfo Info, TypeSymbol? Type)> analyzedNullabilityMap, SnapshotManager? snapshotManagerOpt, BoundNode node)
FlowAnalysis\NullableWalker_Patterns.cs (12)
154TypeSymbol inputType, 279var originalInputType = node.Expression.Type; 409var tempMap = PooledDictionary<BoundDagTemp, (int slot, TypeSymbol type)>.GetInstance(); 437(int inputSlot, TypeSymbol inputType) = tempMap.TryGetValue(evaluation.Input, out var slotAndType) ? slotAndType : throw ExceptionUtilities.Unreachable(); 594(int inputSlot, TypeSymbol inputType) = slotAndType; 740void addToTempMap(BoundDagTemp output, int slot, TypeSymbol type) 757bool isDerivedType(TypeSymbol derivedType, TypeSymbol baseType) 837void addTemp(BoundDagEvaluation e, TypeSymbol t, int index = 0) 846static TypeWithAnnotations getIndexerOutputType(TypeSymbol inputType, BoundExpression e, bool isSlice) 883var originalInputType = node.Expression.Type; 951TypeSymbol inferredType =
Generated\BoundNodes.xml.Generated.cs (1097)
408protected BoundExpression(BoundKind kind, SyntaxNode syntax, TypeSymbol? type, bool hasErrors) 414protected BoundExpression(BoundKind kind, SyntaxNode syntax, TypeSymbol? type) 420public TypeSymbol? Type { get; } 425protected BoundValuePlaceholderBase(BoundKind kind, SyntaxNode syntax, TypeSymbol? type, bool hasErrors) 430protected BoundValuePlaceholderBase(BoundKind kind, SyntaxNode syntax, TypeSymbol? type) 439protected BoundEarlyValuePlaceholderBase(BoundKind kind, SyntaxNode syntax, TypeSymbol? type, bool hasErrors) 444protected BoundEarlyValuePlaceholderBase(BoundKind kind, SyntaxNode syntax, TypeSymbol? type) 453public BoundValuePlaceholder(SyntaxNode syntax, TypeSymbol? type, bool hasErrors) 458public BoundValuePlaceholder(SyntaxNode syntax, TypeSymbol? type) 467public BoundValuePlaceholder Update(TypeSymbol? type) 469if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 481public BoundCapturedReceiverPlaceholder(SyntaxNode syntax, BoundExpression receiver, SafeContext localScopeDepth, TypeSymbol? type, bool hasErrors = false) 497public BoundCapturedReceiverPlaceholder Update(BoundExpression receiver, SafeContext localScopeDepth, TypeSymbol? type) 499if (receiver != this.Receiver || localScopeDepth != this.LocalScopeDepth || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 511public BoundDeconstructValuePlaceholder(SyntaxNode syntax, Symbol? variableSymbol, bool isDiscardExpression, TypeSymbol type, bool hasErrors) 521public BoundDeconstructValuePlaceholder(SyntaxNode syntax, Symbol? variableSymbol, bool isDiscardExpression, TypeSymbol type) 531public new TypeSymbol Type => base.Type!; 538public BoundDeconstructValuePlaceholder Update(Symbol? variableSymbol, bool isDiscardExpression, TypeSymbol type) 540if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(variableSymbol, this.VariableSymbol) || isDiscardExpression != this.IsDiscardExpression || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 552public BoundTupleOperandPlaceholder(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 560public BoundTupleOperandPlaceholder(SyntaxNode syntax, TypeSymbol type) 568public new TypeSymbol Type => base.Type!; 573public BoundTupleOperandPlaceholder Update(TypeSymbol type) 575if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 587public BoundAwaitableValuePlaceholder(SyntaxNode syntax, TypeSymbol? type, bool hasErrors) 592public BoundAwaitableValuePlaceholder(SyntaxNode syntax, TypeSymbol? type) 597public new TypeSymbol? Type => base.Type; 602public BoundAwaitableValuePlaceholder Update(TypeSymbol? type) 604if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 616public BoundDisposableValuePlaceholder(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 624public BoundDisposableValuePlaceholder(SyntaxNode syntax, TypeSymbol type) 632public new TypeSymbol Type => base.Type!; 637public BoundDisposableValuePlaceholder Update(TypeSymbol type) 639if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 651public BoundObjectOrCollectionValuePlaceholder(SyntaxNode syntax, bool isNewInstance, TypeSymbol type, bool hasErrors) 660public BoundObjectOrCollectionValuePlaceholder(SyntaxNode syntax, bool isNewInstance, TypeSymbol type) 669public new TypeSymbol Type => base.Type!; 675public BoundObjectOrCollectionValuePlaceholder Update(bool isNewInstance, TypeSymbol type) 677if (isNewInstance != this.IsNewInstance || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 689public BoundImplicitIndexerValuePlaceholder(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 697public BoundImplicitIndexerValuePlaceholder(SyntaxNode syntax, TypeSymbol type) 705public new TypeSymbol Type => base.Type!; 710public BoundImplicitIndexerValuePlaceholder Update(TypeSymbol type) 712if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 724public BoundImplicitIndexerReceiverPlaceholder(SyntaxNode syntax, bool isEquivalentToThisReference, TypeSymbol type, bool hasErrors) 733public BoundImplicitIndexerReceiverPlaceholder(SyntaxNode syntax, bool isEquivalentToThisReference, TypeSymbol type) 742public new TypeSymbol Type => base.Type!; 748public BoundImplicitIndexerReceiverPlaceholder Update(bool isEquivalentToThisReference, TypeSymbol type) 750if (isEquivalentToThisReference != this.IsEquivalentToThisReference || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 762public BoundListPatternReceiverPlaceholder(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 770public BoundListPatternReceiverPlaceholder(SyntaxNode syntax, TypeSymbol type) 778public new TypeSymbol Type => base.Type!; 783public BoundListPatternReceiverPlaceholder Update(TypeSymbol type) 785if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 797public BoundListPatternIndexPlaceholder(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 805public BoundListPatternIndexPlaceholder(SyntaxNode syntax, TypeSymbol type) 813public new TypeSymbol Type => base.Type!; 818public BoundListPatternIndexPlaceholder Update(TypeSymbol type) 820if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 832public BoundSlicePatternReceiverPlaceholder(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 840public BoundSlicePatternReceiverPlaceholder(SyntaxNode syntax, TypeSymbol type) 848public new TypeSymbol Type => base.Type!; 853public BoundSlicePatternReceiverPlaceholder Update(TypeSymbol type) 855if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 867public BoundSlicePatternRangePlaceholder(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 875public BoundSlicePatternRangePlaceholder(SyntaxNode syntax, TypeSymbol type) 883public new TypeSymbol Type => base.Type!; 888public BoundSlicePatternRangePlaceholder Update(TypeSymbol type) 890if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 902public BoundDup(SyntaxNode syntax, RefKind refKind, TypeSymbol? type, bool hasErrors) 908public BoundDup(SyntaxNode syntax, RefKind refKind, TypeSymbol? type) 919public BoundDup Update(RefKind refKind, TypeSymbol? type) 921if (refKind != this.RefKind || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 933public BoundPassByCopy(SyntaxNode syntax, BoundExpression expression, TypeSymbol? type, bool hasErrors = false) 947public BoundPassByCopy Update(BoundExpression expression, TypeSymbol? type) 949if (expression != this.Expression || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 961public BoundBadExpression(SyntaxNode syntax, LookupResultKind resultKind, ImmutableArray<Symbol?> symbols, ImmutableArray<BoundExpression> childBoundNodes, TypeSymbol? type, bool hasErrors = false) 980public BoundBadExpression Update(LookupResultKind resultKind, ImmutableArray<Symbol?> symbols, ImmutableArray<BoundExpression> childBoundNodes, TypeSymbol? type) 982if (resultKind != this.ResultKind || symbols != this.Symbols || childBoundNodes != this.ChildBoundNodes || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1050public BoundTypeExpression(SyntaxNode syntax, AliasSymbol? aliasOpt, BoundTypeExpression? boundContainingTypeOpt, ImmutableArray<BoundExpression> boundDimensionsOpt, TypeWithAnnotations typeWithAnnotations, TypeSymbol type, bool hasErrors = false) 1065public new TypeSymbol Type => base.Type!; 1071public BoundTypeExpression Update(AliasSymbol? aliasOpt, BoundTypeExpression? boundContainingTypeOpt, ImmutableArray<BoundExpression> boundDimensionsOpt, TypeWithAnnotations typeWithAnnotations, TypeSymbol type) 1073if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(aliasOpt, this.AliasOpt) || boundContainingTypeOpt != this.BoundContainingTypeOpt || boundDimensionsOpt != this.BoundDimensionsOpt || typeWithAnnotations != this.TypeWithAnnotations || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1085public BoundTypeOrValueExpression(SyntaxNode syntax, BoundTypeOrValueData data, TypeSymbol type, bool hasErrors) 1094public BoundTypeOrValueExpression(SyntaxNode syntax, BoundTypeOrValueData data, TypeSymbol type) 1103public new TypeSymbol Type => base.Type!; 1109public BoundTypeOrValueExpression Update(BoundTypeOrValueData data, TypeSymbol type) 1111if (data != this.Data || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1143public new TypeSymbol? Type => base.Type; 1164public BoundUnaryOperator(SyntaxNode syntax, UnaryOperatorKind operatorKind, BoundExpression operand, ConstantValue? constantValueOpt, MethodSymbol? methodOpt, TypeSymbol? constrainedToTypeOpt, LookupResultKind resultKind, ImmutableArray<MethodSymbol> originalUserDefinedOperatorsOpt, TypeSymbol type, bool hasErrors = false) 1180public new TypeSymbol Type => base.Type!; 1185public TypeSymbol? ConstrainedToTypeOpt { get; } 1192public BoundUnaryOperator Update(UnaryOperatorKind operatorKind, BoundExpression operand, ConstantValue? constantValueOpt, MethodSymbol? methodOpt, TypeSymbol? constrainedToTypeOpt, LookupResultKind resultKind, ImmutableArray<MethodSymbol> originalUserDefinedOperatorsOpt, TypeSymbol type) 1194if (operatorKind != this.OperatorKind || operand != this.Operand || constantValueOpt != this.ConstantValueOpt || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(methodOpt, this.MethodOpt) || !TypeSymbol.Equals(constrainedToTypeOpt, this.ConstrainedToTypeOpt, TypeCompareKind.ConsiderEverything) || resultKind != this.ResultKind || originalUserDefinedOperatorsOpt != this.OriginalUserDefinedOperatorsOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1206public BoundIncrementOperator(SyntaxNode syntax, UnaryOperatorKind operatorKind, BoundExpression operand, MethodSymbol? methodOpt, TypeSymbol? constrainedToTypeOpt, BoundValuePlaceholder? operandPlaceholder, BoundExpression? operandConversion, BoundValuePlaceholder? resultPlaceholder, BoundExpression? resultConversion, LookupResultKind resultKind, ImmutableArray<MethodSymbol> originalUserDefinedOperatorsOpt, TypeSymbol type, bool hasErrors = false) 1225public new TypeSymbol Type => base.Type!; 1229public TypeSymbol? ConstrainedToTypeOpt { get; } 1240public BoundIncrementOperator Update(UnaryOperatorKind operatorKind, BoundExpression operand, MethodSymbol? methodOpt, TypeSymbol? constrainedToTypeOpt, BoundValuePlaceholder? operandPlaceholder, BoundExpression? operandConversion, BoundValuePlaceholder? resultPlaceholder, BoundExpression? resultConversion, LookupResultKind resultKind, ImmutableArray<MethodSymbol> originalUserDefinedOperatorsOpt, TypeSymbol type) 1242if (operatorKind != this.OperatorKind || operand != this.Operand || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(methodOpt, this.MethodOpt) || !TypeSymbol.Equals(constrainedToTypeOpt, this.ConstrainedToTypeOpt, TypeCompareKind.ConsiderEverything) || operandPlaceholder != this.OperandPlaceholder || operandConversion != this.OperandConversion || resultPlaceholder != this.ResultPlaceholder || resultConversion != this.ResultConversion || resultKind != this.ResultKind || originalUserDefinedOperatorsOpt != this.OriginalUserDefinedOperatorsOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1254public BoundAddressOfOperator(SyntaxNode syntax, BoundExpression operand, bool isManaged, TypeSymbol type, bool hasErrors = false) 1265public new TypeSymbol Type => base.Type!; 1272public BoundAddressOfOperator Update(BoundExpression operand, bool isManaged, TypeSymbol type) 1274if (operand != this.Operand || isManaged != this.IsManaged || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1296public new TypeSymbol? Type => base.Type; 1315public BoundFunctionPointerLoad(SyntaxNode syntax, MethodSymbol targetMethod, TypeSymbol? constrainedToTypeOpt, TypeSymbol type, bool hasErrors) 1326public BoundFunctionPointerLoad(SyntaxNode syntax, MethodSymbol targetMethod, TypeSymbol? constrainedToTypeOpt, TypeSymbol type) 1338public TypeSymbol? ConstrainedToTypeOpt { get; } 1339public new TypeSymbol Type => base.Type!; 1344public BoundFunctionPointerLoad Update(MethodSymbol targetMethod, TypeSymbol? constrainedToTypeOpt, TypeSymbol type) 1346if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(targetMethod, this.TargetMethod) || !TypeSymbol.Equals(constrainedToTypeOpt, this.ConstrainedToTypeOpt, TypeCompareKind.ConsiderEverything) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1358public BoundPointerIndirectionOperator(SyntaxNode syntax, BoundExpression operand, bool refersToLocation, TypeSymbol type, bool hasErrors = false) 1369public new TypeSymbol Type => base.Type!; 1376public BoundPointerIndirectionOperator Update(BoundExpression operand, bool refersToLocation, TypeSymbol type) 1378if (operand != this.Operand || refersToLocation != this.RefersToLocation || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1390public BoundPointerElementAccess(SyntaxNode syntax, BoundExpression expression, BoundExpression index, bool @checked, bool refersToLocation, TypeSymbol type, bool hasErrors = false) 1404public new TypeSymbol Type => base.Type!; 1413public BoundPointerElementAccess Update(BoundExpression expression, BoundExpression index, bool @checked, bool refersToLocation, TypeSymbol type) 1415if (expression != this.Expression || index != this.Index || @checked != this.Checked || refersToLocation != this.RefersToLocation || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1427public BoundFunctionPointerInvocation(SyntaxNode syntax, BoundExpression invokedExpression, ImmutableArray<BoundExpression> arguments, ImmutableArray<RefKind> argumentRefKindsOpt, LookupResultKind resultKind, TypeSymbol type, bool hasErrors = false) 1441public new TypeSymbol Type => base.Type!; 1450public BoundFunctionPointerInvocation Update(BoundExpression invokedExpression, ImmutableArray<BoundExpression> arguments, ImmutableArray<RefKind> argumentRefKindsOpt, LookupResultKind resultKind, TypeSymbol type) 1452if (invokedExpression != this.InvokedExpression || arguments != this.Arguments || argumentRefKindsOpt != this.ArgumentRefKindsOpt || resultKind != this.ResultKind || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1464public BoundRefTypeOperator(SyntaxNode syntax, BoundExpression operand, MethodSymbol? getTypeFromHandle, TypeSymbol type, bool hasErrors = false) 1475public new TypeSymbol Type => base.Type!; 1482public BoundRefTypeOperator Update(BoundExpression operand, MethodSymbol? getTypeFromHandle, TypeSymbol type) 1484if (operand != this.Operand || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(getTypeFromHandle, this.GetTypeFromHandle) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1496public BoundMakeRefOperator(SyntaxNode syntax, BoundExpression operand, TypeSymbol type, bool hasErrors = false) 1506public new TypeSymbol Type => base.Type!; 1512public BoundMakeRefOperator Update(BoundExpression operand, TypeSymbol type) 1514if (operand != this.Operand || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1526public BoundRefValueOperator(SyntaxNode syntax, NullableAnnotation nullableAnnotation, BoundExpression operand, TypeSymbol type, bool hasErrors = false) 1537public new TypeSymbol Type => base.Type!; 1544public BoundRefValueOperator Update(NullableAnnotation nullableAnnotation, BoundExpression operand, TypeSymbol type) 1546if (nullableAnnotation != this.NullableAnnotation || operand != this.Operand || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1558public BoundFromEndIndexExpression(SyntaxNode syntax, BoundExpression operand, MethodSymbol? methodOpt, TypeSymbol type, bool hasErrors = false) 1569public new TypeSymbol Type => base.Type!; 1576public BoundFromEndIndexExpression Update(BoundExpression operand, MethodSymbol? methodOpt, TypeSymbol type) 1578if (operand != this.Operand || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(methodOpt, this.MethodOpt) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1590public BoundRangeExpression(SyntaxNode syntax, BoundExpression? leftOperandOpt, BoundExpression? rightOperandOpt, MethodSymbol? methodOpt, TypeSymbol type, bool hasErrors = false) 1601public new TypeSymbol Type => base.Type!; 1609public BoundRangeExpression Update(BoundExpression? leftOperandOpt, BoundExpression? rightOperandOpt, MethodSymbol? methodOpt, TypeSymbol type) 1611if (leftOperandOpt != this.LeftOperandOpt || rightOperandOpt != this.RightOperandOpt || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(methodOpt, this.MethodOpt) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1623protected BoundBinaryOperatorBase(BoundKind kind, SyntaxNode syntax, BoundExpression left, BoundExpression right, TypeSymbol type, bool hasErrors = false) 1635public new TypeSymbol Type => base.Type!; 1642public BoundBinaryOperator(SyntaxNode syntax, BinaryOperatorKind operatorKind, BoundBinaryOperator.UncommonData? data, LookupResultKind resultKind, BoundExpression left, BoundExpression right, TypeSymbol type, bool hasErrors = false) 1662public BoundBinaryOperator Update(BinaryOperatorKind operatorKind, BoundBinaryOperator.UncommonData? data, LookupResultKind resultKind, BoundExpression left, BoundExpression right, TypeSymbol type) 1664if (operatorKind != this.OperatorKind || data != this.Data || resultKind != this.ResultKind || left != this.Left || right != this.Right || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1676public BoundTupleBinaryOperator(SyntaxNode syntax, BoundExpression left, BoundExpression right, BinaryOperatorKind operatorKind, TupleBinaryOperatorInfo.Multiple operators, TypeSymbol type, bool hasErrors = false) 1691public new TypeSymbol Type => base.Type!; 1700public BoundTupleBinaryOperator Update(BoundExpression left, BoundExpression right, BinaryOperatorKind operatorKind, TupleBinaryOperatorInfo.Multiple operators, TypeSymbol type) 1702if (left != this.Left || right != this.Right || operatorKind != this.OperatorKind || operators != this.Operators || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1714public BoundUserDefinedConditionalLogicalOperator(SyntaxNode syntax, BinaryOperatorKind operatorKind, MethodSymbol logicalOperator, MethodSymbol trueOperator, MethodSymbol falseOperator, BoundValuePlaceholder? trueFalseOperandPlaceholder, BoundExpression? trueFalseOperandConversion, TypeSymbol? constrainedToTypeOpt, LookupResultKind resultKind, ImmutableArray<MethodSymbol> originalUserDefinedOperatorsOpt, BoundExpression left, BoundExpression right, TypeSymbol type, bool hasErrors = false) 1742public TypeSymbol? ConstrainedToTypeOpt { get; } 1749public BoundUserDefinedConditionalLogicalOperator Update(BinaryOperatorKind operatorKind, MethodSymbol logicalOperator, MethodSymbol trueOperator, MethodSymbol falseOperator, BoundValuePlaceholder? trueFalseOperandPlaceholder, BoundExpression? trueFalseOperandConversion, TypeSymbol? constrainedToTypeOpt, LookupResultKind resultKind, ImmutableArray<MethodSymbol> originalUserDefinedOperatorsOpt, BoundExpression left, BoundExpression right, TypeSymbol type) 1751if (operatorKind != this.OperatorKind || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(logicalOperator, this.LogicalOperator) || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(trueOperator, this.TrueOperator) || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(falseOperator, this.FalseOperator) || trueFalseOperandPlaceholder != this.TrueFalseOperandPlaceholder || trueFalseOperandConversion != this.TrueFalseOperandConversion || !TypeSymbol.Equals(constrainedToTypeOpt, this.ConstrainedToTypeOpt, TypeCompareKind.ConsiderEverything) || resultKind != this.ResultKind || originalUserDefinedOperatorsOpt != this.OriginalUserDefinedOperatorsOpt || left != this.Left || right != this.Right || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1763public BoundCompoundAssignmentOperator(SyntaxNode syntax, BinaryOperatorSignature @operator, BoundExpression left, BoundExpression right, BoundValuePlaceholder? leftPlaceholder, BoundExpression? leftConversion, BoundValuePlaceholder? finalPlaceholder, BoundExpression? finalConversion, LookupResultKind resultKind, ImmutableArray<MethodSymbol> originalUserDefinedOperatorsOpt, TypeSymbol type, bool hasErrors = false) 1782public new TypeSymbol Type => base.Type!; 1796public BoundCompoundAssignmentOperator Update(BinaryOperatorSignature @operator, BoundExpression left, BoundExpression right, BoundValuePlaceholder? leftPlaceholder, BoundExpression? leftConversion, BoundValuePlaceholder? finalPlaceholder, BoundExpression? finalConversion, LookupResultKind resultKind, ImmutableArray<MethodSymbol> originalUserDefinedOperatorsOpt, TypeSymbol type) 1798if (@operator != this.Operator || left != this.Left || right != this.Right || leftPlaceholder != this.LeftPlaceholder || leftConversion != this.LeftConversion || finalPlaceholder != this.FinalPlaceholder || finalConversion != this.FinalConversion || resultKind != this.ResultKind || originalUserDefinedOperatorsOpt != this.OriginalUserDefinedOperatorsOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1810public BoundAssignmentOperator(SyntaxNode syntax, BoundExpression left, BoundExpression right, bool isRef, TypeSymbol type, bool hasErrors = false) 1822public new TypeSymbol Type => base.Type!; 1830public BoundAssignmentOperator Update(BoundExpression left, BoundExpression right, bool isRef, TypeSymbol type) 1832if (left != this.Left || right != this.Right || isRef != this.IsRef || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1844public BoundDeconstructionAssignmentOperator(SyntaxNode syntax, BoundTupleExpression left, BoundConversion right, bool isUsed, TypeSymbol type, bool hasErrors = false) 1857public new TypeSymbol Type => base.Type!; 1865public BoundDeconstructionAssignmentOperator Update(BoundTupleExpression left, BoundConversion right, bool isUsed, TypeSymbol type) 1867if (left != this.Left || right != this.Right || isUsed != this.IsUsed || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1879public BoundNullCoalescingOperator(SyntaxNode syntax, BoundExpression leftOperand, BoundExpression rightOperand, BoundValuePlaceholder? leftPlaceholder, BoundExpression? leftConversion, BoundNullCoalescingOperatorResultKind operatorResultKind, bool @checked, TypeSymbol type, bool hasErrors = false) 1895public new TypeSymbol Type => base.Type!; 1906public BoundNullCoalescingOperator Update(BoundExpression leftOperand, BoundExpression rightOperand, BoundValuePlaceholder? leftPlaceholder, BoundExpression? leftConversion, BoundNullCoalescingOperatorResultKind operatorResultKind, bool @checked, TypeSymbol type) 1908if (leftOperand != this.LeftOperand || rightOperand != this.RightOperand || leftPlaceholder != this.LeftPlaceholder || leftConversion != this.LeftConversion || operatorResultKind != this.OperatorResultKind || @checked != this.Checked || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1920public BoundNullCoalescingAssignmentOperator(SyntaxNode syntax, BoundExpression leftOperand, BoundExpression rightOperand, TypeSymbol? type, bool hasErrors = false) 1937public BoundNullCoalescingAssignmentOperator Update(BoundExpression leftOperand, BoundExpression rightOperand, TypeSymbol? type) 1939if (leftOperand != this.LeftOperand || rightOperand != this.RightOperand || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1966public new TypeSymbol? Type => base.Type; 1990public BoundConditionalOperator(SyntaxNode syntax, bool isRef, BoundExpression condition, BoundExpression consequence, BoundExpression alternative, ConstantValue? constantValueOpt, TypeSymbol? naturalTypeOpt, bool wasTargetTyped, TypeSymbol type, bool hasErrors = false) 2008public new TypeSymbol Type => base.Type!; 2014public TypeSymbol? NaturalTypeOpt { get; } 2020public BoundConditionalOperator Update(bool isRef, BoundExpression condition, BoundExpression consequence, BoundExpression alternative, ConstantValue? constantValueOpt, TypeSymbol? naturalTypeOpt, bool wasTargetTyped, TypeSymbol type) 2022if (isRef != this.IsRef || condition != this.Condition || consequence != this.Consequence || alternative != this.Alternative || constantValueOpt != this.ConstantValueOpt || !TypeSymbol.Equals(naturalTypeOpt, this.NaturalTypeOpt, TypeCompareKind.ConsiderEverything) || wasTargetTyped != this.WasTargetTyped || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2034public BoundArrayAccess(SyntaxNode syntax, BoundExpression expression, ImmutableArray<BoundExpression> indices, TypeSymbol type, bool hasErrors = false) 2046public new TypeSymbol Type => base.Type!; 2053public BoundArrayAccess Update(BoundExpression expression, ImmutableArray<BoundExpression> indices, TypeSymbol type) 2055if (expression != this.Expression || indices != this.Indices || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2076public new TypeSymbol? Type => base.Type; 2096public BoundArrayLength(SyntaxNode syntax, BoundExpression expression, TypeSymbol type, bool hasErrors = false) 2106public new TypeSymbol Type => base.Type!; 2112public BoundArrayLength Update(BoundExpression expression, TypeSymbol type) 2114if (expression != this.Expression || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2159public BoundAwaitExpression(SyntaxNode syntax, BoundExpression expression, BoundAwaitableInfo awaitableInfo, BoundAwaitExpressionDebugInfo debugInfo, TypeSymbol type, bool hasErrors = false) 2172public new TypeSymbol Type => base.Type!; 2180public BoundAwaitExpression Update(BoundExpression expression, BoundAwaitableInfo awaitableInfo, BoundAwaitExpressionDebugInfo debugInfo, TypeSymbol type) 2182if (expression != this.Expression || awaitableInfo != this.AwaitableInfo || debugInfo != this.DebugInfo || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2194protected BoundTypeOf(BoundKind kind, SyntaxNode syntax, MethodSymbol? getTypeFromHandle, TypeSymbol type, bool hasErrors) 2203protected BoundTypeOf(BoundKind kind, SyntaxNode syntax, MethodSymbol? getTypeFromHandle, TypeSymbol type) 2212public new TypeSymbol Type => base.Type!; 2218public BoundTypeOfOperator(SyntaxNode syntax, BoundTypeExpression sourceType, MethodSymbol? getTypeFromHandle, TypeSymbol type, bool hasErrors = false) 2233public BoundTypeOfOperator Update(BoundTypeExpression sourceType, MethodSymbol? getTypeFromHandle, TypeSymbol type) 2235if (sourceType != this.SourceType || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(getTypeFromHandle, this.GetTypeFromHandle) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2279public BoundMethodDefIndex(SyntaxNode syntax, MethodSymbol method, TypeSymbol type, bool hasErrors) 2289public BoundMethodDefIndex(SyntaxNode syntax, MethodSymbol method, TypeSymbol type) 2299public new TypeSymbol Type => base.Type!; 2305public BoundMethodDefIndex Update(MethodSymbol method, TypeSymbol type) 2307if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(method, this.Method) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2319public BoundLocalId(SyntaxNode syntax, LocalSymbol local, FieldSymbol? hoistedField, TypeSymbol type, bool hasErrors) 2330public BoundLocalId(SyntaxNode syntax, LocalSymbol local, FieldSymbol? hoistedField, TypeSymbol type) 2341public new TypeSymbol Type => base.Type!; 2348public BoundLocalId Update(LocalSymbol local, FieldSymbol? hoistedField, TypeSymbol type) 2350if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(local, this.Local) || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(hoistedField, this.HoistedField) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2362public BoundParameterId(SyntaxNode syntax, ParameterSymbol parameter, FieldSymbol? hoistedField, TypeSymbol type, bool hasErrors) 2373public BoundParameterId(SyntaxNode syntax, ParameterSymbol parameter, FieldSymbol? hoistedField, TypeSymbol type) 2384public new TypeSymbol Type => base.Type!; 2391public BoundParameterId Update(ParameterSymbol parameter, FieldSymbol? hoistedField, TypeSymbol type) 2393if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(parameter, this.Parameter) || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(hoistedField, this.HoistedField) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2405public BoundStateMachineInstanceId(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 2413public BoundStateMachineInstanceId(SyntaxNode syntax, TypeSymbol type) 2421public new TypeSymbol Type => base.Type!; 2426public BoundStateMachineInstanceId Update(TypeSymbol type) 2428if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2440public BoundMaximumMethodDefIndex(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 2448public BoundMaximumMethodDefIndex(SyntaxNode syntax, TypeSymbol type) 2456public new TypeSymbol Type => base.Type!; 2461public BoundMaximumMethodDefIndex Update(TypeSymbol type) 2463if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2475public BoundInstrumentationPayloadRoot(SyntaxNode syntax, int analysisKind, TypeSymbol type, bool hasErrors) 2484public BoundInstrumentationPayloadRoot(SyntaxNode syntax, int analysisKind, TypeSymbol type) 2494public new TypeSymbol Type => base.Type!; 2499public BoundInstrumentationPayloadRoot Update(int analysisKind, TypeSymbol type) 2501if (analysisKind != this.AnalysisKind || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2513public BoundThrowIfModuleCancellationRequested(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 2521public BoundThrowIfModuleCancellationRequested(SyntaxNode syntax, TypeSymbol type) 2529public new TypeSymbol Type => base.Type!; 2534public BoundThrowIfModuleCancellationRequested Update(TypeSymbol type) 2536if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2548public ModuleCancellationTokenExpression(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 2556public ModuleCancellationTokenExpression(SyntaxNode syntax, TypeSymbol type) 2564public new TypeSymbol Type => base.Type!; 2569public ModuleCancellationTokenExpression Update(TypeSymbol type) 2571if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2583public BoundModuleVersionId(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 2591public BoundModuleVersionId(SyntaxNode syntax, TypeSymbol type) 2599public new TypeSymbol Type => base.Type!; 2604public BoundModuleVersionId Update(TypeSymbol type) 2606if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2618public BoundModuleVersionIdString(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 2626public BoundModuleVersionIdString(SyntaxNode syntax, TypeSymbol type) 2634public new TypeSymbol Type => base.Type!; 2639public BoundModuleVersionIdString Update(TypeSymbol type) 2641if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2653public BoundSourceDocumentIndex(SyntaxNode syntax, Cci.DebugSourceDocument document, TypeSymbol type, bool hasErrors) 2663public BoundSourceDocumentIndex(SyntaxNode syntax, Cci.DebugSourceDocument document, TypeSymbol type) 2673public new TypeSymbol Type => base.Type!; 2679public BoundSourceDocumentIndex Update(Cci.DebugSourceDocument document, TypeSymbol type) 2681if (document != this.Document || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2693public BoundMethodInfo(SyntaxNode syntax, MethodSymbol method, MethodSymbol? getMethodFromHandle, TypeSymbol type, bool hasErrors) 2704public BoundMethodInfo(SyntaxNode syntax, MethodSymbol method, MethodSymbol? getMethodFromHandle, TypeSymbol type) 2715public new TypeSymbol Type => base.Type!; 2722public BoundMethodInfo Update(MethodSymbol method, MethodSymbol? getMethodFromHandle, TypeSymbol type) 2724if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(method, this.Method) || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(getMethodFromHandle, this.GetMethodFromHandle) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2736public BoundFieldInfo(SyntaxNode syntax, FieldSymbol field, MethodSymbol? getFieldFromHandle, TypeSymbol type, bool hasErrors) 2747public BoundFieldInfo(SyntaxNode syntax, FieldSymbol field, MethodSymbol? getFieldFromHandle, TypeSymbol type) 2758public new TypeSymbol Type => base.Type!; 2765public BoundFieldInfo Update(FieldSymbol field, MethodSymbol? getFieldFromHandle, TypeSymbol type) 2767if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(field, this.Field) || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(getFieldFromHandle, this.GetFieldFromHandle) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2789public new TypeSymbol? Type => base.Type; 2802public BoundDefaultExpression(SyntaxNode syntax, BoundTypeExpression? targetType, ConstantValue? constantValueOpt, TypeSymbol type, bool hasErrors = false) 2812public new TypeSymbol Type => base.Type!; 2819public BoundDefaultExpression Update(BoundTypeExpression? targetType, ConstantValue? constantValueOpt, TypeSymbol type) 2821if (targetType != this.TargetType || constantValueOpt != this.ConstantValueOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2833public BoundIsOperator(SyntaxNode syntax, BoundExpression operand, BoundTypeExpression targetType, ConversionKind conversionKind, TypeSymbol type, bool hasErrors = false) 2846public new TypeSymbol Type => base.Type!; 2854public BoundIsOperator Update(BoundExpression operand, BoundTypeExpression targetType, ConversionKind conversionKind, TypeSymbol type) 2856if (operand != this.Operand || targetType != this.TargetType || conversionKind != this.ConversionKind || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2868public BoundAsOperator(SyntaxNode syntax, BoundExpression operand, BoundTypeExpression targetType, BoundValuePlaceholder? operandPlaceholder, BoundExpression? operandConversion, TypeSymbol type, bool hasErrors = false) 2882public new TypeSymbol Type => base.Type!; 2891public BoundAsOperator Update(BoundExpression operand, BoundTypeExpression targetType, BoundValuePlaceholder? operandPlaceholder, BoundExpression? operandConversion, TypeSymbol type) 2893if (operand != this.Operand || targetType != this.TargetType || operandPlaceholder != this.OperandPlaceholder || operandConversion != this.OperandConversion || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2905public BoundSizeOfOperator(SyntaxNode syntax, BoundTypeExpression sourceType, ConstantValue? constantValueOpt, TypeSymbol type, bool hasErrors = false) 2916public new TypeSymbol Type => base.Type!; 2923public BoundSizeOfOperator Update(BoundTypeExpression sourceType, ConstantValue? constantValueOpt, TypeSymbol type) 2925if (sourceType != this.SourceType || constantValueOpt != this.ConstantValueOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2937public BoundConversion(SyntaxNode syntax, BoundExpression operand, Conversion conversion, bool isBaseConversion, bool @checked, bool explicitCastInCode, ConstantValue? constantValueOpt, ConversionGroup? conversionGroupOpt, TypeSymbol type, bool hasErrors = false) 2953public new TypeSymbol Type => base.Type!; 2965public BoundConversion Update(BoundExpression operand, Conversion conversion, bool isBaseConversion, bool @checked, bool explicitCastInCode, ConstantValue? constantValueOpt, ConversionGroup? conversionGroupOpt, TypeSymbol type) 2967if (operand != this.Operand || conversion != this.Conversion || isBaseConversion != this.IsBaseConversion || @checked != this.Checked || explicitCastInCode != this.ExplicitCastInCode || constantValueOpt != this.ConstantValueOpt || conversionGroupOpt != this.ConversionGroupOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2979public BoundReadOnlySpanFromArray(SyntaxNode syntax, BoundExpression operand, MethodSymbol conversionMethod, TypeSymbol type, bool hasErrors = false) 2991public new TypeSymbol Type => base.Type!; 2998public BoundReadOnlySpanFromArray Update(BoundExpression operand, MethodSymbol conversionMethod, TypeSymbol type) 3000if (operand != this.Operand || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(conversionMethod, this.ConversionMethod) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 3012public BoundArgList(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 3020public BoundArgList(SyntaxNode syntax, TypeSymbol type) 3028public new TypeSymbol Type => base.Type!; 3033public BoundArgList Update(TypeSymbol type) 3035if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 3047public BoundArgListOperator(SyntaxNode syntax, ImmutableArray<BoundExpression> arguments, ImmutableArray<RefKind> argumentRefKindsOpt, TypeSymbol? type, bool hasErrors = false) 3057public new TypeSymbol? Type => base.Type; 3064public BoundArgListOperator Update(ImmutableArray<BoundExpression> arguments, ImmutableArray<RefKind> argumentRefKindsOpt, TypeSymbol? type) 3066if (arguments != this.Arguments || argumentRefKindsOpt != this.ArgumentRefKindsOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 3078public BoundFixedLocalCollectionInitializer(SyntaxNode syntax, TypeSymbol elementPointerType, BoundValuePlaceholder? elementPointerPlaceholder, BoundExpression? elementPointerConversion, BoundExpression expression, MethodSymbol? getPinnableOpt, TypeSymbol type, bool hasErrors = false) 3093public new TypeSymbol Type => base.Type!; 3094public TypeSymbol ElementPointerType { get; } 3103public BoundFixedLocalCollectionInitializer Update(TypeSymbol elementPointerType, BoundValuePlaceholder? elementPointerPlaceholder, BoundExpression? elementPointerConversion, BoundExpression expression, MethodSymbol? getPinnableOpt, TypeSymbol type) 3105if (!TypeSymbol.Equals(elementPointerType, this.ElementPointerType, TypeCompareKind.ConsiderEverything) || elementPointerPlaceholder != this.ElementPointerPlaceholder || elementPointerConversion != this.ElementPointerConversion || expression != this.Expression || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(getPinnableOpt, this.GetPinnableOpt) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 4243public BoundCatchBlock(SyntaxNode syntax, ImmutableArray<LocalSymbol> locals, BoundExpression? exceptionSourceOpt, TypeSymbol? exceptionTypeOpt, BoundStatementList? exceptionFilterPrologueOpt, BoundExpression? exceptionFilterOpt, BoundBlock body, bool isSynthesizedAsyncCatchAll, bool hasErrors = false) 4261public TypeSymbol? ExceptionTypeOpt { get; } 4270public BoundCatchBlock Update(ImmutableArray<LocalSymbol> locals, BoundExpression? exceptionSourceOpt, TypeSymbol? exceptionTypeOpt, BoundStatementList? exceptionFilterPrologueOpt, BoundExpression? exceptionFilterOpt, BoundBlock body, bool isSynthesizedAsyncCatchAll) 4272if (locals != this.Locals || exceptionSourceOpt != this.ExceptionSourceOpt || !TypeSymbol.Equals(exceptionTypeOpt, this.ExceptionTypeOpt, TypeCompareKind.ConsiderEverything) || exceptionFilterPrologueOpt != this.ExceptionFilterPrologueOpt || exceptionFilterOpt != this.ExceptionFilterOpt || body != this.Body || isSynthesizedAsyncCatchAll != this.IsSynthesizedAsyncCatchAll) 4284public BoundLiteral(SyntaxNode syntax, ConstantValue? constantValueOpt, TypeSymbol? type, bool hasErrors) 4290public BoundLiteral(SyntaxNode syntax, ConstantValue? constantValueOpt, TypeSymbol? type) 4301public BoundLiteral Update(ConstantValue? constantValueOpt, TypeSymbol? type) 4303if (constantValueOpt != this.ConstantValueOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 4315public BoundUtf8String(SyntaxNode syntax, string value, TypeSymbol type, bool hasErrors) 4325public BoundUtf8String(SyntaxNode syntax, string value, TypeSymbol type) 4335public new TypeSymbol Type => base.Type!; 4341public BoundUtf8String Update(string value, TypeSymbol type) 4343if (value != this.Value || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 4355public BoundThisReference(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 4363public BoundThisReference(SyntaxNode syntax, TypeSymbol type) 4371public new TypeSymbol Type => base.Type!; 4376public BoundThisReference Update(TypeSymbol type) 4378if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 4390public BoundPreviousSubmissionReference(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 4398public BoundPreviousSubmissionReference(SyntaxNode syntax, TypeSymbol type) 4406public new TypeSymbol Type => base.Type!; 4411public BoundPreviousSubmissionReference Update(TypeSymbol type) 4413if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 4425public BoundHostObjectMemberReference(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 4433public BoundHostObjectMemberReference(SyntaxNode syntax, TypeSymbol type) 4441public new TypeSymbol Type => base.Type!; 4446public BoundHostObjectMemberReference Update(TypeSymbol type) 4448if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 4460public BoundBaseReference(SyntaxNode syntax, TypeSymbol? type, bool hasErrors) 4465public BoundBaseReference(SyntaxNode syntax, TypeSymbol? type) 4470public new TypeSymbol? Type => base.Type; 4475public BoundBaseReference Update(TypeSymbol? type) 4477if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 4489public BoundLocal(SyntaxNode syntax, LocalSymbol localSymbol, BoundLocalDeclarationKind declarationKind, ConstantValue? constantValueOpt, bool isNullableUnknown, TypeSymbol type, bool hasErrors) 4502public BoundLocal(SyntaxNode syntax, LocalSymbol localSymbol, BoundLocalDeclarationKind declarationKind, ConstantValue? constantValueOpt, bool isNullableUnknown, TypeSymbol type) 4515public new TypeSymbol Type => base.Type!; 4524public BoundLocal Update(LocalSymbol localSymbol, BoundLocalDeclarationKind declarationKind, ConstantValue? constantValueOpt, bool isNullableUnknown, TypeSymbol type) 4526if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(localSymbol, this.LocalSymbol) || declarationKind != this.DeclarationKind || constantValueOpt != this.ConstantValueOpt || isNullableUnknown != this.IsNullableUnknown || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 4538public BoundPseudoVariable(SyntaxNode syntax, LocalSymbol localSymbol, PseudoVariableExpressions emitExpressions, TypeSymbol type, bool hasErrors) 4550public BoundPseudoVariable(SyntaxNode syntax, LocalSymbol localSymbol, PseudoVariableExpressions emitExpressions, TypeSymbol type) 4562public new TypeSymbol Type => base.Type!; 4569public BoundPseudoVariable Update(LocalSymbol localSymbol, PseudoVariableExpressions emitExpressions, TypeSymbol type) 4571if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(localSymbol, this.LocalSymbol) || emitExpressions != this.EmitExpressions || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 4583public BoundRangeVariable(SyntaxNode syntax, RangeVariableSymbol rangeVariableSymbol, BoundExpression value, TypeSymbol type, bool hasErrors = false) 4595public new TypeSymbol Type => base.Type!; 4602public BoundRangeVariable Update(RangeVariableSymbol rangeVariableSymbol, BoundExpression value, TypeSymbol type) 4604if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(rangeVariableSymbol, this.RangeVariableSymbol) || value != this.Value || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 4616public BoundParameter(SyntaxNode syntax, ParameterSymbol parameterSymbol, TypeSymbol type, bool hasErrors) 4626public BoundParameter(SyntaxNode syntax, ParameterSymbol parameterSymbol, TypeSymbol type) 4636public new TypeSymbol Type => base.Type!; 4642public BoundParameter Update(ParameterSymbol parameterSymbol, TypeSymbol type) 4644if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(parameterSymbol, this.ParameterSymbol) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 4756public BoundLabel(SyntaxNode syntax, LabelSymbol label, TypeSymbol? type, bool hasErrors) 4765public BoundLabel(SyntaxNode syntax, LabelSymbol label, TypeSymbol? type) 4779public BoundLabel Update(LabelSymbol label, TypeSymbol? type) 4781if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(label, this.Label) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 4863protected BoundSwitchExpression(BoundKind kind, SyntaxNode syntax, BoundExpression expression, ImmutableArray<BoundSwitchExpressionArm> switchArms, BoundDecisionDag reachabilityDecisionDag, LabelSymbol? defaultLabel, bool reportedNotExhaustive, TypeSymbol? type, bool hasErrors = false) 4926public BoundUnconvertedSwitchExpression(SyntaxNode syntax, BoundExpression expression, ImmutableArray<BoundSwitchExpressionArm> switchArms, BoundDecisionDag reachabilityDecisionDag, LabelSymbol? defaultLabel, bool reportedNotExhaustive, TypeSymbol? type, bool hasErrors = false) 4940public BoundUnconvertedSwitchExpression Update(BoundExpression expression, ImmutableArray<BoundSwitchExpressionArm> switchArms, BoundDecisionDag reachabilityDecisionDag, LabelSymbol? defaultLabel, bool reportedNotExhaustive, TypeSymbol? type) 4942if (expression != this.Expression || switchArms != this.SwitchArms || reachabilityDecisionDag != this.ReachabilityDecisionDag || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(defaultLabel, this.DefaultLabel) || reportedNotExhaustive != this.ReportedNotExhaustive || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 4954public BoundConvertedSwitchExpression(SyntaxNode syntax, TypeSymbol? naturalTypeOpt, bool wasTargetTyped, BoundExpression expression, ImmutableArray<BoundSwitchExpressionArm> switchArms, BoundDecisionDag reachabilityDecisionDag, LabelSymbol? defaultLabel, bool reportedNotExhaustive, TypeSymbol type, bool hasErrors = false) 4967public new TypeSymbol Type => base.Type!; 4968public TypeSymbol? NaturalTypeOpt { get; } 4974public BoundConvertedSwitchExpression Update(TypeSymbol? naturalTypeOpt, bool wasTargetTyped, BoundExpression expression, ImmutableArray<BoundSwitchExpressionArm> switchArms, BoundDecisionDag reachabilityDecisionDag, LabelSymbol? defaultLabel, bool reportedNotExhaustive, TypeSymbol type) 4976if (!TypeSymbol.Equals(naturalTypeOpt, this.NaturalTypeOpt, TypeCompareKind.ConsiderEverything) || wasTargetTyped != this.WasTargetTyped || expression != this.Expression || switchArms != this.SwitchArms || reachabilityDecisionDag != this.ReachabilityDecisionDag || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(defaultLabel, this.DefaultLabel) || reportedNotExhaustive != this.ReportedNotExhaustive || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 5181public BoundDagTemp(SyntaxNode syntax, TypeSymbol type, BoundDagEvaluation? source, int index, bool hasErrors = false) 5192public TypeSymbol Type { get; } 5199public BoundDagTemp Update(TypeSymbol type, BoundDagEvaluation? source, int index) 5201if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything) || source != this.Source || index != this.Index) 5213public BoundDagTypeTest(SyntaxNode syntax, TypeSymbol type, BoundDagTemp input, bool hasErrors = false) 5223public TypeSymbol Type { get; } 5228public BoundDagTypeTest Update(TypeSymbol type, BoundDagTemp input) 5230if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything) || input != this.Input) 5397public BoundDagTypeEvaluation(SyntaxNode syntax, TypeSymbol type, BoundDagTemp input, bool hasErrors = false) 5407public TypeSymbol Type { get; } 5412public BoundDagTypeEvaluation Update(TypeSymbol type, BoundDagTemp input) 5414if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything) || input != this.Input) 5517public BoundDagIndexerEvaluation(SyntaxNode syntax, TypeSymbol indexerType, BoundDagTemp lengthTemp, int index, BoundExpression indexerAccess, BoundListPatternReceiverPlaceholder receiverPlaceholder, BoundListPatternIndexPlaceholder argumentPlaceholder, BoundDagTemp input, bool hasErrors = false) 5540public TypeSymbol IndexerType { get; } 5550public BoundDagIndexerEvaluation Update(TypeSymbol indexerType, BoundDagTemp lengthTemp, int index, BoundExpression indexerAccess, BoundListPatternReceiverPlaceholder receiverPlaceholder, BoundListPatternIndexPlaceholder argumentPlaceholder, BoundDagTemp input) 5552if (!TypeSymbol.Equals(indexerType, this.IndexerType, TypeCompareKind.ConsiderEverything) || lengthTemp != this.LengthTemp || index != this.Index || indexerAccess != this.IndexerAccess || receiverPlaceholder != this.ReceiverPlaceholder || argumentPlaceholder != this.ArgumentPlaceholder || input != this.Input) 5564public BoundDagSliceEvaluation(SyntaxNode syntax, TypeSymbol sliceType, BoundDagTemp lengthTemp, int startIndex, int endIndex, BoundExpression indexerAccess, BoundSlicePatternReceiverPlaceholder receiverPlaceholder, BoundSlicePatternRangePlaceholder argumentPlaceholder, BoundDagTemp input, bool hasErrors = false) 5588public TypeSymbol SliceType { get; } 5599public BoundDagSliceEvaluation Update(TypeSymbol sliceType, BoundDagTemp lengthTemp, int startIndex, int endIndex, BoundExpression indexerAccess, BoundSlicePatternReceiverPlaceholder receiverPlaceholder, BoundSlicePatternRangePlaceholder argumentPlaceholder, BoundDagTemp input) 5601if (!TypeSymbol.Equals(sliceType, this.SliceType, TypeCompareKind.ConsiderEverything) || lengthTemp != this.LengthTemp || startIndex != this.StartIndex || endIndex != this.EndIndex || indexerAccess != this.IndexerAccess || receiverPlaceholder != this.ReceiverPlaceholder || argumentPlaceholder != this.ArgumentPlaceholder || input != this.Input) 5714public new TypeSymbol? Type => base.Type; 5721public BoundSequencePointExpression(SyntaxNode syntax, BoundExpression expression, TypeSymbol? type, bool hasErrors = false) 5735public BoundSequencePointExpression Update(BoundExpression expression, TypeSymbol? type) 5737if (expression != this.Expression || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 5749public BoundSequence(SyntaxNode syntax, ImmutableArray<LocalSymbol> locals, ImmutableArray<BoundExpression> sideEffects, BoundExpression value, TypeSymbol type, bool hasErrors = false) 5763public new TypeSymbol Type => base.Type!; 5771public BoundSequence Update(ImmutableArray<LocalSymbol> locals, ImmutableArray<BoundExpression> sideEffects, BoundExpression value, TypeSymbol type) 5773if (locals != this.Locals || sideEffects != this.SideEffects || value != this.Value || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 5785public BoundSpillSequence(SyntaxNode syntax, ImmutableArray<LocalSymbol> locals, ImmutableArray<BoundStatement> sideEffects, BoundExpression value, TypeSymbol type, bool hasErrors = false) 5799public new TypeSymbol Type => base.Type!; 5807public BoundSpillSequence Update(ImmutableArray<LocalSymbol> locals, ImmutableArray<BoundStatement> sideEffects, BoundExpression value, TypeSymbol type) 5809if (locals != this.Locals || sideEffects != this.SideEffects || value != this.Value || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 5821public BoundDynamicMemberAccess(SyntaxNode syntax, BoundExpression receiver, ImmutableArray<TypeWithAnnotations> typeArgumentsOpt, string name, bool invoked, bool indexed, TypeSymbol type, bool hasErrors = false) 5836public new TypeSymbol Type => base.Type!; 5846public BoundDynamicMemberAccess Update(BoundExpression receiver, ImmutableArray<TypeWithAnnotations> typeArgumentsOpt, string name, bool invoked, bool indexed, TypeSymbol type) 5848if (receiver != this.Receiver || typeArgumentsOpt != this.TypeArgumentsOpt || name != this.Name || invoked != this.Invoked || indexed != this.Indexed || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 5860protected BoundDynamicInvocableBase(BoundKind kind, SyntaxNode syntax, BoundExpression expression, ImmutableArray<BoundExpression> arguments, TypeSymbol? type, bool hasErrors = false) 5877public BoundDynamicInvocation(SyntaxNode syntax, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, ImmutableArray<MethodSymbol> applicableMethods, BoundExpression expression, ImmutableArray<BoundExpression> arguments, TypeSymbol type, bool hasErrors = false) 5891public new TypeSymbol Type => base.Type!; 5899public BoundDynamicInvocation Update(ImmutableArray<string?> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, ImmutableArray<MethodSymbol> applicableMethods, BoundExpression expression, ImmutableArray<BoundExpression> arguments, TypeSymbol type) 5901if (argumentNamesOpt != this.ArgumentNamesOpt || argumentRefKindsOpt != this.ArgumentRefKindsOpt || applicableMethods != this.ApplicableMethods || expression != this.Expression || arguments != this.Arguments || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 5913public BoundConditionalAccess(SyntaxNode syntax, BoundExpression receiver, BoundExpression accessExpression, TypeSymbol type, bool hasErrors = false) 5925public new TypeSymbol Type => base.Type!; 5932public BoundConditionalAccess Update(BoundExpression receiver, BoundExpression accessExpression, TypeSymbol type) 5934if (receiver != this.Receiver || accessExpression != this.AccessExpression || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 5946public BoundLoweredConditionalAccess(SyntaxNode syntax, BoundExpression receiver, MethodSymbol? hasValueMethodOpt, BoundExpression whenNotNull, BoundExpression? whenNullOpt, int id, bool forceCopyOfNullableValueType, TypeSymbol type, bool hasErrors = false) 5962public new TypeSymbol Type => base.Type!; 5973public BoundLoweredConditionalAccess Update(BoundExpression receiver, MethodSymbol? hasValueMethodOpt, BoundExpression whenNotNull, BoundExpression? whenNullOpt, int id, bool forceCopyOfNullableValueType, TypeSymbol type) 5975if (receiver != this.Receiver || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(hasValueMethodOpt, this.HasValueMethodOpt) || whenNotNull != this.WhenNotNull || whenNullOpt != this.WhenNullOpt || id != this.Id || forceCopyOfNullableValueType != this.ForceCopyOfNullableValueType || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 5987public BoundConditionalReceiver(SyntaxNode syntax, int id, TypeSymbol type, bool hasErrors) 5996public BoundConditionalReceiver(SyntaxNode syntax, int id, TypeSymbol type) 6005public new TypeSymbol Type => base.Type!; 6011public BoundConditionalReceiver Update(int id, TypeSymbol type) 6013if (id != this.Id || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 6025public BoundComplexConditionalReceiver(SyntaxNode syntax, BoundExpression valueTypeReceiver, BoundExpression referenceTypeReceiver, TypeSymbol type, bool hasErrors = false) 6037public new TypeSymbol Type => base.Type!; 6044public BoundComplexConditionalReceiver Update(BoundExpression valueTypeReceiver, BoundExpression referenceTypeReceiver, TypeSymbol type) 6046if (valueTypeReceiver != this.ValueTypeReceiver || referenceTypeReceiver != this.ReferenceTypeReceiver || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 6127public BoundCall(SyntaxNode syntax, BoundExpression? receiverOpt, ThreeState initialBindingReceiverIsSubjectToCloning, MethodSymbol method, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, bool isDelegateCall, bool expanded, bool invokedAsExtensionMethod, ImmutableArray<int> argsToParamsOpt, BitVector defaultArguments, LookupResultKind resultKind, ImmutableArray<MethodSymbol> originalMethodsOpt, TypeSymbol type, bool hasErrors = false) 6150public new TypeSymbol Type => base.Type!; 6168public BoundCall Update(BoundExpression? receiverOpt, ThreeState initialBindingReceiverIsSubjectToCloning, MethodSymbol method, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, bool isDelegateCall, bool expanded, bool invokedAsExtensionMethod, ImmutableArray<int> argsToParamsOpt, BitVector defaultArguments, LookupResultKind resultKind, ImmutableArray<MethodSymbol> originalMethodsOpt, TypeSymbol type) 6170if (receiverOpt != this.ReceiverOpt || initialBindingReceiverIsSubjectToCloning != this.InitialBindingReceiverIsSubjectToCloning || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(method, this.Method) || arguments != this.Arguments || argumentNamesOpt != this.ArgumentNamesOpt || argumentRefKindsOpt != this.ArgumentRefKindsOpt || isDelegateCall != this.IsDelegateCall || expanded != this.Expanded || invokedAsExtensionMethod != this.InvokedAsExtensionMethod || argsToParamsOpt != this.ArgsToParamsOpt || defaultArguments != this.DefaultArguments || resultKind != this.ResultKind || originalMethodsOpt != this.OriginalMethodsOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 6182public BoundEventAssignmentOperator(SyntaxNode syntax, EventSymbol @event, bool isAddition, bool isDynamic, BoundExpression? receiverOpt, BoundExpression argument, TypeSymbol type, bool hasErrors = false) 6197public new TypeSymbol Type => base.Type!; 6207public BoundEventAssignmentOperator Update(EventSymbol @event, bool isAddition, bool isDynamic, BoundExpression? receiverOpt, BoundExpression argument, TypeSymbol type) 6209if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(@event, this.Event) || isAddition != this.IsAddition || isDynamic != this.IsDynamic || receiverOpt != this.ReceiverOpt || argument != this.Argument || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 6221public BoundAttribute(SyntaxNode syntax, MethodSymbol? constructor, ImmutableArray<BoundExpression> constructorArguments, ImmutableArray<string?> constructorArgumentNamesOpt, ImmutableArray<int> constructorArgumentsToParamsOpt, bool constructorExpanded, BitVector constructorDefaultArguments, ImmutableArray<BoundAssignmentOperator> namedArguments, LookupResultKind resultKind, TypeSymbol type, bool hasErrors = false) 6239public new TypeSymbol Type => base.Type!; 6252public BoundAttribute Update(MethodSymbol? constructor, ImmutableArray<BoundExpression> constructorArguments, ImmutableArray<string?> constructorArgumentNamesOpt, ImmutableArray<int> constructorArgumentsToParamsOpt, bool constructorExpanded, BitVector constructorDefaultArguments, ImmutableArray<BoundAssignmentOperator> namedArguments, LookupResultKind resultKind, TypeSymbol type) 6254if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(constructor, this.Constructor) || constructorArguments != this.ConstructorArguments || constructorArgumentNamesOpt != this.ConstructorArgumentNamesOpt || constructorArgumentsToParamsOpt != this.ConstructorArgumentsToParamsOpt || constructorExpanded != this.ConstructorExpanded || constructorDefaultArguments != this.ConstructorDefaultArguments || namedArguments != this.NamedArguments || resultKind != this.ResultKind || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 6280public new TypeSymbol? Type => base.Type; 6304protected BoundObjectCreationExpressionBase(BoundKind kind, SyntaxNode syntax, TypeSymbol type, bool hasErrors) 6312protected BoundObjectCreationExpressionBase(BoundKind kind, SyntaxNode syntax, TypeSymbol type) 6320public new TypeSymbol Type => base.Type!; 6325public BoundObjectCreationExpression(SyntaxNode syntax, MethodSymbol constructor, ImmutableArray<MethodSymbol> constructorsGroup, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, bool expanded, ImmutableArray<int> argsToParamsOpt, BitVector defaultArguments, ConstantValue? constantValueOpt, BoundObjectInitializerExpressionBase? initializerExpressionOpt, bool wasTargetTyped, TypeSymbol type, bool hasErrors = false) 6362public BoundObjectCreationExpression Update(MethodSymbol constructor, ImmutableArray<MethodSymbol> constructorsGroup, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, bool expanded, ImmutableArray<int> argsToParamsOpt, BitVector defaultArguments, ConstantValue? constantValueOpt, BoundObjectInitializerExpressionBase? initializerExpressionOpt, bool wasTargetTyped, TypeSymbol type) 6364if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(constructor, this.Constructor) || constructorsGroup != this.ConstructorsGroup || arguments != this.Arguments || argumentNamesOpt != this.ArgumentNamesOpt || argumentRefKindsOpt != this.ArgumentRefKindsOpt || expanded != this.Expanded || argsToParamsOpt != this.ArgsToParamsOpt || defaultArguments != this.DefaultArguments || constantValueOpt != this.ConstantValueOpt || initializerExpressionOpt != this.InitializerExpressionOpt || wasTargetTyped != this.WasTargetTyped || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 6376protected BoundCollectionExpressionBase(BoundKind kind, SyntaxNode syntax, ImmutableArray<BoundNode> elements, TypeSymbol? type, bool hasErrors = false) 6398public new TypeSymbol? Type => base.Type; 6417public BoundCollectionExpression(SyntaxNode syntax, CollectionExpressionTypeKind collectionTypeKind, BoundObjectOrCollectionValuePlaceholder? placeholder, BoundExpression? collectionCreation, MethodSymbol? collectionBuilderMethod, BoundValuePlaceholder? collectionBuilderInvocationPlaceholder, BoundExpression? collectionBuilderInvocationConversion, bool wasTargetTyped, BoundUnconvertedCollectionExpression unconvertedCollectionExpression, ImmutableArray<BoundNode> elements, TypeSymbol type, bool hasErrors = false) 6435public new TypeSymbol Type => base.Type!; 6448public BoundCollectionExpression Update(CollectionExpressionTypeKind collectionTypeKind, BoundObjectOrCollectionValuePlaceholder? placeholder, BoundExpression? collectionCreation, MethodSymbol? collectionBuilderMethod, BoundValuePlaceholder? collectionBuilderInvocationPlaceholder, BoundExpression? collectionBuilderInvocationConversion, bool wasTargetTyped, BoundUnconvertedCollectionExpression unconvertedCollectionExpression, ImmutableArray<BoundNode> elements, TypeSymbol type) 6450if (collectionTypeKind != this.CollectionTypeKind || placeholder != this.Placeholder || collectionCreation != this.CollectionCreation || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(collectionBuilderMethod, this.CollectionBuilderMethod) || collectionBuilderInvocationPlaceholder != this.CollectionBuilderInvocationPlaceholder || collectionBuilderInvocationConversion != this.CollectionBuilderInvocationConversion || wasTargetTyped != this.WasTargetTyped || unconvertedCollectionExpression != this.UnconvertedCollectionExpression || elements != this.Elements || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 6462public BoundCollectionExpressionSpreadExpressionPlaceholder(SyntaxNode syntax, TypeSymbol? type, bool hasErrors) 6467public BoundCollectionExpressionSpreadExpressionPlaceholder(SyntaxNode syntax, TypeSymbol? type) 6476public BoundCollectionExpressionSpreadExpressionPlaceholder Update(TypeSymbol? type) 6478if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 6530protected BoundTupleExpression(BoundKind kind, SyntaxNode syntax, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<bool> inferredNamesOpt, TypeSymbol? type, bool hasErrors = false) 6548public BoundTupleLiteral(SyntaxNode syntax, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<bool> inferredNamesOpt, TypeSymbol? type, bool hasErrors = false) 6556public new TypeSymbol? Type => base.Type; 6561public BoundTupleLiteral Update(ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<bool> inferredNamesOpt, TypeSymbol? type) 6563if (arguments != this.Arguments || argumentNamesOpt != this.ArgumentNamesOpt || inferredNamesOpt != this.InferredNamesOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 6575public BoundConvertedTupleLiteral(SyntaxNode syntax, BoundTupleLiteral? sourceTuple, bool wasTargetTyped, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<bool> inferredNamesOpt, TypeSymbol? type, bool hasErrors = false) 6591public BoundConvertedTupleLiteral Update(BoundTupleLiteral? sourceTuple, bool wasTargetTyped, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<bool> inferredNamesOpt, TypeSymbol? type) 6593if (sourceTuple != this.SourceTuple || wasTargetTyped != this.WasTargetTyped || arguments != this.Arguments || argumentNamesOpt != this.ArgumentNamesOpt || inferredNamesOpt != this.InferredNamesOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 6605public BoundDynamicObjectCreationExpression(SyntaxNode syntax, string name, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, BoundObjectInitializerExpressionBase? initializerExpressionOpt, ImmutableArray<MethodSymbol> applicableMethods, bool wasTargetTyped, TypeSymbol type, bool hasErrors = false) 6634public BoundDynamicObjectCreationExpression Update(string name, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, BoundObjectInitializerExpressionBase? initializerExpressionOpt, ImmutableArray<MethodSymbol> applicableMethods, bool wasTargetTyped, TypeSymbol type) 6636if (name != this.Name || arguments != this.Arguments || argumentNamesOpt != this.ArgumentNamesOpt || argumentRefKindsOpt != this.ArgumentRefKindsOpt || initializerExpressionOpt != this.InitializerExpressionOpt || applicableMethods != this.ApplicableMethods || wasTargetTyped != this.WasTargetTyped || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 6648public BoundNoPiaObjectCreationExpression(SyntaxNode syntax, string? guidString, BoundObjectInitializerExpressionBase? initializerExpressionOpt, bool wasTargetTyped, TypeSymbol type, bool hasErrors = false) 6666public BoundNoPiaObjectCreationExpression Update(string? guidString, BoundObjectInitializerExpressionBase? initializerExpressionOpt, bool wasTargetTyped, TypeSymbol type) 6668if (guidString != this.GuidString || initializerExpressionOpt != this.InitializerExpressionOpt || wasTargetTyped != this.WasTargetTyped || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 6680protected BoundObjectInitializerExpressionBase(BoundKind kind, SyntaxNode syntax, BoundObjectOrCollectionValuePlaceholder placeholder, ImmutableArray<BoundExpression> initializers, TypeSymbol type, bool hasErrors = false) 6692public new TypeSymbol Type => base.Type!; 6699public BoundObjectInitializerExpression(SyntaxNode syntax, BoundObjectOrCollectionValuePlaceholder placeholder, ImmutableArray<BoundExpression> initializers, TypeSymbol type, bool hasErrors = false) 6713public BoundObjectInitializerExpression Update(BoundObjectOrCollectionValuePlaceholder placeholder, ImmutableArray<BoundExpression> initializers, TypeSymbol type) 6715if (placeholder != this.Placeholder || initializers != this.Initializers || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 6727public BoundObjectInitializerMember(SyntaxNode syntax, Symbol? memberSymbol, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, bool expanded, ImmutableArray<int> argsToParamsOpt, BitVector defaultArguments, LookupResultKind resultKind, AccessorKind accessorKind, TypeSymbol receiverType, TypeSymbol type, bool hasErrors = false) 6747public new TypeSymbol Type => base.Type!; 6757public TypeSymbol ReceiverType { get; } 6762public BoundObjectInitializerMember Update(Symbol? memberSymbol, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, bool expanded, ImmutableArray<int> argsToParamsOpt, BitVector defaultArguments, LookupResultKind resultKind, AccessorKind accessorKind, TypeSymbol receiverType, TypeSymbol type) 6764if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(memberSymbol, this.MemberSymbol) || arguments != this.Arguments || argumentNamesOpt != this.ArgumentNamesOpt || argumentRefKindsOpt != this.ArgumentRefKindsOpt || expanded != this.Expanded || argsToParamsOpt != this.ArgsToParamsOpt || defaultArguments != this.DefaultArguments || resultKind != this.ResultKind || accessorKind != this.AccessorKind || !TypeSymbol.Equals(receiverType, this.ReceiverType, TypeCompareKind.ConsiderEverything) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 6776public BoundDynamicObjectInitializerMember(SyntaxNode syntax, string memberName, TypeSymbol receiverType, TypeSymbol type, bool hasErrors) 6788public BoundDynamicObjectInitializerMember(SyntaxNode syntax, string memberName, TypeSymbol receiverType, TypeSymbol type) 6800public new TypeSymbol Type => base.Type!; 6802public TypeSymbol ReceiverType { get; } 6807public BoundDynamicObjectInitializerMember Update(string memberName, TypeSymbol receiverType, TypeSymbol type) 6809if (memberName != this.MemberName || !TypeSymbol.Equals(receiverType, this.ReceiverType, TypeCompareKind.ConsiderEverything) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 6821public BoundCollectionInitializerExpression(SyntaxNode syntax, BoundObjectOrCollectionValuePlaceholder placeholder, ImmutableArray<BoundExpression> initializers, TypeSymbol type, bool hasErrors = false) 6835public BoundCollectionInitializerExpression Update(BoundObjectOrCollectionValuePlaceholder placeholder, ImmutableArray<BoundExpression> initializers, TypeSymbol type) 6837if (placeholder != this.Placeholder || initializers != this.Initializers || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 6849public BoundCollectionElementInitializer(SyntaxNode syntax, MethodSymbol addMethod, ImmutableArray<BoundExpression> arguments, BoundExpression? implicitReceiverOpt, bool expanded, ImmutableArray<int> argsToParamsOpt, BitVector defaultArguments, bool invokedAsExtensionMethod, LookupResultKind resultKind, TypeSymbol type, bool hasErrors = false) 6867public new TypeSymbol Type => base.Type!; 6880public BoundCollectionElementInitializer Update(MethodSymbol addMethod, ImmutableArray<BoundExpression> arguments, BoundExpression? implicitReceiverOpt, bool expanded, ImmutableArray<int> argsToParamsOpt, BitVector defaultArguments, bool invokedAsExtensionMethod, LookupResultKind resultKind, TypeSymbol type) 6882if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(addMethod, this.AddMethod) || arguments != this.Arguments || implicitReceiverOpt != this.ImplicitReceiverOpt || expanded != this.Expanded || argsToParamsOpt != this.ArgsToParamsOpt || defaultArguments != this.DefaultArguments || invokedAsExtensionMethod != this.InvokedAsExtensionMethod || resultKind != this.ResultKind || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 6894public BoundDynamicCollectionElementInitializer(SyntaxNode syntax, ImmutableArray<MethodSymbol> applicableMethods, BoundExpression expression, ImmutableArray<BoundExpression> arguments, TypeSymbol type, bool hasErrors = false) 6906public new TypeSymbol Type => base.Type!; 6912public BoundDynamicCollectionElementInitializer Update(ImmutableArray<MethodSymbol> applicableMethods, BoundExpression expression, ImmutableArray<BoundExpression> arguments, TypeSymbol type) 6914if (applicableMethods != this.ApplicableMethods || expression != this.Expression || arguments != this.Arguments || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 6926public BoundImplicitReceiver(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 6934public BoundImplicitReceiver(SyntaxNode syntax, TypeSymbol type) 6942public new TypeSymbol Type => base.Type!; 6947public BoundImplicitReceiver Update(TypeSymbol type) 6949if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 6961public BoundAnonymousObjectCreationExpression(SyntaxNode syntax, MethodSymbol constructor, ImmutableArray<BoundExpression> arguments, ImmutableArray<BoundAnonymousPropertyDeclaration> declarations, TypeSymbol type, bool hasErrors = false) 6975public new TypeSymbol Type => base.Type!; 6983public BoundAnonymousObjectCreationExpression Update(MethodSymbol constructor, ImmutableArray<BoundExpression> arguments, ImmutableArray<BoundAnonymousPropertyDeclaration> declarations, TypeSymbol type) 6985if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(constructor, this.Constructor) || arguments != this.Arguments || declarations != this.Declarations || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 6997public BoundAnonymousPropertyDeclaration(SyntaxNode syntax, PropertySymbol property, TypeSymbol type, bool hasErrors) 7007public BoundAnonymousPropertyDeclaration(SyntaxNode syntax, PropertySymbol property, TypeSymbol type) 7017public new TypeSymbol Type => base.Type!; 7023public BoundAnonymousPropertyDeclaration Update(PropertySymbol property, TypeSymbol type) 7025if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(property, this.Property) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7037public BoundNewT(SyntaxNode syntax, BoundObjectInitializerExpressionBase? initializerExpressionOpt, bool wasTargetTyped, TypeSymbol type, bool hasErrors = false) 7053public BoundNewT Update(BoundObjectInitializerExpressionBase? initializerExpressionOpt, bool wasTargetTyped, TypeSymbol type) 7055if (initializerExpressionOpt != this.InitializerExpressionOpt || wasTargetTyped != this.WasTargetTyped || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7067public BoundDelegateCreationExpression(SyntaxNode syntax, BoundExpression argument, MethodSymbol? methodOpt, bool isExtensionMethod, bool wasTargetTyped, TypeSymbol type, bool hasErrors = false) 7080public new TypeSymbol Type => base.Type!; 7089public BoundDelegateCreationExpression Update(BoundExpression argument, MethodSymbol? methodOpt, bool isExtensionMethod, bool wasTargetTyped, TypeSymbol type) 7091if (argument != this.Argument || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(methodOpt, this.MethodOpt) || isExtensionMethod != this.IsExtensionMethod || wasTargetTyped != this.WasTargetTyped || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7103public BoundArrayCreation(SyntaxNode syntax, ImmutableArray<BoundExpression> bounds, BoundArrayInitialization? initializerOpt, TypeSymbol type, bool hasErrors = false) 7114public new TypeSymbol Type => base.Type!; 7121public BoundArrayCreation Update(ImmutableArray<BoundExpression> bounds, BoundArrayInitialization? initializerOpt, TypeSymbol type) 7123if (bounds != this.Bounds || initializerOpt != this.InitializerOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7145public new TypeSymbol? Type => base.Type; 7166protected BoundStackAllocArrayCreationBase(BoundKind kind, SyntaxNode syntax, TypeSymbol elementType, BoundExpression count, BoundArrayInitialization? initializerOpt, TypeSymbol? type, bool hasErrors = false) 7178public TypeSymbol ElementType { get; } 7185public BoundStackAllocArrayCreation(SyntaxNode syntax, TypeSymbol elementType, BoundExpression count, BoundArrayInitialization? initializerOpt, TypeSymbol? type, bool hasErrors = false) 7198public BoundStackAllocArrayCreation Update(TypeSymbol elementType, BoundExpression count, BoundArrayInitialization? initializerOpt, TypeSymbol? type) 7200if (!TypeSymbol.Equals(elementType, this.ElementType, TypeCompareKind.ConsiderEverything) || count != this.Count || initializerOpt != this.InitializerOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7212public BoundConvertedStackAllocExpression(SyntaxNode syntax, TypeSymbol elementType, BoundExpression count, BoundArrayInitialization? initializerOpt, TypeSymbol type, bool hasErrors = false) 7222public new TypeSymbol Type => base.Type!; 7227public BoundConvertedStackAllocExpression Update(TypeSymbol elementType, BoundExpression count, BoundArrayInitialization? initializerOpt, TypeSymbol type) 7229if (!TypeSymbol.Equals(elementType, this.ElementType, TypeCompareKind.ConsiderEverything) || count != this.Count || initializerOpt != this.InitializerOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7241public BoundFieldAccess(SyntaxNode syntax, BoundExpression? receiverOpt, FieldSymbol fieldSymbol, ConstantValue? constantValueOpt, LookupResultKind resultKind, bool isByValue, bool isDeclaration, TypeSymbol type, bool hasErrors = false) 7256public new TypeSymbol Type => base.Type!; 7267public BoundFieldAccess Update(BoundExpression? receiverOpt, FieldSymbol fieldSymbol, ConstantValue? constantValueOpt, LookupResultKind resultKind, bool isByValue, bool isDeclaration, TypeSymbol type) 7269if (receiverOpt != this.ReceiverOpt || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(fieldSymbol, this.FieldSymbol) || constantValueOpt != this.ConstantValueOpt || resultKind != this.ResultKind || isByValue != this.IsByValue || isDeclaration != this.IsDeclaration || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7281public BoundHoistedFieldAccess(SyntaxNode syntax, FieldSymbol fieldSymbol, TypeSymbol type, bool hasErrors) 7291public BoundHoistedFieldAccess(SyntaxNode syntax, FieldSymbol fieldSymbol, TypeSymbol type) 7301public new TypeSymbol Type => base.Type!; 7307public BoundHoistedFieldAccess Update(FieldSymbol fieldSymbol, TypeSymbol type) 7309if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(fieldSymbol, this.FieldSymbol) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7321public BoundPropertyAccess(SyntaxNode syntax, BoundExpression? receiverOpt, ThreeState initialBindingReceiverIsSubjectToCloning, PropertySymbol propertySymbol, AccessorKind autoPropertyAccessorKind, LookupResultKind resultKind, TypeSymbol type, bool hasErrors = false) 7335public new TypeSymbol Type => base.Type!; 7345public BoundPropertyAccess Update(BoundExpression? receiverOpt, ThreeState initialBindingReceiverIsSubjectToCloning, PropertySymbol propertySymbol, AccessorKind autoPropertyAccessorKind, LookupResultKind resultKind, TypeSymbol type) 7347if (receiverOpt != this.ReceiverOpt || initialBindingReceiverIsSubjectToCloning != this.InitialBindingReceiverIsSubjectToCloning || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(propertySymbol, this.PropertySymbol) || autoPropertyAccessorKind != this.AutoPropertyAccessorKind || resultKind != this.ResultKind || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7359public BoundEventAccess(SyntaxNode syntax, BoundExpression? receiverOpt, EventSymbol eventSymbol, bool isUsableAsField, LookupResultKind resultKind, TypeSymbol type, bool hasErrors = false) 7372public new TypeSymbol Type => base.Type!; 7381public BoundEventAccess Update(BoundExpression? receiverOpt, EventSymbol eventSymbol, bool isUsableAsField, LookupResultKind resultKind, TypeSymbol type) 7383if (receiverOpt != this.ReceiverOpt || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(eventSymbol, this.EventSymbol) || isUsableAsField != this.IsUsableAsField || resultKind != this.ResultKind || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7395public BoundIndexerAccess(SyntaxNode syntax, BoundExpression? receiverOpt, ThreeState initialBindingReceiverIsSubjectToCloning, PropertySymbol indexer, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, bool expanded, AccessorKind accessorKind, ImmutableArray<int> argsToParamsOpt, BitVector defaultArguments, ImmutableArray<PropertySymbol> originalIndexersOpt, TypeSymbol type, bool hasErrors = false) 7416public new TypeSymbol Type => base.Type!; 7432public BoundIndexerAccess Update(BoundExpression? receiverOpt, ThreeState initialBindingReceiverIsSubjectToCloning, PropertySymbol indexer, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, bool expanded, AccessorKind accessorKind, ImmutableArray<int> argsToParamsOpt, BitVector defaultArguments, ImmutableArray<PropertySymbol> originalIndexersOpt, TypeSymbol type) 7434if (receiverOpt != this.ReceiverOpt || initialBindingReceiverIsSubjectToCloning != this.InitialBindingReceiverIsSubjectToCloning || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(indexer, this.Indexer) || arguments != this.Arguments || argumentNamesOpt != this.ArgumentNamesOpt || argumentRefKindsOpt != this.ArgumentRefKindsOpt || expanded != this.Expanded || accessorKind != this.AccessorKind || argsToParamsOpt != this.ArgsToParamsOpt || defaultArguments != this.DefaultArguments || originalIndexersOpt != this.OriginalIndexersOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7446public BoundImplicitIndexerAccess(SyntaxNode syntax, BoundExpression receiver, BoundExpression argument, BoundExpression lengthOrCountAccess, BoundImplicitIndexerReceiverPlaceholder receiverPlaceholder, BoundExpression indexerOrSliceAccess, ImmutableArray<BoundImplicitIndexerValuePlaceholder> argumentPlaceholders, TypeSymbol type, bool hasErrors = false) 7470public new TypeSymbol Type => base.Type!; 7481public BoundImplicitIndexerAccess Update(BoundExpression receiver, BoundExpression argument, BoundExpression lengthOrCountAccess, BoundImplicitIndexerReceiverPlaceholder receiverPlaceholder, BoundExpression indexerOrSliceAccess, ImmutableArray<BoundImplicitIndexerValuePlaceholder> argumentPlaceholders, TypeSymbol type) 7483if (receiver != this.Receiver || argument != this.Argument || lengthOrCountAccess != this.LengthOrCountAccess || receiverPlaceholder != this.ReceiverPlaceholder || indexerOrSliceAccess != this.IndexerOrSliceAccess || argumentPlaceholders != this.ArgumentPlaceholders || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7495public BoundInlineArrayAccess(SyntaxNode syntax, BoundExpression expression, BoundExpression argument, bool isValue, WellKnownMember getItemOrSliceHelper, TypeSymbol type, bool hasErrors = false) 7513public new TypeSymbol Type => base.Type!; 7522public BoundInlineArrayAccess Update(BoundExpression expression, BoundExpression argument, bool isValue, WellKnownMember getItemOrSliceHelper, TypeSymbol type) 7524if (expression != this.Expression || argument != this.Argument || isValue != this.IsValue || getItemOrSliceHelper != this.GetItemOrSliceHelper || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7536public BoundDynamicIndexerAccess(SyntaxNode syntax, BoundExpression receiver, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, ImmutableArray<PropertySymbol> applicableIndexers, TypeSymbol type, bool hasErrors = false) 7552public new TypeSymbol Type => base.Type!; 7562public BoundDynamicIndexerAccess Update(BoundExpression receiver, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, ImmutableArray<PropertySymbol> applicableIndexers, TypeSymbol type) 7564if (receiver != this.Receiver || arguments != this.Arguments || argumentNamesOpt != this.ArgumentNamesOpt || argumentRefKindsOpt != this.ArgumentRefKindsOpt || applicableIndexers != this.ApplicableIndexers || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7576public BoundLambda(SyntaxNode syntax, UnboundLambda unboundLambda, MethodSymbol symbol, BoundBlock body, ReadOnlyBindingDiagnostic<AssemblySymbol> diagnostics, Binder binder, TypeSymbol? type, bool hasErrors = false) 7594public new TypeSymbol? Type => base.Type; 7602public BoundLambda Update(UnboundLambda unboundLambda, MethodSymbol symbol, BoundBlock body, ReadOnlyBindingDiagnostic<AssemblySymbol> diagnostics, Binder binder, TypeSymbol? type) 7604if (unboundLambda != this.UnboundLambda || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(symbol, this.Symbol) || body != this.Body || diagnostics != this.Diagnostics || binder != this.Binder || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7638public new TypeSymbol? Type => base.Type; 7660public BoundQueryClause(SyntaxNode syntax, BoundExpression value, RangeVariableSymbol? definedSymbol, BoundExpression? operation, BoundExpression? cast, Binder binder, BoundExpression? unoptimizedForm, TypeSymbol type, bool hasErrors = false) 7676public new TypeSymbol Type => base.Type!; 7687public BoundQueryClause Update(BoundExpression value, RangeVariableSymbol? definedSymbol, BoundExpression? operation, BoundExpression? cast, Binder binder, BoundExpression? unoptimizedForm, TypeSymbol type) 7689if (value != this.Value || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(definedSymbol, this.DefinedSymbol) || operation != this.Operation || cast != this.Cast || binder != this.Binder || unoptimizedForm != this.UnoptimizedForm || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7727public BoundNameOfOperator(SyntaxNode syntax, BoundExpression argument, ConstantValue constantValueOpt, TypeSymbol type, bool hasErrors = false) 7739public new TypeSymbol Type => base.Type!; 7746public BoundNameOfOperator Update(BoundExpression argument, ConstantValue constantValueOpt, TypeSymbol type) 7748if (argument != this.Argument || constantValueOpt != this.ConstantValueOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7760protected BoundInterpolatedStringBase(BoundKind kind, SyntaxNode syntax, ImmutableArray<BoundExpression> parts, ConstantValue? constantValueOpt, TypeSymbol? type, bool hasErrors = false) 7776public BoundUnconvertedInterpolatedString(SyntaxNode syntax, ImmutableArray<BoundExpression> parts, ConstantValue? constantValueOpt, TypeSymbol? type, bool hasErrors = false) 7788public BoundUnconvertedInterpolatedString Update(ImmutableArray<BoundExpression> parts, ConstantValue? constantValueOpt, TypeSymbol? type) 7790if (parts != this.Parts || constantValueOpt != this.ConstantValueOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7802public BoundInterpolatedString(SyntaxNode syntax, InterpolatedStringHandlerData? interpolationData, ImmutableArray<BoundExpression> parts, ConstantValue? constantValueOpt, TypeSymbol? type, bool hasErrors = false) 7816public BoundInterpolatedString Update(InterpolatedStringHandlerData? interpolationData, ImmutableArray<BoundExpression> parts, ConstantValue? constantValueOpt, TypeSymbol? type) 7818if (!interpolationData.Equals(this.InterpolationData) || parts != this.Parts || constantValueOpt != this.ConstantValueOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7830public BoundInterpolatedStringHandlerPlaceholder(SyntaxNode syntax, TypeSymbol? type, bool hasErrors) 7835public BoundInterpolatedStringHandlerPlaceholder(SyntaxNode syntax, TypeSymbol? type) 7844public BoundInterpolatedStringHandlerPlaceholder Update(TypeSymbol? type) 7846if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7858public BoundInterpolatedStringArgumentPlaceholder(SyntaxNode syntax, int argumentIndex, TypeSymbol type, bool hasErrors) 7867public BoundInterpolatedStringArgumentPlaceholder(SyntaxNode syntax, int argumentIndex, TypeSymbol type) 7876public new TypeSymbol Type => base.Type!; 7882public BoundInterpolatedStringArgumentPlaceholder Update(int argumentIndex, TypeSymbol type) 7884if (argumentIndex != this.ArgumentIndex || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7908public new TypeSymbol? Type => base.Type; 7931public BoundIsPatternExpression(SyntaxNode syntax, BoundExpression expression, BoundPattern pattern, bool isNegated, BoundDecisionDag reachabilityDecisionDag, LabelSymbol whenTrueLabel, LabelSymbol whenFalseLabel, TypeSymbol? type, bool hasErrors = false) 7959public BoundIsPatternExpression Update(BoundExpression expression, BoundPattern pattern, bool isNegated, BoundDecisionDag reachabilityDecisionDag, LabelSymbol whenTrueLabel, LabelSymbol whenFalseLabel, TypeSymbol? type) 7961if (expression != this.Expression || pattern != this.Pattern || isNegated != this.IsNegated || reachabilityDecisionDag != this.ReachabilityDecisionDag || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(whenTrueLabel, this.WhenTrueLabel) || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(whenFalseLabel, this.WhenFalseLabel) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7973protected BoundPattern(BoundKind kind, SyntaxNode syntax, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors) 7984protected BoundPattern(BoundKind kind, SyntaxNode syntax, TypeSymbol inputType, TypeSymbol narrowedType) 7995public TypeSymbol InputType { get; } 7996public TypeSymbol NarrowedType { get; } 8001public BoundConstantPattern(SyntaxNode syntax, BoundExpression value, ConstantValue constantValue, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors = false) 8024public BoundConstantPattern Update(BoundExpression value, ConstantValue constantValue, TypeSymbol inputType, TypeSymbol narrowedType) 8026if (value != this.Value || constantValue != this.ConstantValue || !TypeSymbol.Equals(inputType, this.InputType, TypeCompareKind.ConsiderEverything) || !TypeSymbol.Equals(narrowedType, this.NarrowedType, TypeCompareKind.ConsiderEverything)) 8038public BoundDiscardPattern(SyntaxNode syntax, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors) 8051public BoundDiscardPattern(SyntaxNode syntax, TypeSymbol inputType, TypeSymbol narrowedType) 8064public BoundDiscardPattern Update(TypeSymbol inputType, TypeSymbol narrowedType) 8066if (!TypeSymbol.Equals(inputType, this.InputType, TypeCompareKind.ConsiderEverything) || !TypeSymbol.Equals(narrowedType, this.NarrowedType, TypeCompareKind.ConsiderEverything)) 8078protected BoundObjectPattern(BoundKind kind, SyntaxNode syntax, Symbol? variable, BoundExpression? variableAccess, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors = false) 8095public BoundDeclarationPattern(SyntaxNode syntax, BoundTypeExpression declaredType, bool isVar, Symbol? variable, BoundExpression? variableAccess, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors = false) 8117public BoundDeclarationPattern Update(BoundTypeExpression declaredType, bool isVar, Symbol? variable, BoundExpression? variableAccess, TypeSymbol inputType, TypeSymbol narrowedType) 8119if (declaredType != this.DeclaredType || isVar != this.IsVar || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(variable, this.Variable) || variableAccess != this.VariableAccess || !TypeSymbol.Equals(inputType, this.InputType, TypeCompareKind.ConsiderEverything) || !TypeSymbol.Equals(narrowedType, this.NarrowedType, TypeCompareKind.ConsiderEverything)) 8131public 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) 8158public BoundRecursivePattern Update(BoundTypeExpression? declaredType, MethodSymbol? deconstructMethod, ImmutableArray<BoundPositionalSubpattern> deconstruction, ImmutableArray<BoundPropertySubpattern> properties, bool isExplicitNotNullTest, Symbol? variable, BoundExpression? variableAccess, TypeSymbol inputType, TypeSymbol narrowedType) 8160if (declaredType != this.DeclaredType || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(deconstructMethod, this.DeconstructMethod) || deconstruction != this.Deconstruction || properties != this.Properties || isExplicitNotNullTest != this.IsExplicitNotNullTest || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(variable, this.Variable) || variableAccess != this.VariableAccess || !TypeSymbol.Equals(inputType, this.InputType, TypeCompareKind.ConsiderEverything) || !TypeSymbol.Equals(narrowedType, this.NarrowedType, TypeCompareKind.ConsiderEverything)) 8172public BoundListPattern(SyntaxNode syntax, ImmutableArray<BoundPattern> subpatterns, bool hasSlice, BoundExpression? lengthAccess, BoundExpression? indexerAccess, BoundListPatternReceiverPlaceholder? receiverPlaceholder, BoundListPatternIndexPlaceholder? argumentPlaceholder, Symbol? variable, BoundExpression? variableAccess, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors = false) 8202public BoundListPattern Update(ImmutableArray<BoundPattern> subpatterns, bool hasSlice, BoundExpression? lengthAccess, BoundExpression? indexerAccess, BoundListPatternReceiverPlaceholder? receiverPlaceholder, BoundListPatternIndexPlaceholder? argumentPlaceholder, Symbol? variable, BoundExpression? variableAccess, TypeSymbol inputType, TypeSymbol narrowedType) 8204if (subpatterns != this.Subpatterns || hasSlice != this.HasSlice || lengthAccess != this.LengthAccess || indexerAccess != this.IndexerAccess || receiverPlaceholder != this.ReceiverPlaceholder || argumentPlaceholder != this.ArgumentPlaceholder || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(variable, this.Variable) || variableAccess != this.VariableAccess || !TypeSymbol.Equals(inputType, this.InputType, TypeCompareKind.ConsiderEverything) || !TypeSymbol.Equals(narrowedType, this.NarrowedType, TypeCompareKind.ConsiderEverything)) 8216public BoundSlicePattern(SyntaxNode syntax, BoundPattern? pattern, BoundExpression? indexerAccess, BoundSlicePatternReceiverPlaceholder? receiverPlaceholder, BoundSlicePatternRangePlaceholder? argumentPlaceholder, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors = false) 8241public BoundSlicePattern Update(BoundPattern? pattern, BoundExpression? indexerAccess, BoundSlicePatternReceiverPlaceholder? receiverPlaceholder, BoundSlicePatternRangePlaceholder? argumentPlaceholder, TypeSymbol inputType, TypeSymbol narrowedType) 8243if (pattern != this.Pattern || indexerAccess != this.IndexerAccess || receiverPlaceholder != this.ReceiverPlaceholder || argumentPlaceholder != this.ArgumentPlaceholder || !TypeSymbol.Equals(inputType, this.InputType, TypeCompareKind.ConsiderEverything) || !TypeSymbol.Equals(narrowedType, this.NarrowedType, TypeCompareKind.ConsiderEverything)) 8255public BoundITuplePattern(SyntaxNode syntax, MethodSymbol getLengthMethod, MethodSymbol getItemMethod, ImmutableArray<BoundPositionalSubpattern> subpatterns, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors = false) 8281public BoundITuplePattern Update(MethodSymbol getLengthMethod, MethodSymbol getItemMethod, ImmutableArray<BoundPositionalSubpattern> subpatterns, TypeSymbol inputType, TypeSymbol narrowedType) 8283if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(getLengthMethod, this.GetLengthMethod) || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(getItemMethod, this.GetItemMethod) || subpatterns != this.Subpatterns || !TypeSymbol.Equals(inputType, this.InputType, TypeCompareKind.ConsiderEverything) || !TypeSymbol.Equals(narrowedType, this.NarrowedType, TypeCompareKind.ConsiderEverything)) 8367public BoundPropertySubpatternMember(SyntaxNode syntax, BoundPropertySubpatternMember? receiver, Symbol? symbol, TypeSymbol type, bool hasErrors = false) 8380public TypeSymbol Type { get; } 8385public BoundPropertySubpatternMember Update(BoundPropertySubpatternMember? receiver, Symbol? symbol, TypeSymbol type) 8387if (receiver != this.Receiver || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(symbol, this.Symbol) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 8399public BoundTypePattern(SyntaxNode syntax, BoundTypeExpression declaredType, bool isExplicitNotNullTest, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors = false) 8421public BoundTypePattern Update(BoundTypeExpression declaredType, bool isExplicitNotNullTest, TypeSymbol inputType, TypeSymbol narrowedType) 8423if (declaredType != this.DeclaredType || isExplicitNotNullTest != this.IsExplicitNotNullTest || !TypeSymbol.Equals(inputType, this.InputType, TypeCompareKind.ConsiderEverything) || !TypeSymbol.Equals(narrowedType, this.NarrowedType, TypeCompareKind.ConsiderEverything)) 8435public BoundBinaryPattern(SyntaxNode syntax, bool disjunction, BoundPattern left, BoundPattern right, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors = false) 8460public BoundBinaryPattern Update(bool disjunction, BoundPattern left, BoundPattern right, TypeSymbol inputType, TypeSymbol narrowedType) 8462if (disjunction != this.Disjunction || left != this.Left || right != this.Right || !TypeSymbol.Equals(inputType, this.InputType, TypeCompareKind.ConsiderEverything) || !TypeSymbol.Equals(narrowedType, this.NarrowedType, TypeCompareKind.ConsiderEverything)) 8474public BoundNegatedPattern(SyntaxNode syntax, BoundPattern negated, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors = false) 8494public BoundNegatedPattern Update(BoundPattern negated, TypeSymbol inputType, TypeSymbol narrowedType) 8496if (negated != this.Negated || !TypeSymbol.Equals(inputType, this.InputType, TypeCompareKind.ConsiderEverything) || !TypeSymbol.Equals(narrowedType, this.NarrowedType, TypeCompareKind.ConsiderEverything)) 8508public BoundRelationalPattern(SyntaxNode syntax, BinaryOperatorKind relation, BoundExpression value, ConstantValue constantValue, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors = false) 8533public BoundRelationalPattern Update(BinaryOperatorKind relation, BoundExpression value, ConstantValue constantValue, TypeSymbol inputType, TypeSymbol narrowedType) 8535if (relation != this.Relation || value != this.Value || constantValue != this.ConstantValue || !TypeSymbol.Equals(inputType, this.InputType, TypeCompareKind.ConsiderEverything) || !TypeSymbol.Equals(narrowedType, this.NarrowedType, TypeCompareKind.ConsiderEverything)) 8547public BoundDiscardExpression(SyntaxNode syntax, NullableAnnotation nullableAnnotation, bool isInferred, TypeSymbol? type, bool hasErrors) 8554public BoundDiscardExpression(SyntaxNode syntax, NullableAnnotation nullableAnnotation, bool isInferred, TypeSymbol? type) 8561public new TypeSymbol? Type => base.Type; 8568public BoundDiscardExpression Update(NullableAnnotation nullableAnnotation, bool isInferred, TypeSymbol? type) 8570if (nullableAnnotation != this.NullableAnnotation || isInferred != this.IsInferred || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 8582public BoundThrowExpression(SyntaxNode syntax, BoundExpression expression, TypeSymbol? type, bool hasErrors = false) 8596public BoundThrowExpression Update(BoundExpression expression, TypeSymbol? type) 8598if (expression != this.Expression || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 8620public new TypeSymbol? Type => base.Type; 8693public new TypeSymbol? Type => base.Type; 8780public BoundExpressionWithNullability(SyntaxNode syntax, BoundExpression expression, NullableAnnotation nullableAnnotation, TypeSymbol? type, bool hasErrors = false) 8791public new TypeSymbol? Type => base.Type; 8797public BoundExpressionWithNullability Update(BoundExpression expression, NullableAnnotation nullableAnnotation, TypeSymbol? type) 8799if (expression != this.Expression || nullableAnnotation != this.NullableAnnotation || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 8811public BoundWithExpression(SyntaxNode syntax, BoundExpression receiver, MethodSymbol? cloneMethod, BoundObjectInitializerExpressionBase initializerExpression, TypeSymbol type, bool hasErrors = false) 8824public new TypeSymbol Type => base.Type!; 8832public BoundWithExpression Update(BoundExpression receiver, MethodSymbol? cloneMethod, BoundObjectInitializerExpressionBase initializerExpression, TypeSymbol type) 8834if (receiver != this.Receiver || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(cloneMethod, this.CloneMethod) || initializerExpression != this.InitializerExpression || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 10847TypeSymbol? type = this.VisitType(node.Type); 10853TypeSymbol? type = this.VisitType(node.Type); 10859TypeSymbol? type = this.VisitType(node.Type); 10864TypeSymbol? type = this.VisitType(node.Type); 10869TypeSymbol? type = this.VisitType(node.Type); 10874TypeSymbol? type = this.VisitType(node.Type); 10879TypeSymbol? type = this.VisitType(node.Type); 10884TypeSymbol? type = this.VisitType(node.Type); 10889TypeSymbol? type = this.VisitType(node.Type); 10894TypeSymbol? type = this.VisitType(node.Type); 10899TypeSymbol? type = this.VisitType(node.Type); 10904TypeSymbol? type = this.VisitType(node.Type); 10909TypeSymbol? type = this.VisitType(node.Type); 10914TypeSymbol? type = this.VisitType(node.Type); 10920TypeSymbol? type = this.VisitType(node.Type); 10927TypeSymbol? type = this.VisitType(node.Type); 10945TypeSymbol? type = this.VisitType(node.Type); 10950TypeSymbol? type = this.VisitType(node.Type); 10957TypeSymbol? type = this.VisitType(node.Type); 10965TypeSymbol? constrainedToTypeOpt = this.VisitType(node.ConstrainedToTypeOpt); 10966TypeSymbol? type = this.VisitType(node.Type); 10978TypeSymbol? constrainedToTypeOpt = this.VisitType(node.ConstrainedToTypeOpt); 10979TypeSymbol? type = this.VisitType(node.Type); 10985TypeSymbol? type = this.VisitType(node.Type); 10991TypeSymbol? type = this.VisitType(node.Type); 10997TypeSymbol? constrainedToTypeOpt = this.VisitType(node.ConstrainedToTypeOpt); 10998TypeSymbol? type = this.VisitType(node.Type); 11004TypeSymbol? type = this.VisitType(node.Type); 11011TypeSymbol? type = this.VisitType(node.Type); 11018TypeSymbol? type = this.VisitType(node.Type); 11025TypeSymbol? type = this.VisitType(node.Type); 11031TypeSymbol? type = this.VisitType(node.Type); 11037TypeSymbol? type = this.VisitType(node.Type); 11044TypeSymbol? type = this.VisitType(node.Type); 11052TypeSymbol? type = this.VisitType(node.Type); 11059TypeSymbol? type = this.VisitType(node.Type); 11066TypeSymbol? type = this.VisitType(node.Type); 11079TypeSymbol? constrainedToTypeOpt = this.VisitType(node.ConstrainedToTypeOpt); 11080TypeSymbol? type = this.VisitType(node.Type); 11092TypeSymbol? type = this.VisitType(node.Type); 11099TypeSymbol? type = this.VisitType(node.Type); 11106TypeSymbol? type = this.VisitType(node.Type); 11115TypeSymbol? type = this.VisitType(node.Type); 11122TypeSymbol? type = this.VisitType(node.Type); 11130TypeSymbol? type = this.VisitType(node.Type); 11138TypeSymbol? naturalTypeOpt = this.VisitType(node.NaturalTypeOpt); 11139TypeSymbol? type = this.VisitType(node.Type); 11146TypeSymbol? type = this.VisitType(node.Type); 11152TypeSymbol? type = this.VisitType(node.Type); 11158TypeSymbol? type = this.VisitType(node.Type); 11173TypeSymbol? type = this.VisitType(node.Type); 11180TypeSymbol? type = this.VisitType(node.Type); 11192TypeSymbol? type = this.VisitType(node.Type); 11199TypeSymbol? type = this.VisitType(node.Type); 11206TypeSymbol? type = this.VisitType(node.Type); 11211TypeSymbol? type = this.VisitType(node.Type); 11216TypeSymbol? type = this.VisitType(node.Type); 11221TypeSymbol? type = this.VisitType(node.Type); 11226TypeSymbol? type = this.VisitType(node.Type); 11231TypeSymbol? type = this.VisitType(node.Type); 11236TypeSymbol? type = this.VisitType(node.Type); 11241TypeSymbol? type = this.VisitType(node.Type); 11246TypeSymbol? type = this.VisitType(node.Type); 11253TypeSymbol? type = this.VisitType(node.Type); 11260TypeSymbol? type = this.VisitType(node.Type); 11265TypeSymbol? type = this.VisitType(node.Type); 11271TypeSymbol? type = this.VisitType(node.Type); 11278TypeSymbol? type = this.VisitType(node.Type); 11287TypeSymbol? type = this.VisitType(node.Type); 11293TypeSymbol? type = this.VisitType(node.Type); 11299TypeSymbol? type = this.VisitType(node.Type); 11306TypeSymbol? type = this.VisitType(node.Type); 11311TypeSymbol? type = this.VisitType(node.Type); 11317TypeSymbol? type = this.VisitType(node.Type); 11326TypeSymbol? elementPointerType = this.VisitType(node.ElementPointerType); 11327TypeSymbol? type = this.VisitType(node.Type); 11533TypeSymbol? exceptionTypeOpt = this.VisitType(node.ExceptionTypeOpt); 11538TypeSymbol? type = this.VisitType(node.Type); 11543TypeSymbol? type = this.VisitType(node.Type); 11548TypeSymbol? type = this.VisitType(node.Type); 11553TypeSymbol? type = this.VisitType(node.Type); 11558TypeSymbol? type = this.VisitType(node.Type); 11563TypeSymbol? type = this.VisitType(node.Type); 11569TypeSymbol? type = this.VisitType(node.Type); 11575TypeSymbol? type = this.VisitType(node.Type); 11582TypeSymbol? type = this.VisitType(node.Type); 11588TypeSymbol? type = this.VisitType(node.Type); 11612TypeSymbol? type = this.VisitType(node.Type); 11641TypeSymbol? type = this.VisitType(node.Type); 11650TypeSymbol? naturalTypeOpt = this.VisitType(node.NaturalTypeOpt); 11651TypeSymbol? type = this.VisitType(node.Type); 11687TypeSymbol? type = this.VisitType(node.Type); 11693TypeSymbol? type = this.VisitType(node.Type); 11725TypeSymbol? type = this.VisitType(node.Type); 11753TypeSymbol? indexerType = this.VisitType(node.IndexerType); 11763TypeSymbol? sliceType = this.VisitType(node.SliceType); 11789TypeSymbol? type = this.VisitType(node.Type); 11797TypeSymbol? type = this.VisitType(node.Type); 11805TypeSymbol? type = this.VisitType(node.Type); 11811TypeSymbol? type = this.VisitType(node.Type); 11819TypeSymbol? type = this.VisitType(node.Type); 11826TypeSymbol? type = this.VisitType(node.Type); 11835TypeSymbol? type = this.VisitType(node.Type); 11840TypeSymbol? type = this.VisitType(node.Type); 11847TypeSymbol? type = this.VisitType(node.Type); 11856TypeSymbol? type = this.VisitType(node.Type); 11863TypeSymbol? type = this.VisitType(node.Type); 11872TypeSymbol? type = this.VisitType(node.Type); 11880TypeSymbol? type = this.VisitType(node.Type); 11888TypeSymbol? type = this.VisitType(node.Type); 11894TypeSymbol? type = this.VisitType(node.Type); 11903TypeSymbol? type = this.VisitType(node.Type); 11909TypeSymbol? type = this.VisitType(node.Type); 11921TypeSymbol? type = this.VisitType(node.Type); 11926TypeSymbol? type = this.VisitType(node.Type); 11942TypeSymbol? type = this.VisitType(node.Type); 11949TypeSymbol? type = this.VisitType(node.Type); 11957TypeSymbol? type = this.VisitType(node.Type); 11963TypeSymbol? type = this.VisitType(node.Type); 11970TypeSymbol? type = this.VisitType(node.Type); 11977TypeSymbol? receiverType = this.VisitType(node.ReceiverType); 11978TypeSymbol? type = this.VisitType(node.Type); 11983TypeSymbol? receiverType = this.VisitType(node.ReceiverType); 11984TypeSymbol? type = this.VisitType(node.Type); 11991TypeSymbol? type = this.VisitType(node.Type); 11999TypeSymbol? type = this.VisitType(node.Type); 12007TypeSymbol? type = this.VisitType(node.Type); 12012TypeSymbol? type = this.VisitType(node.Type); 12020TypeSymbol? type = this.VisitType(node.Type); 12026TypeSymbol? type = this.VisitType(node.Type); 12032TypeSymbol? type = this.VisitType(node.Type); 12039TypeSymbol? type = this.VisitType(node.Type); 12046TypeSymbol? type = this.VisitType(node.Type); 12052TypeSymbol? type = this.VisitType(node.Type); 12059TypeSymbol? elementType = this.VisitType(node.ElementType); 12060TypeSymbol? type = this.VisitType(node.Type); 12067TypeSymbol? elementType = this.VisitType(node.ElementType); 12068TypeSymbol? type = this.VisitType(node.Type); 12075TypeSymbol? type = this.VisitType(node.Type); 12081TypeSymbol? type = this.VisitType(node.Type); 12088TypeSymbol? type = this.VisitType(node.Type); 12095TypeSymbol? type = this.VisitType(node.Type); 12104TypeSymbol? type = this.VisitType(node.Type); 12115TypeSymbol? type = this.VisitType(node.Type); 12122TypeSymbol? type = this.VisitType(node.Type); 12130TypeSymbol? type = this.VisitType(node.Type); 12138TypeSymbol? type = this.VisitType(node.Type); 12144TypeSymbol? type = this.VisitType(node.Type); 12154TypeSymbol? type = this.VisitType(node.Type); 12165TypeSymbol? type = this.VisitType(node.Type); 12171TypeSymbol? type = this.VisitType(node.Type); 12177TypeSymbol? type = this.VisitType(node.Type); 12182TypeSymbol? type = this.VisitType(node.Type); 12187TypeSymbol? type = this.VisitType(node.Type); 12195TypeSymbol? type = this.VisitType(node.Type); 12205TypeSymbol? type = this.VisitType(node.Type); 12211TypeSymbol? inputType = this.VisitType(node.InputType); 12212TypeSymbol? narrowedType = this.VisitType(node.NarrowedType); 12217TypeSymbol? inputType = this.VisitType(node.InputType); 12218TypeSymbol? narrowedType = this.VisitType(node.NarrowedType); 12226TypeSymbol? inputType = this.VisitType(node.InputType); 12227TypeSymbol? narrowedType = this.VisitType(node.NarrowedType); 12238TypeSymbol? inputType = this.VisitType(node.InputType); 12239TypeSymbol? narrowedType = this.VisitType(node.NarrowedType); 12251TypeSymbol? inputType = this.VisitType(node.InputType); 12252TypeSymbol? narrowedType = this.VisitType(node.NarrowedType); 12261TypeSymbol? inputType = this.VisitType(node.InputType); 12262TypeSymbol? narrowedType = this.VisitType(node.NarrowedType); 12270TypeSymbol? inputType = this.VisitType(node.InputType); 12271TypeSymbol? narrowedType = this.VisitType(node.NarrowedType); 12290TypeSymbol? type = this.VisitType(node.Type); 12296TypeSymbol? inputType = this.VisitType(node.InputType); 12297TypeSymbol? narrowedType = this.VisitType(node.NarrowedType); 12304TypeSymbol? inputType = this.VisitType(node.InputType); 12305TypeSymbol? narrowedType = this.VisitType(node.NarrowedType); 12311TypeSymbol? inputType = this.VisitType(node.InputType); 12312TypeSymbol? narrowedType = this.VisitType(node.NarrowedType); 12318TypeSymbol? inputType = this.VisitType(node.InputType); 12319TypeSymbol? narrowedType = this.VisitType(node.NarrowedType); 12324TypeSymbol? type = this.VisitType(node.Type); 12330TypeSymbol? type = this.VisitType(node.Type); 12337TypeSymbol? type = this.VisitType(node.Type); 12344TypeSymbol? type = this.VisitType(node.Type); 12350TypeSymbol? type = this.VisitType(node.Type); 12370TypeSymbol? type = this.VisitType(node.Type); 12378TypeSymbol? type = this.VisitType(node.Type); 12385private readonly ImmutableDictionary<BoundExpression, (NullabilityInfo Info, TypeSymbol? Type)> _updatedNullabilities; 12389public NullabilityRewriter(ImmutableDictionary<BoundExpression, (NullabilityInfo Info, TypeSymbol? Type)> updatedNullabilities, NullableWalker.SnapshotManager? snapshotManager, ImmutableDictionary<Symbol, Symbol>.Builder remappedSymbols) 12422if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12437if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12454if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12468if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12480if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12492if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12504if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12516if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12528if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12540if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12552if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12564if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12576if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12588if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12603if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12621if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12639if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12653if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12665if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12678TypeSymbol? constrainedToTypeOpt = GetUpdatedSymbol(node, node.ConstrainedToTypeOpt); 12683if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12698TypeSymbol? constrainedToTypeOpt = GetUpdatedSymbol(node, node.ConstrainedToTypeOpt); 12707if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12724if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12741if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12756TypeSymbol? constrainedToTypeOpt = GetUpdatedSymbol(node, node.ConstrainedToTypeOpt); 12759if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12776if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12794if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12812if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12830if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12847if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12864if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12882if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12901if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12919if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12942if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12960if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12978if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12998if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13016if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13035if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13049TypeSymbol? naturalTypeOpt = GetUpdatedSymbol(node, node.NaturalTypeOpt); 13055if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13073if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13090if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13107if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13134if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13152if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13169if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13187if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13205if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13219if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13231if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13243if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13255if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13267if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13279if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13291if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13303if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13319if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13337if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13351if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13366if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13384if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13404if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13421if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13438if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13456if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13470if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13485if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13499TypeSymbol elementPointerType = GetUpdatedSymbol(node, node.ElementPointerType); 13506if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13631TypeSymbol? exceptionTypeOpt = GetUpdatedSymbol(node, node.ExceptionTypeOpt); 13641if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13653if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13665if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13677if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13689if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13701if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13716if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13733if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13751if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13768if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13782if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13808if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13822TypeSymbol? naturalTypeOpt = GetUpdatedSymbol(node, node.NaturalTypeOpt); 13828if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13870TypeSymbol indexerType = GetUpdatedSymbol(node, node.IndexerType); 13881TypeSymbol sliceType = GetUpdatedSymbol(node, node.SliceType); 13903if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13922if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13941if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13958if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13977if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13995if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14015if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14029if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14045if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14065if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14083if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14103if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14122if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14141if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14158if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14178if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14195if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14218if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14232if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14247if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14265if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14284if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14301if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14319if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14334TypeSymbol receiverType = GetUpdatedSymbol(node, node.ReceiverType); 14338if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14352TypeSymbol receiverType = GetUpdatedSymbol(node, node.ReceiverType); 14355if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14373if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14392if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14411if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14425if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14442if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14459if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14476if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14494if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14512if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14529if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14543TypeSymbol elementType = GetUpdatedSymbol(node, node.ElementType); 14548if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14562TypeSymbol elementType = GetUpdatedSymbol(node, node.ElementType); 14567if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14585if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14602if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14620if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14638if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14658if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14676if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14695if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14714if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14731if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14752if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14769if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14786if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14803if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14817if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14829if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14846if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14865if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14879TypeSymbol inputType = GetUpdatedSymbol(node, node.InputType); 14880TypeSymbol narrowedType = GetUpdatedSymbol(node, node.NarrowedType); 14887TypeSymbol inputType = GetUpdatedSymbol(node, node.InputType); 14888TypeSymbol narrowedType = GetUpdatedSymbol(node, node.NarrowedType); 14895TypeSymbol inputType = GetUpdatedSymbol(node, node.InputType); 14896TypeSymbol narrowedType = GetUpdatedSymbol(node, node.NarrowedType); 14906TypeSymbol inputType = GetUpdatedSymbol(node, node.InputType); 14907TypeSymbol narrowedType = GetUpdatedSymbol(node, node.NarrowedType); 14918TypeSymbol inputType = GetUpdatedSymbol(node, node.InputType); 14919TypeSymbol narrowedType = GetUpdatedSymbol(node, node.NarrowedType); 14931TypeSymbol inputType = GetUpdatedSymbol(node, node.InputType); 14932TypeSymbol narrowedType = GetUpdatedSymbol(node, node.NarrowedType); 14944TypeSymbol inputType = GetUpdatedSymbol(node, node.InputType); 14945TypeSymbol narrowedType = GetUpdatedSymbol(node, node.NarrowedType); 14966TypeSymbol inputType = GetUpdatedSymbol(node, node.InputType); 14967TypeSymbol narrowedType = GetUpdatedSymbol(node, node.NarrowedType); 14974TypeSymbol inputType = GetUpdatedSymbol(node, node.InputType); 14975TypeSymbol narrowedType = GetUpdatedSymbol(node, node.NarrowedType); 14983TypeSymbol inputType = GetUpdatedSymbol(node, node.InputType); 14984TypeSymbol narrowedType = GetUpdatedSymbol(node, node.NarrowedType); 14991TypeSymbol inputType = GetUpdatedSymbol(node, node.InputType); 14992TypeSymbol narrowedType = GetUpdatedSymbol(node, node.NarrowedType); 14999if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 15014if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 15032if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 15050if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 15067if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 15093if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 15112if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
Lowering\AsyncRewriter\AsyncExceptionHandlerRewriter.cs (3)
40Debug.Assert(TypeSymbol.Equals(factory.CurrentType, (containingType ?? containingMethod.ContainingType), TypeCompareKind.ConsiderEverything2)); 554var catchType = node.ExceptionTypeOpt ?? _F.SpecialType(SpecialType.System_Object); 1055if (!_hoistedLocals.Keys.Any(l => l.Name == local.Name && TypeSymbol.Equals(l.Type, local.Type, TypeCompareKind.ConsiderEverything2)))
Lowering\AsyncRewriter\AsyncIteratorMethodToStateMachineRewriter.cs (1)
170TypeSymbol combinedTokensType = combinedTokens.Type;
Lowering\AsyncRewriter\AsyncMethodBuilderMemberCollection.cs (8)
39internal readonly TypeSymbol ResultType; 88TypeSymbol resultType, 181TypeSymbol methodLevelBuilder = null; 190TypeSymbol builderArgument; 256var resultType = returnType.TypeArgumentsWithAnnotationsNoUseSiteDiagnostics.Single().Type; 271TypeSymbol builderArgument; 339private static NamedTypeSymbol ValidateBuilderType(SyntheticBoundNodeFactory F, TypeSymbol builderAttributeArgument, Accessibility desiredAccessibility, bool isGeneric, bool forMethodLevelBuilder = false) 375TypeSymbol resultType,
Lowering\AsyncRewriter\AsyncMethodToStateMachineRewriter.cs (8)
61private readonly Dictionary<TypeSymbol, FieldSymbol> _awaiterFields; 100_awaiterFields = new Dictionary<TypeSymbol, FieldSymbol>(Symbols.SymbolEqualityComparer.IgnoringDynamicTupleNamesAndNullability); 108private FieldSymbol GetAwaiterField(TypeSymbol awaiterType) 367TypeSymbol type = VisitType(node.Type); 471TypeSymbol awaiterFieldType = awaiterTemp.Type.IsVerifierReference() 491(TypeSymbol.Equals(awaiterField.Type, awaiterTemp.Type, TypeCompareKind.ConsiderEverything2)) 523TypeSymbol.Equals(awaiterTemp.Type, awaiterField.Type, TypeCompareKind.ConsiderEverything2) 617private BoundStatement GenerateAwaitOnCompleted(TypeSymbol loweredAwaiterType, LocalSymbol awaiterTemp)
Lowering\AsyncRewriter\AsyncRewriter.AsyncIteratorRewriter.cs (3)
45Debug.Assert(!TypeSymbol.Equals(method.IteratorElementTypeWithAnnotations.Type, null, TypeCompareKind.ConsiderEverything2)); 134TypeSymbol elementType = ((AsyncStateMachine)stateMachineType).IteratorElementType; 432TypeSymbol returnType = IAsyncDisposable_DisposeAsync.ReturnType;
Lowering\AsyncRewriter\AsyncStateMachine.cs (3)
23internal readonly TypeSymbol IteratorElementType; // only for async-iterators 35var elementType = TypeMap.SubstituteType(asyncMethod.IteratorElementTypeWithAnnotations).Type; 78internal override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol> basesBeingResolved)
Lowering\BoundTreeToDifferentEnclosingContextRewriter.cs (4)
62var newType = VisitType(local.Type); 63if (TypeSymbol.Equals(newType, local.Type, TypeCompareKind.ConsiderEverything2) && 115public sealed override TypeSymbol? VisitType(TypeSymbol? type)
Lowering\ClosureConversion\ClosureConversion.Analysis.Tree.cs (1)
682TypeSymbol type;
Lowering\ClosureConversion\ClosureConversion.cs (14)
247Debug.Assert(thisParameter is null || TypeSymbol.Equals(thisParameter.Type, thisType, TypeCompareKind.ConsiderEverything2)); 585Debug.Assert(TypeSymbol.Equals(result.Type, frameType, TypeCompareKind.ConsiderEverything2)); 602if ((object)_currentFrameThis != null && TypeSymbol.Equals(_currentFrameThis.Type, frameClass, TypeCompareKind.ConsiderEverything2)) 615if (TypeSymbol.Equals(potentialParameter.Type.OriginalDefinition, frameClass, TypeCompareKind.ConsiderEverything2)) 682Debug.Assert(TypeSymbol.Equals(frameType, constructor.ContainingType, TypeCompareKind.ConsiderEverything2)); 854return (!_currentMethod.IsStatic && TypeSymbol.Equals(_currentMethod.ContainingType, _topLevelMethod.ContainingType, TypeCompareKind.ConsiderEverything2)) 861TypeSymbol type = VisitType(node.Type); 999while (!TypeSymbol.Equals(oldTypeArg.Type, newTypeArg.Type, TypeCompareKind.ConsiderEverything)); 1080var type = VisitType(node.Type); 1150var newType = this.VisitType(node.Type); 1278var exceptionTypeOpt = this.VisitType(node.ExceptionTypeOpt); 1628var newType = VisitType(node.Type); 1658TypeSymbol type = this.VisitType(node.Type); 1697var cacheVariableType = containerAsFrame.TypeMap.SubstituteType(node.Type).Type;
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (32)
298if (!TypeSymbol.Equals(index.Type, _int32Type, TypeCompareKind.ConsiderEverything2)) 316if (!TypeSymbol.Equals(index.Type, _int32Type, TypeCompareKind.ConsiderEverything2)) 487private BoundExpression VisitBinaryOperator(BinaryOperatorKind opKind, MethodSymbol methodOpt, TypeSymbol type, BoundExpression left, BoundExpression right) 510var promotedType = PromotedType(enumOperand.Type.StrippedType().GetEnumUnderlyingType()); 548private BoundExpression VisitAndPromoteEnumOperand(BoundExpression operand, TypeSymbol promotedType, bool isChecked) 567private BoundExpression MakeBinary(MethodSymbol methodOpt, TypeSymbol type, bool isLifted, bool requiresLifted, WellKnownMember opFactory, BoundExpression loweredLeft, BoundExpression loweredRight) 573_bound.Literal(isLifted && !TypeSymbol.Equals(methodOpt.ReturnType, type, TypeCompareKind.ConsiderEverything2)), 579private TypeSymbol PromotedType(TypeSymbol underlying) 598private BoundExpression Demote(BoundExpression node, TypeSymbol type, bool isChecked) 608var promotedType = e.IsNullableType() ? _nullableType.Construct(PromotedType(e.GetNullableUnderlyingType())) : PromotedType(e); 609if (!TypeSymbol.Equals(promotedType, type, TypeCompareKind.ConsiderEverything2)) 618private BoundExpression ConvertIndex(BoundExpression expr, TypeSymbol oldType, TypeSymbol newType) 700var operandType = node.Operand.Type; 701var strippedOperandType = operandType.StrippedType(); 702var conversionInputType = method.Parameters[0].Type; 703var isLifted = !TypeSymbol.Equals(operandType, conversionInputType, TypeCompareKind.ConsiderEverything2) && TypeSymbol.Equals(strippedOperandType, conversionInputType, TypeCompareKind.ConsiderEverything2); 705!TypeSymbol.Equals(strippedOperandType, ((node.ConversionKind == ConversionKind.ExplicitUserDefined) ? conversionInputType : conversionInputType.StrippedType()), TypeCompareKind.ConsiderEverything2); 706var resultType = (isLifted && method.ReturnType.IsNonNullableValueType() && node.Type.IsNullableType()) ? 733var intermediate = nullable.TypeArgumentsWithAnnotationsNoUseSiteDiagnostics[0].Type; 744private BoundExpression Convert(BoundExpression operand, TypeSymbol oldType, TypeSymbol newType, bool isChecked, bool isExplicit) 746return (TypeSymbol.Equals(oldType, newType, TypeCompareKind.ConsiderEverything2) && !isExplicit) ? operand : Convert(operand, newType, isChecked); 749private BoundExpression Convert(BoundExpression expr, TypeSymbol type, bool isChecked) 757private BoundExpression DelegateCreation(BoundExpression receiver, MethodSymbol method, TypeSymbol delegateType, bool requiresInstanceReceiver) 856ImmutableArray.Create<TypeSymbol>(underlyingDelegateType), 880TypeSymbol lambdaParamType = node.LeftPlaceholder.Type; 889private BoundExpression MakeConversionLambda(Conversion conversion, TypeSymbol fromType, TypeSymbol toType) 1188var promotedType = PromotedType(arg.Type.StrippedType().GetEnumUnderlyingType());
Lowering\ClosureConversion\LambdaCapturedVariable.cs (2)
51TypeSymbol type = GetCapturedVariableFieldType(frame, captured); 116private static TypeSymbol GetCapturedVariableFieldType(SynthesizedContainer frame, Symbol variable)
Lowering\ClosureConversion\SynthesizedClosureMethod.cs (2)
212protected override ImmutableArray<TypeSymbol> ExtraSynthesizedRefParameters 213=> ImmutableArray<TypeSymbol>.CastUp(_structEnvironments);
Lowering\DiagnosticsPass_ExpressionTrees.cs (2)
402expr.Type is TypeSymbol type && 915private void CheckMethodGroup(BoundMethodGroup node, MethodSymbol method, bool isExtensionMethod, bool parentIsConversion, TypeSymbol convertedToType)
Lowering\DiagnosticsPass_Warnings.cs (12)
116TypeSymbol baseType = fieldAccess.FieldSymbol.ContainingType; 119if (TypeSymbol.Equals(baseType, marshalByRefType, TypeCompareKind.ConsiderEverything)) 154if ((object)interlocked != null && TypeSymbol.Equals(interlocked, method.ContainingType, TypeCompareKind.ConsiderEverything2)) 228Debug.Assert(TypeSymbol.Equals(expr1.Type, expr2.Type, TypeCompareKind.ConsiderEverything2)); 329TypeSymbol t; 350private static bool ConvertedHasEqual(BinaryOperatorKind oldOperatorKind, BoundNode node, out TypeSymbol type) 370if (parameters.Length == 2 && TypeSymbol.Equals(parameters[0].Type, t, TypeCompareKind.ConsiderEverything2) && TypeSymbol.Equals(parameters[1].Type, t, TypeCompareKind.ConsiderEverything2)) 612TypeSymbol from = conv.Operand.Type; 613TypeSymbol to = conv.Type; 851private static TypeSymbol GetTypeForLiftedComparisonWarning(BoundExpression node) 863TypeSymbol type = null;
Lowering\ExtensionMethodBodyRewriter.cs (1)
103TypeSymbol? type = this.VisitType(node.Type);
Lowering\ExtensionMethodReferenceRewriter.cs (5)
95TypeSymbol type) 194TypeSymbol? type = this.VisitType(node.Type); 207var type = rewriter.VisitType(node.Type); 227TypeSymbol? constrainedToTypeOpt = rewriter.VisitType(node.ConstrainedToTypeOpt); 228TypeSymbol? type = rewriter.VisitType(node.Type);
Lowering\InitializerRewriter.cs (1)
34var submissionResultType = method.ResultType;
Lowering\Instrumentation\CodeCoverageInstrumenter.cs (1)
116TypeSymbol payloadElementType = methodBodyFactory.SpecialType(SpecialType.System_Boolean);
Lowering\Instrumentation\CompoundInstrumenter.cs (1)
224ref TypeSymbol? rewrittenType,
Lowering\Instrumentation\DebugInfoInjector.cs (1)
460ref TypeSymbol? rewrittenType,
Lowering\Instrumentation\Instrumenter.cs (1)
299ref TypeSymbol? rewrittenType,
Lowering\Instrumentation\LocalStateTracingInstrumenter.cs (9)
128private readonly TypeSymbol _contextType; 132TypeSymbol contextType, 204private MethodSymbol? GetLocalOrParameterStoreLogger(TypeSymbol variableType, Symbol targetSymbol, bool? refAssignmentSourceIsLocal, SyntaxNode syntax) 249static bool hasOverriddenToString(TypeSymbol variableType) 388if (!TryGetLocalOrParameterInfo(original.Left, out var targetSymbol, out var targetType, out var targetIndex)) 409private bool TryGetLocalOrParameterInfo(BoundNode node, [NotNullWhen(true)] out Symbol? symbol, [NotNullWhen(true)] out TypeSymbol? type, [NotNullWhen(true)] out BoundExpression? indexExpression) 438TypeSymbol targetType, 499ref TypeSymbol? rewrittenType, 583if (!TryGetLocalOrParameterInfo(arguments[i], out var targetSymbol, out var targetType, out var targetIndex))
Lowering\IteratorRewriter\IteratorStateMachine.cs (1)
56internal override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol> basesBeingResolved)
Lowering\LocalRewriter\DelegateCacheContainer.cs (13)
18private readonly Dictionary<(TypeSymbol?, TypeSymbol, MethodSymbol), FieldSymbol> _delegateFields = new(CLRSignatureComparer.Instance); 62var delegateType = boundDelegateCreation.Type; 67var constrainedToTypeOpt = ((targetMethod.IsAbstract || targetMethod.IsVirtual) && boundDelegateCreation.Argument is BoundTypeExpression typeExpression) ? typeExpression.Type : null; 74var fieldType = TypeParameters.IsEmpty ? delegateType : TypeMap.SubstituteType(delegateType).Type; 92private sealed class CLRSignatureComparer : IEqualityComparer<(TypeSymbol? constrainedToTypeOpt, TypeSymbol delegateType, MethodSymbol targetMethod)> 96public bool Equals((TypeSymbol? constrainedToTypeOpt, TypeSymbol delegateType, MethodSymbol targetMethod) x, (TypeSymbol? constrainedToTypeOpt, TypeSymbol delegateType, MethodSymbol targetMethod) y) 105public int GetHashCode((TypeSymbol? constrainedToTypeOpt, TypeSymbol delegateType, MethodSymbol targetMethod) conversion)
Lowering\LocalRewriter\DelegateCacheRewriter.cs (3)
177var delegateType = boundDelegateCreation.Type; 221private static void FindTypeParameters(TypeSymbol type, HashSet<TypeParameterSymbol> result) 234private static readonly Func<TypeSymbol, HashSet<TypeParameterSymbol>, bool, bool> s_typeParameterSymbolCollector = (typeSymbol, result, _) =>
Lowering\LocalRewriter\LocalRewriter.cs (13)
72Debug.Assert(TypeSymbol.Equals(factory.CurrentType, (containingType ?? containingMethod.ContainingType), TypeCompareKind.ConsiderEverything2)); 259TypeSymbol? type = node.Type; 581private static BoundExpression BadExpression(SyntaxNode syntax, TypeSymbol resultType, BoundExpression child) 586private static BoundExpression BadExpression(SyntaxNode syntax, TypeSymbol resultType, BoundExpression child1, BoundExpression child2) 591private static BoundExpression BadExpression(SyntaxNode syntax, TypeSymbol resultType, ImmutableArray<BoundExpression> children) 630TypeSymbol container = compilation.Assembly.GetSpecialType(type); 631TypeSymbol returnType = new ExtendedErrorTypeSymbol(compilation: compilation, name: descriptor.Name, errorInfo: null, arity: descriptor.Arity); 649TypeSymbol.Equals(node.Type, _compilation.GetWellKnownType(WellKnownType.System_Type), TypeCompareKind.AllIgnoreOptions)); 654var type = this.VisitType(node.Type); 675Debug.Assert(TypeSymbol.Equals(type, getTypeFromHandle.ReturnType, TypeCompareKind.AllIgnoreOptions)); 684var type = this.VisitType(node.Type); 831var indexType = VisitType(node.Indices[0].Type); 835if (TypeSymbol.Equals(
Lowering\LocalRewriter\LocalRewriter.DecisionDagRewriter.cs (3)
707public CasesComparer(TypeSymbol type) 948TypeSymbol returnType = _factory.SpecialType(SpecialType.System_UInt32); 949TypeSymbol paramType = stringPatternInput switch
Lowering\LocalRewriter\LocalRewriter.PatternLocalRewriter.cs (7)
202TypeSymbol inputType = input.Type; 211TypeSymbol type = t.Type; 248TypeSymbol type = e.Property.GetMethod.ReturnType; 377TypeSymbol objectType = _factory.SpecialType(SpecialType.System_Object); 398TypeSymbol comparisonType = input.Type.EnumUnderlyingTypeOrSelf(); 415TypeSymbol comparisonType = input.Type.EnumUnderlyingTypeOrSelf(); 493var baseType = typeEvaluation2.Type;
Lowering\LocalRewriter\LocalRewriter_AsOperator.cs (2)
20TypeSymbol rewrittenType = VisitType(node.Type); 39TypeSymbol rewrittenType)
Lowering\LocalRewriter\LocalRewriter_AssignmentOperator.cs (1)
322TypeSymbol? exprType = rewrittenRight.Type;
Lowering\LocalRewriter\LocalRewriter_Await.cs (1)
23private BoundExpression RewriteAwaitExpression(SyntaxNode syntax, BoundExpression rewrittenExpression, BoundAwaitableInfo awaitableInfo, TypeSymbol type, BoundAwaitExpressionDebugInfo debugInfo, bool used)
Lowering\LocalRewriter\LocalRewriter_BinaryOperator.cs (61)
73var type = node.Type; 186TypeSymbol type, 188TypeSymbol? constrainedToTypeOpt, 202TypeSymbol type, 204TypeSymbol? constrainedToTypeOpt, 544private BoundExpression RewriteLiftedBinaryOperator(SyntaxNode syntax, BinaryOperatorKind operatorKind, BoundExpression loweredLeft, BoundExpression loweredRight, TypeSymbol type, MethodSymbol? method, TypeSymbol? constrainedToTypeOpt) 608TypeSymbol? constrainedToTypeOpt, 609TypeSymbol type, 732private BoundExpression MakeTruthTestForDynamicLogicalOperator(SyntaxNode syntax, BinaryOperatorKind operatorKind, BoundExpression loweredLeft, TypeSymbol boolean, MethodSymbol? leftTruthOperator, TypeSymbol? constrainedToTypeOpt, bool negative) 769var parameterType = leftTruthOperator.Parameters[0].Type; 790TypeSymbol type, 792TypeSymbol? constrainedToTypeOpt) 803Debug.Assert(TypeSymbol.Equals(method.ReturnType, type, TypeCompareKind.ConsiderEverything2)); 819TypeSymbol? constrainedToTypeOpt) 830TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean); 1015TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean); 1149TypeSymbol? constrainedToTypeOpt) 1242TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean); 1316TypeSymbol type, 1318TypeSymbol? constrainedToTypeOpt) 1356TypeSymbol type, 1358TypeSymbol? constrainedToTypeOpt) 1381TypeSymbol type) 1425TypeSymbol type, 1427TypeSymbol? constrainedToTypeOpt) 1475TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean); 1527TypeSymbol type, 1529TypeSymbol? constrainedToTypeOpt) 1632Debug.Assert(TypeSymbol.Equals(seq.Type, conditional.Type, TypeCompareKind.ConsiderEverything2)); 1633Debug.Assert(TypeSymbol.Equals(conditional.Type, conditional.Consequence.Type, TypeCompareKind.ConsiderEverything2)); 1634Debug.Assert(TypeSymbol.Equals(conditional.Type, conditional.Alternative.Type, TypeCompareKind.ConsiderEverything2)); 1660TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean); 1852TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean); 1912private MethodSymbol UnsafeGetNullableMethod(SyntaxNode syntax, TypeSymbol nullableType, SpecialMember member) 1922internal static MethodSymbol UnsafeGetNullableMethod(SyntaxNode syntax, TypeSymbol nullableType, SpecialMember member, CSharpCompilation compilation, BindingDiagnosticBag diagnostics) 1929private bool TryGetNullableMethod(SyntaxNode syntax, TypeSymbol nullableType, SpecialMember member, out MethodSymbol result, bool isOptional = false) 1946TypeSymbol returnType) 2013private BoundExpression RewriteStringEquality(BoundBinaryOperator? oldNode, SyntaxNode syntax, BinaryOperatorKind operatorKind, BoundExpression loweredLeft, BoundExpression loweredRight, TypeSymbol type, SpecialMember member) 2026private BoundExpression RewriteDelegateOperation(SyntaxNode syntax, BinaryOperatorKind operatorKind, BoundExpression loweredLeft, BoundExpression loweredRight, TypeSymbol type, SpecialMember member) 2092TypeSymbol? exprType = rewrittenExpr.Type; 2101TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean); 2115TypeSymbol objectType = _compilation.GetSpecialType(SpecialType.System_Object); 2150TypeSymbol type, 2156TypeSymbol rightType = loweredRight.Type; 2212TypeSymbol type) 2223TypeSymbol leftType = loweredLeft.Type; 2228TypeSymbol rightType = loweredRight.Type; 2272TypeSymbol returnType, 2393TypeSymbol multiplicationResultType; 2394TypeSymbol convertedMultiplicationResultType; 2399TypeSymbol nativeIntType = _factory.SpecialType(SpecialType.System_IntPtr); 2413TypeSymbol longType = _factory.SpecialType(SpecialType.System_Int64); 2414TypeSymbol nativeIntType = _factory.SpecialType(SpecialType.System_IntPtr); 2426TypeSymbol longType = _factory.SpecialType(SpecialType.System_Int64); 2427TypeSymbol nativeIntType = _factory.SpecialType(SpecialType.System_IntPtr); 2438TypeSymbol ulongType = _factory.SpecialType(SpecialType.System_UInt64); 2439TypeSymbol nativeUIntType = _factory.SpecialType(SpecialType.System_UIntPtr); 2459return TypeSymbol.Equals(convertedMultiplicationResultType, multiplicationResultType, TypeCompareKind.ConsiderEverything2) 2468TypeSymbol returnType)
Lowering\LocalRewriter\LocalRewriter_Call.cs (3)
49Debug.Assert(node.ApplicableMethods.All(m => !m.RequiresInstanceReceiver && TypeSymbol.Equals(m.ContainingType, firstContainer, TypeCompareKind.ConsiderEverything2))); 936var receiverType = receiverTemp.Type; 1434private BoundExpression? CreateArrayEmptyCallIfAvailable(SyntaxNode syntax, TypeSymbol elementType)
Lowering\LocalRewriter\LocalRewriter_CollectionExpression.cs (16)
42var collectionTypeKind = conversion.GetCollectionExpressionTypeKind(out var elementType, out _, out _); 191private bool ShouldUseIEnumerableBulkAddMethod(TypeSymbol spreadType, TypeSymbol targetEnumerableType, MethodSymbol? getEnumeratorMethod) 246private BoundExpression VisitArrayOrSpanCollectionExpression(BoundCollectionExpression node, CollectionExpressionTypeKind collectionTypeKind, TypeSymbol collectionType, TypeWithAnnotations elementType) 328Debug.Assert(TypeSymbol.Equals(array.Type, spanConstructor.Parameters[0].Type, TypeCompareKind.AllIgnoreOptions)); 332private BoundExpression VisitCollectionInitializerCollectionExpression(BoundCollectionExpression node, TypeSymbol collectionType) 516internal static bool IsAllocatingRefStructCollectionExpression(BoundCollectionExpressionBase node, CollectionExpressionTypeKind collectionKind, TypeSymbol? elementType, CSharpCompilation compilation) 525internal static bool ShouldUseRuntimeHelpersCreateSpan(BoundCollectionExpressionBase node, TypeSymbol elementType) 665var spreadTypeOriginalDefinition = spreadExpression.Type!.OriginalDefinition; 690var spanType = CallAsSpanMethod(spreadExpression, asSpanMethod).Type!.OriginalDefinition; 699bool tryGetToArrayMethod(TypeSymbol spreadTypeOriginalDefinition, WellKnownType wellKnownType, WellKnownMember wellKnownMember, [NotNullWhen(true)] out MethodSymbol? toArrayMethod) 701if (TypeSymbol.Equals(spreadTypeOriginalDefinition, this._compilation.GetWellKnownType(wellKnownType), TypeCompareKind.AllIgnoreOptions)) 793var elementType = ((ArrayTypeSymbol)arrayTemp.Type).ElementType; 856private bool TryGetSpanConversion(TypeSymbol type, bool writableOnly, out MethodSymbol? asSpanMethod) 903var type = expression.Type; 1129var elementType = ((NamedTypeSymbol)spanTemp.Type).TypeArgumentsWithAnnotationsNoUseSiteDiagnostics[0].Type;
Lowering\LocalRewriter\LocalRewriter_CompoundAssignmentOperator.cs (9)
24Debug.Assert(TypeSymbol.Equals(node.Right.Type, node.Operator.RightType, TypeCompareKind.ConsiderEverything2)); 47TypeSymbol? leftType = node.Left.Type; // type of the target 49Debug.Assert(TypeSymbol.Equals(leftType, node.Type, TypeCompareKind.AllIgnoreOptions)); 214Debug.Assert(TypeSymbol.Equals(transformedLHS.Type, node.Left.Type, TypeCompareKind.AllIgnoreOptions)); 470if (TypeSymbol.Equals( 818private static bool IsInvariantArray(TypeSymbol? type) 891var type = expression.Type; 907var type = expression.Type; 1004private static bool ConstantValueIsTrivial(TypeSymbol? type)
Lowering\LocalRewriter\LocalRewriter_ConditionalAccess.cs (7)
45var receiverType = loweredReceiver.Type; 123TypeSymbol type = this.VisitType(node.Type); 125TypeSymbol nodeType = node.Type; 126TypeSymbol accessExpressionType = loweredAccessExpression.Type; 133if (!TypeSymbol.Equals(accessExpressionType, nodeType, TypeCompareKind.ConsiderEverything2) && nodeType.IsNullableType()) 135Debug.Assert(TypeSymbol.Equals(accessExpressionType, nodeType.GetNullableUnderlyingType(), TypeCompareKind.ConsiderEverything2)); 140Debug.Assert(TypeSymbol.Equals(accessExpressionType, nodeType, TypeCompareKind.ConsiderEverything2) ||
Lowering\LocalRewriter\LocalRewriter_ConditionalOperator.cs (1)
48TypeSymbol rewrittenType,
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (62)
69var rewrittenType = VisitType(node.Type); 81var toType = node.Type; 96var byteType = ((NamedTypeSymbol)node.Type).TypeArgumentsWithAnnotationsNoUseSiteDiagnostics.Single().Type; 225var type = rewrittenNode.Type; 268TypeSymbol rewrittenType) 303TypeSymbol rewrittenType) 618var sourceType = rewrittenOperand.Type; 738private void EnsureParamCollectionAttributeExists(SyntaxNode node, TypeSymbol delegateType) 751private static bool NeedsCheckedConversionInExpressionTree(TypeSymbol? source, TypeSymbol target, bool explicitCastInCode) 760SpecialType GetUnderlyingSpecialType(TypeSymbol type) => 789private BoundExpression MakeConversionNode(BoundExpression rewrittenOperand, TypeSymbol rewrittenType, bool @checked, bool acceptFailingConversion = false, bool markAsChecked = false) 809TypeSymbol rewrittenType, 842TypeSymbol rewrittenType, 876if (!TypeSymbol.Equals(rewrittenOperand.Type, conversion.BestUserDefinedConversionAnalysis.FromType, TypeCompareKind.ConsiderEverything2)) 886if (!TypeSymbol.Equals(rewrittenOperand.Type, conversion.Method.GetParameterType(0), TypeCompareKind.ConsiderEverything2)) 895TypeSymbol userDefinedConversionRewrittenType = conversion.Method.ReturnType; 915if (!TypeSymbol.Equals(userDefined.Type, conversion.BestUserDefinedConversionAnalysis.ToType, TypeCompareKind.ConsiderEverything2)) 924if (!TypeSymbol.Equals(userDefined.Type, rewrittenType, TypeCompareKind.ConsiderEverything2)) 1041TypeSymbol rewrittenType) 1050TypeSymbol? rewrittenOperandType = rewrittenOperand.Type; 1097TypeSymbol rewrittenType) 1101TypeSymbol rewrittenOperandType = rewrittenOperand.Type; 1106TypeSymbol typeFrom = rewrittenOperandType.StrippedType(); 1107TypeSymbol typeTo = rewrittenType.StrippedType(); 1108if (!TypeSymbol.Equals(typeFrom, typeTo, TypeCompareKind.ConsiderEverything2) && (typeFrom.SpecialType == SpecialType.System_Decimal || typeTo.SpecialType == SpecialType.System_Decimal)) 1111TypeSymbol typeFromUnderlying = typeFrom; 1112TypeSymbol typeToUnderlying = typeTo; 1148TypeSymbol type) 1209TypeSymbol type) 1242TypeSymbol type) 1282TypeSymbol type) 1313Debug.Assert(TypeSymbol.Equals(seq.Type, conditional.Type, TypeCompareKind.ConsiderEverything2)); 1314Debug.Assert(TypeSymbol.Equals(conditional.Type, conditional.Consequence.Type, TypeCompareKind.ConsiderEverything2)); 1315Debug.Assert(TypeSymbol.Equals(conditional.Type, conditional.Alternative.Type, TypeCompareKind.ConsiderEverything2)); 1344TypeSymbol rewrittenType) 1350var parameterType = conversion.Method.GetParameterType(0); 1377Debug.Assert(TypeSymbol.Equals(result.Type, rewrittenType, TypeCompareKind.ConsiderEverything2)); 1381private BoundExpression MakeLiftedUserDefinedConversionConsequence(BoundCall call, TypeSymbol resultType) 1385Debug.Assert(resultType.IsNullableType() && TypeSymbol.Equals(resultType.GetNullableUnderlyingType(), call.Method.ReturnType, TypeCompareKind.ConsiderEverything2)); 1398TypeSymbol rewrittenType) 1488TypeSymbol rewrittenType) 1495TypeSymbol source = rewrittenOperand.Type; 1496TypeSymbol target = rewrittenType; 1537public static SpecialMember GetIntPtrConversionMethod(TypeSymbol source, TypeSymbol target) 1542TypeSymbol t0 = target.StrippedType(); 1543TypeSymbol s0 = source.StrippedType(); 1653private static SpecialMember DecimalConversionMethod(TypeSymbol typeFrom, TypeSymbol typeTo) 1697private BoundExpression RewriteDecimalConversion(SyntaxNode syntax, BoundExpression operand, TypeSymbol fromType, TypeSymbol toType, bool @checked, bool isImplicit, ConstantValue? constantValueOpt) 1725static TypeSymbol get64BitType(CSharpCompilation compilation, bool signed) => compilation.GetSpecialType(signed ? SpecialType.System_Int64 : SpecialType.System_UInt64); 1728private BoundExpression RewriteDecimalConversionCore(SyntaxNode syntax, BoundExpression operand, TypeSymbol fromType, TypeSymbol toType, bool isImplicit, ConstantValue? constantValueOpt) 1746Debug.Assert(TypeSymbol.Equals(method.ReturnType, toType, TypeCompareKind.ConsiderEverything2)); 1754private Conversion TryMakeConversion(SyntaxNode syntax, Conversion conversion, TypeSymbol fromType, TypeSymbol toType, bool @checked) 1855private Conversion TryMakeConversion(SyntaxNode syntax, TypeSymbol fromType, TypeSymbol toType, bool @checked) 1866private Conversion TryMakeUserDefinedConversion(SyntaxNode syntax, MethodSymbol meth, TypeSymbol fromType, TypeSymbol toType, bool @checked, bool isImplicit)
Lowering\LocalRewriter\LocalRewriter_DeconstructionAssignmentOperator.cs (2)
58TypeSymbol leftType, 339var tupleType = expression.Type;
Lowering\LocalRewriter\LocalRewriter_Event.cs (2)
102TypeSymbol eventType = eventSymbol.Type; 225TypeSymbol type)
Lowering\LocalRewriter\LocalRewriter_Field.cs (3)
23TypeSymbol type, 72if (!TypeSymbol.Equals(underlyingField.ContainingType, currentLinkType, TypeCompareKind.ConsiderEverything2)) 91while (!TypeSymbol.Equals(underlyingField.ContainingType, currentLinkType, TypeCompareKind.ConsiderEverything2));
Lowering\LocalRewriter\LocalRewriter_FixedStatement.cs (8)
239TypeSymbol localType = localSymbol.Type; 247TypeSymbol initializerType = ((PointerTypeSymbol)initializerExpr.Type).PointedAtType; 306TypeSymbol localType = localSymbol.Type; 310var initializerType = initializerExpr.Type; 443TypeSymbol localType = localSymbol.Type; 445TypeSymbol? initializerType = initializerExpr.Type; 512TypeSymbol localType = localSymbol.Type; 514TypeSymbol? initializerType = initializerExpr.Type;
Lowering\LocalRewriter\LocalRewriter_ForEachStatement.cs (16)
42TypeSymbol? nodeExpressionType = collectionExpression.Type; 70private bool CanRewriteForEachAsFor(SyntaxNode forEachSyntax, TypeSymbol nodeExpressionType, [NotNullWhen(true)] out MethodSymbol? indexerGet, [NotNullWhen(true)] out MethodSymbol? lengthGet) 73var origDefinition = nodeExpressionType.OriginalDefinition; 154TypeSymbol enumeratorType = getEnumeratorInfo.Method.ReturnType; 310TypeSymbol enumeratorType, 476TypeSymbol awaitExpressionType = disposeAwaitableInfoOpt.GetResult?.ReturnType ?? _compilation.DynamicType; 494private BoundExpression ConvertReceiverForInvocation(CSharpSyntaxNode syntax, BoundExpression receiver, MethodSymbol method, Conversion receiverConversion, TypeSymbol convertedReceiverType) 598TypeSymbol intType = _compilation.GetSpecialType(SpecialType.System_Int32); 599TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean); 770TypeSymbol inlineArrayType = boundArrayVar.Type; 899TypeSymbol intType = _compilation.GetSpecialType(SpecialType.System_Int32); 900TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean); 1049TypeSymbol intType = _compilation.GetSpecialType(SpecialType.System_Int32); 1050TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean); 1218private static BoundLocal MakeBoundLocal(CSharpSyntaxNode syntax, LocalSymbol local, TypeSymbol type) 1238private BoundStatement MakePositionIncrement(CSharpSyntaxNode syntax, BoundLocal boundPositionVar, TypeSymbol intType)
Lowering\LocalRewriter\LocalRewriter_Index.cs (2)
69private BoundExpression ConvertToNullable(SyntaxNode syntax, TypeSymbol targetNullableType, BoundExpression underlyingValue) 72Debug.Assert(TypeSymbol.Equals(targetNullableType.GetNullableUnderlyingType(), underlyingValue.Type, TypeCompareKind.AllIgnoreOptions));
Lowering\LocalRewriter\LocalRewriter_IndexerAccess.cs (9)
118TypeSymbol type = indexer.Type; 229if (TypeSymbol.Equals(node.Argument.Type, _compilation.GetWellKnownType(WellKnownType.System_Index), TypeCompareKind.AllIgnoreOptions)) 241Debug.Assert(TypeSymbol.Equals(node.Argument.Type, _compilation.GetWellKnownType(WellKnownType.System_Range), TypeCompareKind.AllIgnoreOptions)); 435if (TypeSymbol.Equals( 444Debug.Assert(TypeSymbol.Equals( 482Debug.Assert(TypeSymbol.Equals( 676Debug.Assert(TypeSymbol.Equals( 709Debug.Assert(TypeSymbol.Equals( 774Debug.Assert(TypeSymbol.Equals(
Lowering\LocalRewriter\LocalRewriter_IsOperator.cs (5)
20TypeSymbol rewrittenType = VisitType(node.Type); 31TypeSymbol rewrittenType) 48var operandType = rewrittenOperand.Type; 49var targetType = rewrittenTargetType.Type; 84TypeSymbol type)
Lowering\LocalRewriter\LocalRewriter_Literal.cs (1)
23private BoundExpression MakeLiteral(SyntaxNode syntax, ConstantValue constantValue, TypeSymbol? type, BoundLiteral? oldNodeOpt = null)
Lowering\LocalRewriter\LocalRewriter_LockStatement.cs (2)
30TypeSymbol? argumentType = rewrittenArgument.Type; 141TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean);
Lowering\LocalRewriter\LocalRewriter_NullCoalescingAssignmentOperator.cs (2)
41Debug.Assert(TypeSymbol.Equals(transformedLHS.Type, node.LeftOperand.Type, TypeCompareKind.AllIgnoreOptions)); 115Debug.Assert(TypeSymbol.Equals(transformedLHS.Type, node.LeftOperand.Type, TypeCompareKind.AllIgnoreOptions));
Lowering\LocalRewriter\LocalRewriter_NullCoalescingOperator.cs (7)
17TypeSymbol? rewrittenResultType = VisitType(node.Type); 29TypeSymbol? rewrittenResultType) 235private BoundExpression GetConvertedLeftForNullCoalescingOperator(BoundExpression rewrittenLeft, BoundValuePlaceholder? leftPlaceholder, BoundExpression? leftConversion, TypeSymbol rewrittenResultType) 242TypeSymbol rewrittenLeftType = rewrittenLeft.Type; 252if (!TypeSymbol.Equals(rewrittenLeftType, rewrittenResultType, TypeCompareKind.ConsiderEverything2) 256TypeSymbol strippedLeftType = rewrittenLeftType.GetNullableUnderlyingType(); 259if (TypeSymbol.Equals(strippedLeftType, rewrittenResultType, TypeCompareKind.ConsiderEverything2))
Lowering\LocalRewriter\LocalRewriter_ObjectCreationExpression.cs (5)
81Debug.Assert(TypeSymbol.Equals(rewrittenObjectCreation.Type, ((NamedTypeSymbol)node.Type).ComImportCoClass, TypeCompareKind.ConsiderEverything2)); 114Debug.Assert(TypeSymbol.Equals(rewrittenObjectCreation.Type, ((NamedTypeSymbol)node.Type).ComImportCoClass, TypeCompareKind.ConsiderEverything2)); 133TypeSymbol type = withExpr.Type; 259TypeSymbol type) 341method = method.Construct(ImmutableArray.Create<TypeSymbol>(typeParameter));
Lowering\LocalRewriter\LocalRewriter_ObjectOrCollectionInitializerExpression.cs (7)
226var rewrittenType = VisitType(initializer.Type); 400Debug.Assert(assignment.Type.IsDynamic() || TypeSymbol.Equals(rewrittenAccess.Type, assignment.Type, TypeCompareKind.AllIgnoreOptions)); 454Debug.Assert(TypeSymbol.Equals(rangeArgument.Type, _compilation.GetWellKnownType(WellKnownType.System_Range), TypeCompareKind.ConsiderEverything)); 472Debug.Assert(TypeSymbol.Equals(rewrittenAccess.Type, assignment.Type, TypeCompareKind.AllIgnoreOptions)); 505Debug.Assert(TypeSymbol.Equals(rewrittenAccess.Type, assignment.Type, TypeCompareKind.AllIgnoreOptions)); 517if (TypeSymbol.Equals(implicitIndexer.Argument.Type, _compilation.GetWellKnownType(WellKnownType.System_Index), TypeCompareKind.ConsiderEverything)) 539Debug.Assert(TypeSymbol.Equals(rewrittenAccess.Type, assignment.Type, TypeCompareKind.AllIgnoreOptions));
Lowering\LocalRewriter\LocalRewriter_PropertyAccess.cs (1)
31TypeSymbol type,
Lowering\LocalRewriter\LocalRewriter_Range.cs (1)
143TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean);
Lowering\LocalRewriter\LocalRewriter_StackAlloc.cs (6)
28var type = stackAllocNode.Type; 37var elementType = stackAllocNode.ElementType; 50else if (TypeSymbol.Equals(type.OriginalDefinition, _compilation.GetWellKnownType(WellKnownType.System_Span_T), TypeCompareKind.ConsiderEverything2)) 97private BoundExpression RewriteStackAllocCountToSize(BoundExpression countExpression, TypeSymbol elementType) 109TypeSymbol uintType = _factory.SpecialType(SpecialType.System_UInt32); 110TypeSymbol uintPtrType = _factory.SpecialType(SpecialType.System_UIntPtr);
Lowering\LocalRewriter\LocalRewriter_StringInterpolation.cs (2)
57TypeSymbol localType = trailingParameter.Type; 219private BoundExpression LowerPartsToString(InterpolatedStringHandlerData data, ImmutableArray<BoundExpression> parts, SyntaxNode syntax, TypeSymbol type)
Lowering\LocalRewriter\LocalRewriter_SwitchExpression.cs (1)
148bool implicitConversionExists(BoundExpression expression, TypeSymbol type)
Lowering\LocalRewriter\LocalRewriter_TryStatement.cs (1)
90TypeSymbol? rewrittenExceptionTypeOpt = this.VisitType(node.ExceptionTypeOpt);
Lowering\LocalRewriter\LocalRewriter_TupleBinaryOperator.cs (6)
30var boolType = node.Type; // we can re-use the bool type 69var elementType = resultTypes[i].Type; 246BoundExpression left, BoundExpression right, TypeSymbol boolType, 267TypeSymbol boolType, ArrayBuilder<LocalSymbol> temps, BinaryOperatorKind operatorKind) 485BoundExpression left, BoundExpression right, TypeSymbol type, 542BoundExpression left, BoundExpression right, TypeSymbol boolType, BinaryOperatorKind operatorKind)
Lowering\LocalRewriter\LocalRewriter_UnaryOperator.cs (27)
66TypeSymbol? constrainedToTypeOpt, 68TypeSymbol type) 78TypeSymbol? constrainedToTypeOpt, 80TypeSymbol type) 113Debug.Assert(TypeSymbol.Equals(type, method.ReturnType, TypeCompareKind.ConsiderEverything2)); 182TypeSymbol? constrainedToTypeOpt, 184TypeSymbol type) 246TypeSymbol? constrainedToTypeOpt, 248TypeSymbol type) 327Debug.Assert(TypeSymbol.Equals(seq.Type, conditional.Type, TypeCompareKind.ConsiderEverything2)); 328Debug.Assert(TypeSymbol.Equals(conditional.Type, conditional.Consequence.Type, TypeCompareKind.ConsiderEverything2)); 329Debug.Assert(TypeSymbol.Equals(conditional.Type, conditional.Alternative.Type, TypeCompareKind.ConsiderEverything2)); 353private BoundExpression GetLiftedUnaryOperatorConsequence(UnaryOperatorKind kind, SyntaxNode syntax, MethodSymbol? method, TypeSymbol? constrainedToTypeOpt, TypeSymbol type, BoundExpression nonNullOperand) 416TypeSymbol? operandType = node.Operand.Type; //type of the variable being incremented 418Debug.Assert(TypeSymbol.Equals(operandType, node.Type, TypeCompareKind.AllIgnoreOptions)); 444TypeSymbol? operandType = left.Type; //type of the variable being incremented 453Debug.Assert(TypeSymbol.Equals(operandType, transformedLHS.Type, TypeCompareKind.AllIgnoreOptions)); 572TypeSymbol? operandType = transformedLHS.Type; //type of the variable being incremented 574Debug.Assert(TypeSymbol.Equals(operandType, node.Type, TypeCompareKind.ConsiderEverything2)); 773TypeSymbol type = node.MethodOpt.GetParameterType(0); 777Debug.Assert(TypeSymbol.Equals(node.MethodOpt.GetParameterType(0), node.MethodOpt.ReturnType, TypeCompareKind.ConsiderEverything2)); 863TypeSymbol unaryOperandType = GetUnaryOperatorType(node); 872(TypeSymbol binaryOperandType, ConstantValue constantOne) = GetConstantOneForIncrement(_compilation, binaryOperatorKind); 1030private TypeSymbol GetUnaryOperatorType(BoundIncrementOperator node) 1151TypeSymbol? underlyingType = node.Type; 1217private static (TypeSymbol, ConstantValue) GetConstantOneForIncrement(
Lowering\LocalRewriter\LocalRewriter_UsingStatement.cs (5)
150TypeSymbol expressionType = rewrittenExpression.Type; 162TypeSymbol iDisposableType = node.AwaitOpt is null ? 218TypeSymbol localType = localSymbol.Type; 238TypeSymbol iDisposableType = awaitOpt is null ? 480TypeSymbol awaitExpressionType = awaitOpt.GetResult?.ReturnType ?? _compilation.DynamicType;
Lowering\LocalRewriter\LoweredDynamicOperation.cs (4)
24private readonly TypeSymbol _resultType; 29public LoweredDynamicOperation(SyntheticBoundNodeFactory? factory, BoundExpression? siteInitialization, BoundExpression siteInvocation, TypeSymbol resultType, ImmutableArray<LocalSymbol> temps) 42TypeSymbol resultType) 52public static LoweredDynamicOperation Bad(TypeSymbol resultType, ImmutableArray<BoundExpression> children)
Lowering\LocalRewriter\LoweredDynamicOperationFactory.cs (15)
77TypeSymbol resultType) 117TypeSymbol resultType) 155TypeSymbol resultType) 212TypeSymbol resultType; 271var resultType = AssemblySymbol.DynamicType; 304TypeSymbol resultType; 334TypeSymbol type, 605TypeSymbol resultType) 699return synthesizedContainer.Construct(synthesizedContainer.ConstructedFromTypeParameters.Cast<TypeParameterSymbol, TypeSymbol>()); 724TypeSymbol resultType) 829var argType = boundArgument.Type; 896private TypeSymbol[] MakeCallSiteDelegateSignature(TypeSymbol callSiteType, BoundExpression? receiver, ImmutableArray<BoundExpression> arguments, BoundExpression? right, TypeSymbol resultType) 899var result = new TypeSymbol[1 + (receiver != null ? 1 : 0) + arguments.Length + (right != null ? 1 : 0) + (resultType.IsVoidType() ? 0 : 1)];
Lowering\MethodToClassRewriter.cs (6)
101var rewrittenType = this.VisitType(node.Type); 286TypeSymbol rewrittenType = VisitType(node.Type); 329TypeSymbol type = this.VisitType(node.Type); 348TypeSymbol type = this.VisitType(node.Type); 397TypeSymbol type = this.VisitType(node.Type); 398TypeSymbol receiverType = this.VisitType(node.ReceiverType);
Lowering\SpillSequenceSpiller.cs (2)
724TypeSymbol exceptionTypeOpt = this.VisitType(node.ExceptionTypeOpt); 1043var receiverType = receiver.Type;
Lowering\StateMachineRewriter\IteratorAndAsyncCaptureWalker.cs (1)
211var type = (variable.Kind == SymbolKind.Local) ? ((LocalSymbol)variable).Type : ((ParameterSymbol)variable).Type;
Lowering\StateMachineRewriter\MethodToStateMachineRewriter.cs (7)
70private Dictionary<TypeSymbol, ArrayBuilder<StateMachineFieldSymbol>>? _lazyAvailableReusableHoistedFields; 209Debug.Assert(TypeSymbol.Equals(frameClass, result.Type, TypeCompareKind.ConsiderEverything2)); 462private StateMachineFieldSymbol GetOrAllocateReusableHoistedField(TypeSymbol type, out bool reused, LocalSymbol? local = null) 499_lazyAvailableReusableHoistedFields = new Dictionary<TypeSymbol, ArrayBuilder<StateMachineFieldSymbol>>(Symbols.SymbolEqualityComparer.IgnoringDynamicTupleNamesAndNullability); 564var type = TypeMap.SubstituteType(local.Type).Type; 566Debug.Assert(TypeSymbol.Equals(type, replacement.Type, TypeCompareKind.ConsiderEverything2)); 685TypeSymbol fieldType = expr.Type;
Lowering\StateMachineRewriter\StateMachineFieldSymbol.cs (2)
38public StateMachineFieldSymbol(NamedTypeSymbol stateMachineType, TypeSymbol type, string name, SynthesizedLocalKind synthesizedKind, int slotIndex, bool isPublic) 43public StateMachineFieldSymbol(NamedTypeSymbol stateMachineType, TypeSymbol type, string name, LocalSlotDebugInfo slotDebugInfo, int slotIndex, bool isPublic) :
Lowering\StateMachineRewriter\StateMachineRewriter.cs (2)
63Debug.Assert(TypeSymbol.Equals(F.CurrentType, method.ContainingType, TypeCompareKind.ConsiderEverything2)); 185var fieldType = typeMap.SubstituteType(local.Type).Type;
Lowering\SynthesizedMethodBaseSymbol.cs (3)
104protected virtual ImmutableArray<TypeSymbol> ExtraSynthesizedRefParameters 106get { return default(ImmutableArray<TypeSymbol>); } 137foreach (var extra in extraSynthed)
Lowering\SynthesizedSubmissionFields.cs (1)
63var hostObjectTypeSymbol = _compilation.GetHostObjectTypeSymbol();
Lowering\SyntheticBoundNodeFactory.cs (51)
134Debug.Assert(TopLevelMethod is null || TypeSymbol.Equals(TopLevelMethod.ContainingType, CurrentType, TypeCompareKind.ConsiderEverything2)); 143TypeSymbol.Equals(CurrentFunction.ContainingType, CurrentType, TypeCompareKind.ConsiderEverything2)); 178public StateMachineFieldSymbol StateMachineField(TypeSymbol type, string name, bool isPublic = false, bool isThis = false) 186public StateMachineFieldSymbol StateMachineFieldForRegularParameter(TypeSymbol type, string name, ParameterSymbol parameter, bool isPublic) 194public StateMachineFieldSymbol StateMachineField(TypeSymbol type, string name, SynthesizedLocalKind synthesizedKind, int slotIndex) 202public StateMachineFieldSymbol StateMachineField(TypeSymbol type, string name, LocalSlotDebugInfo slotDebugInfo, int slotIndex) 239public BoundBadExpression BadExpression(TypeSymbol type) 595TypeSymbol type, 617TypeSymbol type, 637public ParameterSymbol SynthesizedParameter(TypeSymbol type, string name, MethodSymbol? container = null, int ordinal = 0) 642public BoundBinaryOperator Binary(BinaryOperatorKind kind, TypeSymbol type, BoundExpression left, BoundExpression right) 647public BoundAsOperator As(BoundExpression operand, TypeSymbol type) 652public BoundIsOperator Is(BoundExpression operand, TypeSymbol type) 739public BoundLiteral Literal(ConstantValue value, TypeSymbol type) 798public BoundExpression StaticCall(TypeSymbol receiver, MethodSymbol method, params BoundExpression[] args) 819public BoundExpression StaticCall(WellKnownMember method, ImmutableArray<TypeSymbol> typeArgs, params BoundExpression[] args) 912public BoundExpression Conditional(BoundExpression condition, BoundExpression consequence, BoundExpression alternative, TypeSymbol type, bool isRef = false) 920Debug.Assert(TypeSymbol.Equals(valueTypeReceiver.Type, referenceTypeReceiver.Type, TypeCompareKind.ConsiderEverything2)); 1035public BoundSequence Sequence(BoundExpression[] sideEffects, BoundExpression result, TypeSymbol? type = null) 1038var resultType = type ?? result.Type; 1230public BoundExpression ThrowExpression(BoundExpression thrown, TypeSymbol type) 1235public BoundExpression Null(TypeSymbol type) 1247public static BoundExpression Null(TypeSymbol type, SyntaxNode syntax) 1256public BoundTypeExpression Type(TypeSymbol type) 1261public BoundExpression Typeof(WellKnownType type, TypeSymbol systemType) 1266public BoundExpression Typeof(TypeSymbol type, TypeSymbol systemType) 1282Debug.Assert(TypeSymbol.Equals(systemType, getTypeFromHandle.ReturnType, TypeCompareKind.AllIgnoreOptions)); 1292public BoundExpression Typeof(TypeWithAnnotations type, TypeSymbol systemType) 1297public ImmutableArray<BoundExpression> TypeOfs(ImmutableArray<TypeWithAnnotations> typeArguments, TypeSymbol systemType) 1308public BoundExpression Sizeof(TypeSymbol type) 1382public BoundExpression InstrumentationPayloadRoot(int analysisKind, TypeSymbol payloadType) 1413public BoundExpression MethodInfo(MethodSymbol method, TypeSymbol systemReflectionMethodInfo) 1448private MethodSymbol GetMethodFromHandleMethod(NamedTypeSymbol methodContainer, TypeSymbol systemReflectionMethodOrConstructorInfo) 1480public BoundExpression Convert(TypeSymbol type, BoundExpression arg, bool allowBoxingByRefLikeTypeParametersToObject = false) 1484if (TypeSymbol.Equals(type, arg.Type, TypeCompareKind.ConsiderEverything2)) 1510public BoundExpression Convert(TypeSymbol type, BoundExpression arg, Conversion conversion, bool isChecked = false) 1514if (conversion.Method is { } && !TypeSymbol.Equals(conversion.Method.Parameters[0].Type, arg.Type, TypeCompareKind.ConsiderEverything2)) 1537public BoundExpression ArrayOrEmpty(TypeSymbol elementType, BoundExpression[] elements) 1549public BoundExpression ArrayOrEmpty(TypeSymbol elementType, ImmutableArray<BoundExpression> elements) 1564public BoundExpression Array(TypeSymbol elementType, ImmutableArray<BoundExpression> elements) 1573public BoundExpression Array(TypeSymbol elementType, BoundExpression length) 1583internal BoundExpression Default(TypeSymbol type) 1588internal static BoundExpression Default(TypeSymbol type, SyntaxNode syntax) 1628internal BoundExpression NullOrDefault(TypeSymbol typeSymbol) 1633internal static BoundExpression NullOrDefault(TypeSymbol typeSymbol, SyntaxNode syntax) 1694var type = argument.Type; 1764TypeSymbol exprType = rewrittenExpr.Type; 1773TypeSymbol boolType = Compilation.GetSpecialType(CodeAnalysis.SpecialType.System_Boolean); 1787TypeSymbol objectType = SpecialType(CodeAnalysis.SpecialType.System_Object); 1826TypeSymbol returnType)
Operations\CSharpOperationFactory.cs (11)
764return CreateBoundDynamicMemberAccessOperation(implicitReceiver, typeArgumentsOpt: ImmutableArray<TypeSymbol>.Empty, memberName: "Add", 951ImmutableArray<TypeSymbol> typeArgumentsOpt, 1082if (boundOperand.Kind == BoundKind.ConvertedTupleLiteral && TypeSymbol.Equals(boundOperand.Type, boundConversion.Type, TypeCompareKind.ConsiderEverything2)) 1103!TypeSymbol.Equals(nestedConversion.Type, nestedOperand.Type, TypeCompareKind.ConsiderEverything2)) 1374private static TypeParameterSymbol? GetConstrainedToTypeForOperator(MethodSymbol? operatorMethod, TypeSymbol? constrainedToTypeOpt) 1497TypeSymbol? constrainedToTypeOpt = GetConstrainedToTypeForOperator(boundBinaryOperator.LogicalOperator, boundBinaryOperator.ConstrainedToTypeOpt) ?? 2242TypeSymbol? naturalType = boundTupleExpression switch 2520TypeSymbol inputType = boundConstantPattern.InputType; 2521TypeSymbol narrowedType = boundConstantPattern.NarrowedType; 2531TypeSymbol inputType = boundRelationalPattern.InputType; 2532TypeSymbol narrowedType = boundRelationalPattern.NarrowedType;
Operations\CSharpOperationFactory_Methods.cs (1)
33private IInstanceReferenceOperation CreateImplicitReceiver(SyntaxNode syntax, TypeSymbol type) =>
Symbols\AbstractTypeMap.cs (12)
92internal TypeWithAnnotations SubstituteType(TypeSymbol previous) 97TypeSymbol result; 145if (!TypeSymbol.Equals(modifier, substituted, TypeCompareKind.ConsiderEverything2)) 156if (!TypeSymbol.Equals(modifier, substituted, TypeCompareKind.ConsiderEverything2)) 174protected virtual TypeSymbol SubstituteDynamicType() 286internal ImmutableArray<TypeSymbol> SubstituteTypesWithoutModifiers(ImmutableArray<TypeSymbol> original) 293TypeSymbol[] result = null; 297var t = original[i]; 298var substituted = SubstituteType(t).Type; 303result = new TypeSymbol[original.Length]; 364var map = PooledDictionary<TypeSymbol, int>.GetInstance();
Symbols\AliasSymbol.cs (7)
230internal abstract NamespaceOrTypeSymbol GetAliasTarget(ConsList<TypeSymbol>? basesBeingResolved); 234var target = this.Target as TypeSymbol; 312internal override NamespaceOrTypeSymbol GetAliasTarget(ConsList<TypeSymbol>? basesBeingResolved) 373ConsList<TypeSymbol>? basesBeingResolved) 416if (namespaceOrType is TypeSymbol { IsNativeIntegerWrapperType: true } && 454internal override NamespaceOrTypeSymbol GetAliasTarget(ConsList<TypeSymbol>? basesBeingResolved)
Symbols\AnonymousTypes\AnonymousTypeField.cs (1)
34public TypeSymbol Type => TypeWithAnnotations.Type;
Symbols\AnonymousTypes\PublicSymbols\AnonymousManager.TypeOrDelegatePublicSymbol.cs (6)
160internal sealed override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol> basesBeingResolved) 264internal sealed override NamedTypeSymbol GetDeclaredBaseType(ConsList<TypeSymbol> basesBeingResolved) 269internal sealed override ImmutableArray<NamedTypeSymbol> GetDeclaredInterfaces(ConsList<TypeSymbol> basesBeingResolved) 281internal abstract override bool Equals(TypeSymbol t2, TypeCompareKind comparison); 304internal sealed override bool HasCollectionBuilderAttribute(out TypeSymbol? builderType, out string? methodName) 311internal sealed override bool HasAsyncMethodBuilderAttribute(out TypeSymbol? builderArgument)
Symbols\AnonymousTypes\PublicSymbols\AnonymousType.DelegatePublicSymbol.cs (1)
77internal override bool Equals(TypeSymbol t2, TypeCompareKind comparison)
Symbols\AnonymousTypes\PublicSymbols\AnonymousType.TypePublicSymbol.cs (1)
120internal override bool Equals(TypeSymbol t2, TypeCompareKind comparison)
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.DelegateTemplateSymbol.cs (5)
34TypeSymbol objectType, 35TypeSymbol intPtrType, 36TypeSymbol? voidReturnTypeOpt, 52static SynthesizedDelegateInvokeMethod createInvokeMethod(AnonymousDelegateTemplateSymbol containingType, RefKindVector refKinds, TypeSymbol? voidReturnTypeOpt) 241internal override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol>? basesBeingResolved = null) => ImmutableArray<NamedTypeSymbol>.Empty;
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.TemplateSymbol.cs (1)
138internal override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol> basesBeingResolved)
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.TypeOrDelegateTemplateSymbol.cs (4)
240internal sealed override NamedTypeSymbol GetDeclaredBaseType(ConsList<TypeSymbol> basesBeingResolved) 245internal sealed override ImmutableArray<NamedTypeSymbol> GetDeclaredInterfaces(ConsList<TypeSymbol> basesBeingResolved) 344internal sealed override bool HasCollectionBuilderAttribute(out TypeSymbol? builderType, out string? methodName) 351internal sealed override bool HasAsyncMethodBuilderAttribute(out TypeSymbol? builderArgument)
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.TypeParameterSymbol.cs (1)
142internal override TypeSymbol GetDeducedBaseType(ConsList<TypeParameterSymbol> inProgress)
Symbols\ArrayTypeSymbol.cs (10)
213public TypeSymbol ElementType 344internal override bool Equals(TypeSymbol? t2, TypeCompareKind comparison) 378TypeSymbol current = this; 394internal override bool ApplyNullableTransforms(byte defaultTransformFlag, ImmutableArray<byte> transforms, ref int position, out TypeSymbol result) 409internal override TypeSymbol SetNullabilityForReferenceTypes(Func<TypeWithAnnotations, TypeWithAnnotations> transform) 414internal override TypeSymbol MergeEquivalentTypes(TypeSymbol other, VarianceKind variance) 466internal override bool GetUnificationUseSiteDiagnosticRecursive(ref DiagnosticInfo result, Symbol owner, ref HashSet<TypeSymbol> checkedTypes) 551internal override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol>? basesBeingResolved = null) 598internal sealed override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol>? basesBeingResolved = null)
Symbols\AssemblySymbol.cs (7)
609internal static TypeSymbol DynamicType 743/// Resolves <see cref="System.Type"/> to a <see cref="TypeSymbol"/> available in this assembly 748internal TypeSymbol? GetTypeByReflectionType(Type type) 759TypeSymbol? symbol = GetTypeByReflectionType(typeInfo.GetElementType()!); 771TypeSymbol? symbol = GetTypeByReflectionType(typeInfo.GetElementType()!); 875var argSymbol = GetTypeByReflectionType(typeArguments[currentTypeArgument++]); 973Debug.Assert(!TypeSymbol.Equals(candidate, result, TypeCompareKind.ConsiderEverything));
Symbols\Attributes\AttributeData.cs (7)
250internal static void DecodeMemberNotNullAttribute<T>(TypeSymbol type, ref DecodeWellKnownAttributeArguments<AttributeSyntax, CSharpAttributeData, AttributeLocation> arguments) 286private static void ReportBadNotNullMemberIfNeeded(TypeSymbol type, DecodeWellKnownAttributeArguments<AttributeSyntax, CSharpAttributeData, AttributeLocation> arguments, string memberName) 300internal static void DecodeMemberNotNullWhenAttribute<T>(TypeSymbol type, ref DecodeWellKnownAttributeArguments<AttributeSyntax, CSharpAttributeData, AttributeLocation> arguments) 367var firstArgType = (TypeSymbol?)firstArg.TypeInternal; 642var builderType = (TypeSymbol?)CommonConstructorArguments[0].ValueInternal;
Symbols\Attributes\PEAttributeData.cs (1)
80TypeSymbol? attributeClass;
Symbols\Attributes\SourceAttributeData.cs (4)
240TypeSymbol? lazySystemType = null; 256bool matches(byte[] targetSignature, ImmutableArray<ParameterSymbol> parameters, ref TypeSymbol? lazySystemType) 282TypeSymbol parameterType = parameters[parameterIndex].Type; 440if (!TypeSymbol.Equals(parameterType, lazySystemType, TypeCompareKind.ConsiderEverything))
Symbols\Attributes\WellKnownAttributeData\TypeWellKnownEarlyAttributeData.cs (2)
13public CollectionBuilderAttributeData(TypeSymbol? builderType, string? methodName) 19public readonly TypeSymbol? BuilderType;
Symbols\BaseTypeAnalysis.cs (3)
117var fieldType = field?.NonPointerType(); 209TypeSymbol fieldType = field.NonPointerType(); 259internal static TypeSymbol NonPointerType(this FieldSymbol field) =>
Symbols\Compilation_WellKnownMembers.cs (49)
181TypeSymbol.Equals(result, _lazyWellKnownTypes[index], TypeCompareKind.ConsiderEverything2) || (_lazyWellKnownTypes[index]!.IsErrorType() && result.IsErrorType()) 195internal bool IsAttributeType(TypeSymbol type) 206internal bool IsExceptionType(TypeSymbol type, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 211internal bool IsReadOnlySpanType(TypeSymbol type) 213return TypeSymbol.Equals(type.OriginalDefinition, GetWellKnownType(WellKnownType.System_ReadOnlySpan_T), TypeCompareKind.ConsiderEverything2); 216internal bool IsEqualOrDerivedFromWellKnownClass(TypeSymbol type, WellKnownType wellKnownType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 232return TypeSymbol.Equals((TypeSymbol)type, GetWellKnownType(WellKnownType.System_Type), TypeCompareKind.ConsiderEverything2); 245internal static Symbol? GetRuntimeMember(NamedTypeSymbol declaringType, in MemberDescriptor descriptor, SignatureComparer<MethodSymbol, FieldSymbol, PropertySymbol, TypeSymbol, ParameterSymbol> comparer, AssemblySymbol? accessWithinOpt) 251internal static Symbol? GetRuntimeMember(ImmutableArray<Symbol> members, in MemberDescriptor descriptor, SignatureComparer<MethodSymbol, FieldSymbol, PropertySymbol, TypeSymbol, ParameterSymbol> comparer, AssemblySymbol? accessWithinOpt) 700TypeSymbol debuggableAttribute = GetWellKnownType(WellKnownType.System_Diagnostics_DebuggableAttribute); 707TypeSymbol debuggingModesType = GetWellKnownType(WellKnownType.System_Diagnostics_DebuggableAttribute__DebuggingModes); 775internal SynthesizedAttributeData? SynthesizeDynamicAttribute(TypeSymbol type, int customModifiersCount, RefKind refKindOpt = RefKind.None) 795internal SynthesizedAttributeData? SynthesizeTupleNamesAttribute(TypeSymbol type) 825public static ImmutableArray<string?> Encode(TypeSymbol type) 838public static ImmutableArray<TypedConstant> Encode(TypeSymbol type, TypeSymbol stringType) 854internal static bool TryGetNames(TypeSymbol type, ArrayBuilder<string?> namesBuilder) 860private static bool AddNames(TypeSymbol type, ArrayBuilder<string?> namesBuilder) 889internal static ImmutableArray<TypedConstant> Encode(TypeSymbol type, RefKind refKind, int customModifiersCount, TypeSymbol booleanType) 901internal static ImmutableArray<bool> Encode(TypeSymbol type, RefKind refKind, int customModifiersCount) 908internal static ImmutableArray<bool> EncodeWithoutCustomModifierFlags(TypeSymbol type, RefKind refKind) 915internal static void Encode(TypeSymbol type, int customModifiersCount, RefKind refKind, ArrayBuilder<bool> transformFlagsBuilder, bool addCustomModifierFlags) 937private static bool AddFlags(TypeSymbol type, ArrayBuilder<bool> transformFlagsBuilder, bool isNestedNamedType, bool addCustomModifierFlags) 996Func<TypeSymbol, (ArrayBuilder<bool>, bool), bool, bool> visitor = 997(TypeSymbol type, (ArrayBuilder<bool> builder, bool addCustomModifierFlags) param, bool isNestedNamedType) => AddFlags(type, param.builder, isNestedNamedType, param.addCustomModifierFlags); 1041internal static void Encode(ArrayBuilder<bool> builder, TypeSymbol type) 1047private static bool AddFlags(TypeSymbol type, ArrayBuilder<bool> builder) 1061internal class SpecialMembersSignatureComparer : SignatureComparer<MethodSymbol, FieldSymbol, PropertySymbol, TypeSymbol, ParameterSymbol> 1071protected override TypeSymbol? GetMDArrayElementType(TypeSymbol type) 1085protected override TypeSymbol GetFieldType(FieldSymbol field) 1090protected override TypeSymbol GetPropertyType(PropertySymbol property) 1095protected override TypeSymbol? GetGenericTypeArgument(TypeSymbol type, int argumentIndex) 1113protected override TypeSymbol? GetGenericTypeDefinition(TypeSymbol type) 1141protected override TypeSymbol GetParamType(ParameterSymbol parameter) 1146protected override TypeSymbol? GetPointedToType(TypeSymbol type) 1151protected override TypeSymbol GetReturnType(MethodSymbol method) 1156protected override TypeSymbol? GetSZArrayElementType(TypeSymbol type) 1185protected override bool IsGenericMethodTypeParam(TypeSymbol type, int paramPosition) 1199protected override bool IsGenericTypeParam(TypeSymbol type, int paramPosition) 1213protected override bool MatchArrayRank(TypeSymbol type, int countOfDimensions) 1224protected override bool MatchTypeToTypeId(TypeSymbol type, int typeId) 1249protected override bool MatchTypeToTypeId(TypeSymbol type, int typeId)
Symbols\ConstantValueUtils.cs (1)
81TypeSymbol typeSymbol,
Symbols\ConstraintsHelper.cs (20)
144TypeSymbol deducedBaseType = effectiveBaseClass; 164TypeSymbol constraintDeducedBase; 241var underlyingType = constraintType.Type.GetNullableUnderlyingType(); 469var deducedBase = bounds.DeducedBaseType; 489this TypeSymbol type, 502this TypeSymbol type, 519public static void CheckAllConstraints(this TypeSymbol type, CheckConstraintsArgsBoxed args) 585private static readonly Func<TypeSymbol, CheckConstraintsArgsBoxed, bool, bool> s_checkConstraintsSingleTypeFunc = (type, arg, unused) => CheckConstraintsSingleType(type, in arg.Args); 587private static bool CheckConstraintsSingleType(TypeSymbol type, in CheckConstraintsArgs args) 681ConsList<TypeSymbol> basesBeingResolved) 760private static bool HasDuplicateInterfaces(NamedTypeSymbol type, ConsList<TypeSymbol> basesBeingResolved) 1230var type = typeWithAnnotations.Type; 1273var type = typeWithAnnotations.Type; 1451private static TypeParameterDiagnosticInfo GenerateConflictingConstraintsError(TypeParameterSymbol typeParameter, TypeSymbol deducedBase, bool classConflict) 1481private static ConstructorConstraintError SatisfiesConstructorConstraint(TypeSymbol typeArgument) 1552private static bool IsEncompassedBy(ConversionsBase conversions, TypeSymbol a, TypeSymbol b, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1563private static bool IsValidEncompassedByArgument(TypeSymbol type) 1624private static void CheckEffectiveAndDeducedBaseTypes(ConversionsBase conversions, TypeSymbol effectiveBase, TypeSymbol deducedBase)
Symbols\ConstructedNamedTypeSymbol.cs (2)
30internal override bool GetUnificationUseSiteDiagnosticRecursive(ref DiagnosticInfo result, Symbol owner, ref HashSet<TypeSymbol> checkedTypes) 113internal sealed override bool GetUnificationUseSiteDiagnosticRecursive(ref DiagnosticInfo result, Symbol owner, ref HashSet<TypeSymbol> checkedTypes)
Symbols\CustomModifier.cs (2)
58internal static ImmutableArray<CustomModifier> Convert(ImmutableArray<ModifierInfo<TypeSymbol>> customModifiers) 67private static CustomModifier Convert(ModifierInfo<TypeSymbol> customModifier)
Symbols\DynamicTypeEraser.cs (5)
16private readonly TypeSymbol _objectType; 18public DynamicTypeEraser(TypeSymbol objectType) 24public TypeSymbol EraseDynamic(TypeSymbol type) 29protected override TypeSymbol SubstituteDynamicType()
Symbols\DynamicTypeSymbol.cs (7)
89internal override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol>? basesBeingResolved) 186internal override bool GetUnificationUseSiteDiagnosticRecursive(ref DiagnosticInfo result, Symbol owner, ref HashSet<TypeSymbol> checkedTypes) 198internal override bool Equals(TypeSymbol? t2, TypeCompareKind comparison) 223internal override bool ApplyNullableTransforms(byte defaultTransformFlag, ImmutableArray<byte> transforms, ref int position, out TypeSymbol result) 229internal override TypeSymbol SetNullabilityForReferenceTypes(Func<TypeWithAnnotations, TypeWithAnnotations> transform) 234internal override TypeSymbol MergeEquivalentTypes(TypeSymbol other, VarianceKind variance)
Symbols\ErrorMethodSymbol.cs (5)
18private readonly TypeSymbol _containingType; 19private readonly TypeSymbol _returnType; 22public ErrorMethodSymbol(TypeSymbol containingType, TypeSymbol returnType, string name) 292internal sealed override bool HasAsyncMethodBuilderAttribute(out TypeSymbol builderArgument)
Symbols\ErrorPropertySymbol.cs (1)
33public ErrorPropertySymbol(Symbol containingSymbol, TypeSymbol type, string name, bool isIndexer, bool isIndexedProperty)
Symbols\ErrorTypeSymbol.cs (6)
38/// Called by <see cref="AbstractTypeMap.SubstituteType(TypeSymbol)"/> to perform substitution 454internal override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol>? basesBeingResolved) 464internal override NamedTypeSymbol? GetDeclaredBaseType(ConsList<TypeSymbol> basesBeingResolved) 469internal override ImmutableArray<NamedTypeSymbol> GetDeclaredInterfaces(ConsList<TypeSymbol> basesBeingResolved) 581internal sealed override bool HasCollectionBuilderAttribute(out TypeSymbol? builderType, out string? methodName) 588internal sealed override bool HasAsyncMethodBuilderAttribute(out TypeSymbol? builderArgument)
Symbols\ErrorTypeSymbol.ErrorTypeParameterSymbol.cs (2)
177internal override TypeSymbol? GetDeducedBaseType(ConsList<TypeParameterSymbol> inProgress) 187internal override bool Equals(TypeSymbol? t2, TypeCompareKind comparison)
Symbols\EventSymbol.cs (3)
58public TypeSymbol Type => TypeWithAnnotations.Type; 300HashSet<TypeSymbol>? unificationCheckedTypes = null; 350return TypeSymbol.Equals(this.ContainingType, other.ContainingType, compareKind) && ReferenceEquals(this.OriginalDefinition, other.OriginalDefinition);
Symbols\ExtendedErrorTypeSymbol.cs (10)
192internal override NamedTypeSymbol? GetDeclaredBaseType(ConsList<TypeSymbol> basesBeingResolved) 197internal override ImmutableArray<NamedTypeSymbol> GetDeclaredInterfaces(ConsList<TypeSymbol> basesBeingResolved) 222internal static TypeSymbol? ExtractNonErrorType(TypeSymbol? oldSymbol) 241TypeSymbol? type = oldError._candidateSymbols[0] as TypeSymbol; 250internal static TypeKind ExtractNonErrorTypeKind(TypeSymbol oldSymbol) 272TypeSymbol? type = sym as TypeSymbol; 286internal override bool Equals(TypeSymbol? t2, TypeCompareKind comparison)
Symbols\Extensions\RewrittenMethodSymbol.cs (1)
108internal sealed override bool HasAsyncMethodBuilderAttribute(out TypeSymbol? builderArgument)
Symbols\Extensions\SynthesizedExtensionMarker.cs (1)
80TypeSymbol parameterType = parameter.TypeWithAnnotations.Type;
Symbols\FieldSymbol.cs (2)
75public TypeSymbol Type => TypeWithAnnotations.Type; 366HashSet<TypeSymbol> unificationCheckedTypes = null;
Symbols\FunctionPointers\FunctionPointerMethodSymbol.cs (9)
23public static FunctionPointerMethodSymbol CreateFromSource(FunctionPointerTypeSyntax syntax, Binder typeBinder, BindingDiagnosticBag diagnostics, ConsList<TypeSymbol> basesBeingResolved, bool suppressUseSiteDiagnostics) 330public static FunctionPointerMethodSymbol CreateFromMetadata(ModuleSymbol containingModule, CallingConvention callingConvention, ImmutableArray<ParamInfo<TypeSymbol>> retAndParamTypes) 543private FunctionPointerMethodSymbol(CallingConvention callingConvention, ImmutableArray<ParamInfo<TypeSymbol>> retAndParamTypes, bool useUpdatedEscapeRules) 547ParamInfo<TypeSymbol> retInfo = retAndParamTypes[0]; 558static ImmutableArray<FunctionPointerParameterSymbol> makeParametersFromMetadata(ReadOnlySpan<ParamInfo<TypeSymbol>> parameterTypes, FunctionPointerMethodSymbol parent) 566ParamInfo<TypeSymbol> param = parameterTypes[i]; 581static RefKind getRefKind(ParamInfo<TypeSymbol> param, ImmutableArray<CustomModifier> paramRefCustomMods, RefKind hasInRefKind, RefKind hasOutRefKind, bool requiresLocationAllowed) 800internal bool GetUnificationUseSiteDiagnosticRecursive(ref DiagnosticInfo? result, Symbol owner, ref HashSet<TypeSymbol> checkedTypes) 863internal sealed override bool HasAsyncMethodBuilderAttribute(out TypeSymbol? builderArgument)
Symbols\FunctionPointers\FunctionPointerTypeSymbol.cs (9)
19public static FunctionPointerTypeSymbol CreateFromSource(FunctionPointerTypeSyntax syntax, Binder typeBinder, BindingDiagnosticBag diagnostics, ConsList<TypeSymbol> basesBeingResolved, bool suppressUseSiteDiagnostics) 56public static FunctionPointerTypeSymbol CreateFromMetadata(ModuleSymbol containingModule, Cci.CallingConvention callingConvention, ImmutableArray<ParamInfo<TypeSymbol>> retAndParamTypes) 99internal override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol>? basesBeingResolved = null) => ImmutableArray<NamedTypeSymbol>.Empty; 101internal override bool Equals(TypeSymbol t2, TypeCompareKind compareKind) 137internal override bool ApplyNullableTransforms(byte defaultTransformFlag, ImmutableArray<byte> transforms, ref int position, out TypeSymbol result) 157internal override bool GetUnificationUseSiteDiagnosticRecursive(ref DiagnosticInfo? result, Symbol owner, ref HashSet<TypeSymbol> checkedTypes) 162internal override TypeSymbol MergeEquivalentTypes(TypeSymbol other, VarianceKind variance) 174internal override TypeSymbol SetNullabilityForReferenceTypes(Func<TypeWithAnnotations, TypeWithAnnotations> transform)
Symbols\FunctionTypeSymbol.cs (9)
27/// A <see cref="TypeSymbol"/> implementation that represents the lazily-inferred signature of a 28/// lambda expression or method group. This is implemented as a <see cref="TypeSymbol"/> 154internal override bool ApplyNullableTransforms(byte defaultTransformFlag, ImmutableArray<byte> transforms, ref int position, out TypeSymbol result) => throw ExceptionUtilities.Unreachable(); 158internal override bool GetUnificationUseSiteDiagnosticRecursive(ref DiagnosticInfo result, Symbol owner, ref HashSet<TypeSymbol> checkedTypes) => throw ExceptionUtilities.Unreachable(); 160internal override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol>? basesBeingResolved = null) => ImmutableArray<NamedTypeSymbol>.Empty; 162internal override TypeSymbol MergeEquivalentTypes(TypeSymbol other, VarianceKind variance) 181internal override TypeSymbol SetNullabilityForReferenceTypes(Func<TypeWithAnnotations, TypeWithAnnotations> transform) 207internal override bool Equals(TypeSymbol t2, TypeCompareKind compareKind)
Symbols\LocalSymbol.cs (1)
73public TypeSymbol Type => TypeWithAnnotations.Type;
Symbols\MemberSignatureComparer.cs (7)
674private static bool HaveSameTypeConstraints(TypeParameterSymbol typeParameter1, TypeMap? typeMap1, TypeParameterSymbol typeParameter2, TypeMap? typeMap2, IEqualityComparer<TypeSymbol> comparer) 691var substitutedTypes1 = new HashSet<TypeSymbol>(comparer); 692var substitutedTypes2 = new HashSet<TypeSymbol>(comparer); 721private static bool AreConstraintTypesSubset(HashSet<TypeSymbol> constraintTypes1, HashSet<TypeSymbol> constraintTypes2, TypeParameterSymbol typeParameter2) 723foreach (var constraintType in constraintTypes1) 751private static void SubstituteConstraintTypes(ImmutableArray<TypeWithAnnotations> types, TypeMap? typeMap, HashSet<TypeSymbol> result)
Symbols\MemberSymbolExtensions.cs (7)
89return member.ContainingSymbol is TypeSymbol { IsExtension: true }; 97return member.ContainingSymbol is TypeSymbol { IsExtension: true }; 102return member.ContainingSymbol is TypeSymbol { IsExtension: true }; 247internal static Symbol? GetReducedAndFilteredSymbol(this Symbol member, ImmutableArray<TypeWithAnnotations> typeArguments, TypeSymbol receiverType, CSharpCompilation compilation, bool checkFullyInferred) 462return ((TypeSymbol)m).CustomModifierCount(); 574internal static ImmutableArray<TypeSymbol> GetMemberTypeArgumentsNoUseSiteDiagnostics(this Symbol symbol) 586return ImmutableArray<TypeSymbol>.Empty;
Symbols\Metadata\PE\DynamicTypeDecoder.cs (17)
64internal static TypeSymbol TransformType( 65TypeSymbol metadataType, 86internal static TypeSymbol TransformTypeWithoutCustomModifierFlags( 87TypeSymbol type, 103private static TypeSymbol TransformTypeInternal( 104TypeSymbol metadataType, 126TypeSymbol transformedType = decoder.TransformType(metadataType); 140private TypeSymbol TransformType(TypeSymbol type) 252bool containerIsChanged = (!TypeSymbol.Equals(newContainingType, containingType, TypeCompareKind.ConsiderEverything2)); 281TypeSymbol transformedTypeArg = TransformType(typeArg.Type); 290anyTransformed |= !TypeSymbol.Equals(transformedTypeArg, typeArg.Type, TypeCompareKind.ConsiderEverything2); 312TypeSymbol transformedElementType = TransformType(arrayType.ElementType); 318return TypeSymbol.Equals(transformedElementType, arrayType.ElementType, TypeCompareKind.ConsiderEverything2) ? 335TypeSymbol transformedPointedAtType = TransformType(pointerType.PointedAtType); 341return TypeSymbol.Equals(transformedPointedAtType, pointerType.PointedAtType, TypeCompareKind.ConsiderEverything2) ? 407var transformedType = decoder.TransformType(typeWithAnnotations.Type);
Symbols\Metadata\PE\MemberRefMetadataDecoder.cs (18)
31private readonly TypeSymbol _containingType; 35TypeSymbol containingType) : 49protected override TypeSymbol GetGenericMethodTypeParamSymbol(int position) 58protected override TypeSymbol GetGenericTypeParamSymbol(int position) 150ParamInfo<TypeSymbol>[] targetParamInfo = this.DecodeSignatureParametersOrThrow(ref signaturePointer, signatureHeader, out typeParamCount); 160FieldInfo<TypeSymbol> fieldInfo = this.DecodeFieldSignature(ref signaturePointer); 174private static FieldSymbol FindFieldBySignature(TypeSymbol targetTypeSymbol, string targetMemberName, in FieldInfo<TypeSymbol> fieldInfo) 185TypeSymbol.Equals((fieldType = field.TypeWithAnnotations).Type, fieldInfo.Type, TypeCompareKind.CLRSignatureCompareOptions) && 197private static MethodSymbol FindMethodBySignature(TypeSymbol targetTypeSymbol, string targetMemberName, SignatureHeader targetMemberSignatureHeader, int targetMemberTypeParamCount, ParamInfo<TypeSymbol>[] targetParamInfo) 216private static bool MethodSymbolMatchesParamInfo(MethodSymbol candidateMethod, ParamInfo<TypeSymbol>[] targetParamInfo) 247private static bool ParametersMatch(ParameterSymbol candidateParam, TypeMap candidateMethodTypeMap, ref ParamInfo<TypeSymbol> targetParam) 261if (!TypeSymbol.Equals(substituted.Type, targetParam.Type, TypeCompareKind.CLRSignatureCompareOptions)) 275private static bool ReturnTypesMatch(MethodSymbol candidateMethod, TypeMap candidateMethodTypeMap, ref ParamInfo<TypeSymbol> targetReturnParam) 285TypeSymbol targetReturnType = targetReturnParam.Type; 289if (!TypeSymbol.Equals(substituted.Type, targetReturnType, TypeCompareKind.CLRSignatureCompareOptions)) 303private static bool CustomModifiersMatch(ImmutableArray<CustomModifier> candidateCustomModifiers, ImmutableArray<ModifierInfo<TypeSymbol>> targetCustomModifiers)
Symbols\Metadata\PE\MetadataDecoder.cs (26)
21internal class MetadataDecoder : MetadataDecoder<PEModuleSymbol, TypeSymbol, MethodSymbol, FieldSymbol, Symbol> 69protected override TypeSymbol GetGenericMethodTypeParamSymbol(int position) 86protected override TypeSymbol GetGenericTypeParamSymbol(int position) 106protected override ConcurrentDictionary<TypeDefinitionHandle, TypeSymbol> GetTypeHandleToTypeMap() 111protected override ConcurrentDictionary<TypeReferenceHandle, TypeSymbol> GetTypeRefHandleToTypeMap() 118protected override TypeSymbol LookupNestedTypeDefSymbol(TypeSymbol container, ref MetadataTypeName emittedName) 132protected override TypeSymbol LookupTopLevelTypeDefSymbol( 155protected override TypeSymbol LookupTopLevelTypeDefSymbol(string moduleName, ref MetadataTypeName emittedName, out bool isNoPiaLocalType) 187protected override TypeSymbol LookupTopLevelTypeDefSymbol(ref MetadataTypeName emittedName, out bool isNoPiaLocalType) 214public static bool IsOrClosedOverATypeFromAssemblies(TypeSymbol symbol, ImmutableArray<AssemblySymbol> assemblies) 272protected override TypeSymbol SubstituteNoPiaLocalType( 279TypeSymbol result; 284TypeSymbol baseType = null; 312ConcurrentDictionary<TypeDefinitionHandle, TypeSymbol> cache = GetTypeHandleToTypeMap(); 315TypeSymbol newresult = cache.GetOrAdd(typeDef, result); 332TypeSymbol baseType, 488protected override MethodSymbol FindMethodSymbolInType(TypeSymbol typeSymbol, MethodDefinitionHandle targetMethodDef) 515protected override FieldSymbol FindFieldSymbolInType(TypeSymbol typeSymbol, FieldDefinitionHandle fieldDef) 531internal override Symbol GetSymbolForMemberRef(MemberReferenceHandle memberRef, TypeSymbol scope = null, bool methodsOnly = false) 533TypeSymbol targetTypeSymbol = GetMemberRefTypeSymbol(memberRef); 548if (!TypeSymbol.Equals(scope, targetTypeSymbol, TypeCompareKind.ConsiderEverything2) && 576protected override void EnqueueTypeSymbolInterfacesAndBaseTypes(Queue<TypeDefinitionHandle> typeDefsToSearch, Queue<TypeSymbol> typeSymbolsToSearch, TypeSymbol typeSymbol) 586protected override void EnqueueTypeSymbol(Queue<TypeDefinitionHandle> typeDefsToSearch, Queue<TypeSymbol> typeSymbolsToSearch, TypeSymbol typeSymbol)
Symbols\Metadata\PE\NativeIntegerTypeDecoder.cs (8)
15internal static TypeSymbol TransformType(TypeSymbol type, EntityHandle handle, PEModuleSymbol containingModule, TypeSymbol? containingType) 29internal static TypeSymbol TransformType(TypeSymbol type, ImmutableArray<bool> transformFlags) 34var result = decoder.TransformType(type); 82private TypeSymbol? TransformType(TypeSymbol type)
Symbols\Metadata\PE\PEEventSymbol.cs (10)
90TypeSymbol originalEventType = _eventTypeWithAnnotations.Type; 97var typeSymbol = DynamicTypeDecoder.TransformType(originalEventType, targetSymbolCustomModifierCount, handle, moduleSymbol); 164TypeSymbol candidateAssociatedFieldType = candidateAssociatedField.Type; 169if (TypeSymbol.Equals(eventRegistrationTokenTable_T, candidateAssociatedFieldType.OriginalDefinition, TypeCompareKind.ConsiderEverything2) && 170TypeSymbol.Equals(_eventTypeWithAnnotations.Type, ((NamedTypeSymbol)candidateAssociatedFieldType).TypeArgumentsWithAnnotationsNoUseSiteDiagnostics[0].Type, TypeCompareKind.ConsiderEverything2)) 177if (TypeSymbol.Equals(candidateAssociatedFieldType, _eventTypeWithAnnotations.Type, TypeCompareKind.ConsiderEverything2)) 202TypeSymbol.Equals(_addMethod.ReturnType, token, TypeCompareKind.ConsiderEverything2) && 205TypeSymbol.Equals(_removeMethod.Parameters[0].Type, token, TypeCompareKind.ConsiderEverything2); 414TypeSymbol eventType, 441TypeSymbol eventType,
Symbols\Metadata\PE\PEFieldSymbol.cs (5)
292Debug.Assert(TypeSymbol.Equals(eventSymbol.ContainingType, _containingType, TypeCompareKind.ConsiderEverything2)); 310FieldInfo<TypeSymbol> fieldInfo = new MetadataDecoder(moduleSymbol, _containingType).DecodeFieldSignature(_handle); 311TypeSymbol typeSymbol = fieldInfo.Type; 331TypeSymbol fixedElementType; 346private bool IsFixedBuffer(out int fixedSize, out TypeSymbol fixedElementType)
Symbols\Metadata\PE\PEMethodSymbol.cs (4)
804Debug.Assert(TypeSymbol.Equals(propertyOrEventSymbol.ContainingType, _containingType, TypeCompareKind.ConsiderEverything2)); 835ParamInfo<TypeSymbol>[] paramInfo = new MetadataDecoder(moduleSymbol, this).GetSignatureForMethod(_handle, out signatureHeader, out mrEx); 873var returnType = paramInfo[0].Type.AsDynamicIfNoPia(_containingType); 1759internal override bool HasAsyncMethodBuilderAttribute(out TypeSymbol builderArgument)
Symbols\Metadata\PE\PEModuleSymbol.cs (8)
62/// This is a map from TypeDef handle to the target <see cref="TypeSymbol"/>. 67internal readonly ConcurrentDictionary<TypeDefinitionHandle, TypeSymbol> TypeHandleToTypeMap = 68new ConcurrentDictionary<TypeDefinitionHandle, TypeSymbol>(concurrencyLevel: 2, capacity: DefaultTypeMapCapacity); 71/// This is a map from TypeRef row id to the target <see cref="TypeSymbol"/>. 76internal readonly ConcurrentDictionary<TypeReferenceHandle, TypeSymbol> TypeRefHandleToTypeMap = 77new ConcurrentDictionary<TypeReferenceHandle, TypeSymbol>(concurrencyLevel: 2, capacity: DefaultTypeMapCapacity); 449internal TypeSymbol TryDecodeAttributeWithTypeArgument(EntityHandle handle, AttributeDescription attributeDescription) 634if (!TypeSymbol.Equals(referencedAssemblyResult, currResult, TypeCompareKind.ConsiderEverything2))
Symbols\Metadata\PE\PENamedTypeSymbol.cs (14)
679internal override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol> basesBeingResolved = null) 694internal override NamedTypeSymbol GetDeclaredBaseType(ConsList<TypeSymbol> basesBeingResolved) 714TypeSymbol decodedType = DynamicTypeDecoder.TransformType(baseType, 0, _handle, moduleSymbol); 726internal override ImmutableArray<NamedTypeSymbol> GetDeclaredInterfaces(ConsList<TypeSymbol> basesBeingResolved) 773TypeSymbol typeSymbol = tokenDecoder.GetTypeOfToken(interfaceHandle); 1421FieldInfo<TypeSymbol> fieldInfo = decoder.DecodeFieldSignature(fieldDef); 1422TypeSymbol type = fieldInfo.Type; 1965TypeSymbol @base = GetDeclaredBaseType(skipTransformsIfNecessary: true); 2075private static ExtendedErrorTypeSymbol CyclicInheritanceError(TypeSymbol declaredBase) 2395TypeSymbol @base = GetDeclaredBaseType(null); 2626var type = this.ContainingPEModule.TryDecodeAttributeWithTypeArgument(this.Handle, AttributeDescription.CoClassAttribute); 2758internal sealed override bool HasCollectionBuilderAttribute(out TypeSymbol? builderType, out string? methodName) 2799internal override bool HasAsyncMethodBuilderAttribute(out TypeSymbol? builderArgument) 2862internal override bool Equals(TypeSymbol t2, TypeCompareKind comparison)
Symbols\Metadata\PE\PEParameterSymbol.cs (7)
196ParamInfo<TypeSymbol> parameterInfo, 224ParamInfo<TypeSymbol> parameterInfo, 308var typeSymbol = DynamicTypeDecoder.TransformType(typeWithAnnotations.Type, countOfCustomModifiers, handle, moduleSymbol, refKind); 381ImmutableArray<ModifierInfo<TypeSymbol>> refCustomModifiers, 382TypeSymbol type, 385ImmutableArray<ModifierInfo<TypeSymbol>> customModifiers, 427ImmutableArray<ModifierInfo<TypeSymbol>> refCustomModifiers,
Symbols\Metadata\PE\PEPropertySymbol.cs (9)
227ParamInfo<TypeSymbol>[] propertyParams, 294TypeSymbol originalPropertyType = returnInfo.Type; 340static bool anyUnexpectedRequiredModifiers(ParamInfo<TypeSymbol>[] propertyParams) 831ParamInfo<TypeSymbol>[] propertyParams, 833ParamInfo<TypeSymbol>[] getMethodParams, 835ParamInfo<TypeSymbol>[] setMethodParams) 884ParamInfo<TypeSymbol>[] propertyParams, 885ParamInfo<TypeSymbol>[] accessorParams, 1080ParamInfo<TypeSymbol>[] propertyParams,
Symbols\Metadata\PE\PETypeParameterSymbol.cs (3)
268var typeSymbol = tokenDecoder.DecodeGenericParameterConstraint(constraint.Type, out ImmutableArray<ModifierInfo<TypeSymbol>> modifiers); 279ModifierInfo<TypeSymbol> m = modifiers.Single(); 634internal override TypeSymbol GetDeducedBaseType(ConsList<TypeParameterSymbol> inProgress)
Symbols\Metadata\PE\SymbolFactory.cs (26)
14internal sealed class SymbolFactory : SymbolFactory<PEModuleSymbol, TypeSymbol> 18internal override TypeSymbol GetMDArrayTypeSymbol(PEModuleSymbol moduleSymbol, int rank, TypeSymbol elementType, ImmutableArray<ModifierInfo<TypeSymbol>> customModifiers, 29internal override TypeSymbol GetSpecialType(PEModuleSymbol moduleSymbol, SpecialType specialType) 34internal override TypeSymbol GetSystemTypeSymbol(PEModuleSymbol moduleSymbol) 39internal override TypeSymbol MakePointerTypeSymbol(PEModuleSymbol moduleSymbol, TypeSymbol type, ImmutableArray<ModifierInfo<TypeSymbol>> customModifiers) 49internal override TypeSymbol MakeFunctionPointerTypeSymbol(PEModuleSymbol moduleSymbol, Cci.CallingConvention callingConvention, ImmutableArray<ParamInfo<TypeSymbol>> retAndParamTypes) 54internal override TypeSymbol GetEnumUnderlyingType(PEModuleSymbol moduleSymbol, TypeSymbol type) 59internal override Cci.PrimitiveTypeCode GetPrimitiveTypeCode(PEModuleSymbol moduleSymbol, TypeSymbol type) 64internal override TypeSymbol GetSZArrayTypeSymbol(PEModuleSymbol moduleSymbol, TypeSymbol elementType, ImmutableArray<ModifierInfo<TypeSymbol>> customModifiers) 74internal override TypeSymbol GetUnsupportedMetadataTypeSymbol(PEModuleSymbol moduleSymbol, BadImageFormatException exception) 79internal override TypeSymbol SubstituteTypeParameters( 81TypeSymbol genericTypeDef, 82ImmutableArray<KeyValuePair<TypeSymbol, ImmutableArray<ModifierInfo<TypeSymbol>>>> arguments, 161internal override TypeSymbol MakeUnboundIfGeneric(PEModuleSymbol moduleSymbol, TypeSymbol type) 167private static TypeWithAnnotations CreateType(TypeSymbol type, ImmutableArray<ModifierInfo<TypeSymbol>> customModifiers)
Symbols\Metadata\PE\TupleTypeDecoder.cs (14)
26/// <see cref="DecodeTupleTypesIfApplicable(TypeSymbol, EntityHandle, PEModuleSymbol)"/> 80public static TypeSymbol DecodeTupleTypesIfApplicable( 81TypeSymbol metadataType, 117TypeSymbol type = metadataType.Type; 118TypeSymbol decoded = DecodeTupleTypesInternal(type, elementNames, hasTupleElementNamesAttribute); 124public static TypeSymbol DecodeTupleTypesIfApplicable( 125TypeSymbol metadataType, 131private static TypeSymbol DecodeTupleTypesInternal(TypeSymbol metadataType, ImmutableArray<string?> elementNames, bool hasTupleElementNamesAttribute) 136var decoded = decoder.DecodeType(metadataType); 155private TypeSymbol DecodeType(TypeSymbol type) 342TypeSymbol type = typeWithAnnotations.Type; 343TypeSymbol decoded = DecodeType(type);
Symbols\MethodSymbol.cs (11)
142internal abstract bool HasAsyncMethodBuilderAttribute(out TypeSymbol builderArgument); 247public TypeSymbol ReturnType => ReturnTypeWithAnnotations.Type; 740public MethodSymbol ReduceExtensionMethod(TypeSymbol receiverType, CSharpCompilation compilation) 752public MethodSymbol ReduceExtensionMethod(TypeSymbol receiverType, CSharpCompilation compilation, out bool wasFullyInferred) 817public virtual TypeSymbol ReceiverType 833public virtual TypeSymbol GetTypeInferredDuringReduction(TypeParameterSymbol reducedFromTypeParameter) 843public MethodSymbol Construct(params TypeSymbol[] typeArguments) 854public MethodSymbol Construct(ImmutableArray<TypeSymbol> typeArguments) 908internal TypeSymbol GetParameterType(int index) => ParameterTypesWithAnnotations[index].Type; 972HashSet<TypeSymbol> unificationCheckedTypes = null; 1240return Construct((TypeSymbol[])typeArguments);
Symbols\MissingMetadataTypeSymbol.cs (2)
366internal override bool Equals(TypeSymbol t2, TypeCompareKind comparison) 455internal override bool Equals(TypeSymbol t2, TypeCompareKind comparison)
Symbols\MissingModuleSymbol.cs (1)
174internal override bool GetUnificationUseSiteDiagnostic(ref DiagnosticInfo result, TypeSymbol dependentType)
Symbols\ModuleSymbol.cs (1)
289internal abstract bool GetUnificationUseSiteDiagnostic(ref DiagnosticInfo result, TypeSymbol dependentType);
Symbols\NamedTypeSymbol.cs (19)
777internal abstract NamedTypeSymbol GetDeclaredBaseType(ConsList<TypeSymbol> basesBeingResolved); 779internal abstract ImmutableArray<NamedTypeSymbol> GetDeclaredInterfaces(ConsList<TypeSymbol> basesBeingResolved); 798internal override bool Equals(TypeSymbol t2, TypeCompareKind comparison) 934internal override bool ApplyNullableTransforms(byte defaultTransformFlag, ImmutableArray<byte> transforms, ref int position, out TypeSymbol result) 968internal override TypeSymbol SetNullabilityForReferenceTypes(Func<TypeWithAnnotations, TypeWithAnnotations> transform) 1002internal override TypeSymbol MergeEquivalentTypes(TypeSymbol other, VarianceKind variance) 1114public NamedTypeSymbol Construct(params TypeSymbol[] typeArguments) 1125public NamedTypeSymbol Construct(ImmutableArray<TypeSymbol> typeArguments) 1135public NamedTypeSymbol Construct(IEnumerable<TypeSymbol> typeArguments) 1164internal abstract bool HasAsyncMethodBuilderAttribute(out TypeSymbol builderArgument); 1177private NamedTypeSymbol ConstructWithoutModifiers(ImmutableArray<TypeSymbol> typeArguments, bool unbound) 1276internal void GetAllTypeArguments(ref TemporaryArray<TypeSymbol> builder, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1345protected sealed override TypeSymbol OriginalTypeSymbolDefinition 1425HashSet<TypeSymbol> unificationCheckedTypes = null; 1452internal override bool GetUnificationUseSiteDiagnosticRecursive(ref DiagnosticInfo result, Symbol owner, ref HashSet<TypeSymbol> checkedTypes) 1627internal abstract bool HasCollectionBuilderAttribute(out TypeSymbol? builderType, out string? methodName); 1631/// Requires less computation than <see cref="TypeSymbol.TypeKind"/> == <see cref="TypeKind.Interface"/>. 1665TypeSymbol typeToCheck = this;
Symbols\NamespaceSymbol.cs (1)
228var types = this.GetTypeMembers(TypeSymbol.ImplicitTypeName);
Symbols\NativeIntegerTypeSymbol.cs (8)
149internal override NamedTypeSymbol GetDeclaredBaseType(ConsList<TypeSymbol> basesBeingResolved) => _underlyingType.GetDeclaredBaseType(basesBeingResolved); 151internal override ImmutableArray<NamedTypeSymbol> GetDeclaredInterfaces(ConsList<TypeSymbol> basesBeingResolved) => GetInterfaces(basesBeingResolved); 161internal override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol>? basesBeingResolved = null) => GetInterfaces(basesBeingResolved); 190internal override bool Equals(TypeSymbol? other, TypeCompareKind comparison) 221private ImmutableArray<NamedTypeSymbol> GetInterfaces(ConsList<TypeSymbol>? basesBeingResolved) 290internal sealed override bool HasCollectionBuilderAttribute(out TypeSymbol? builderType, out string? methodName) 297internal sealed override bool HasAsyncMethodBuilderAttribute(out TypeSymbol? builderArgument) 398internal sealed override bool HasAsyncMethodBuilderAttribute(out TypeSymbol? builderArgument)
Symbols\NonMissingAssemblySymbol.cs (1)
225System.Diagnostics.Debug.Assert(TypeSymbol.Equals(result1, result, TypeCompareKind.ConsiderEverything2)); // object identity may differ in error cases
Symbols\NonMissingModuleSymbol.cs (1)
77internal override bool GetUnificationUseSiteDiagnostic(ref DiagnosticInfo result, TypeSymbol dependentType)
Symbols\NoPiaAmbiguousCanonicalTypeSymbol.cs (1)
92internal override bool Equals(TypeSymbol t2, TypeCompareKind comparison)
Symbols\NoPiaIllegalGenericInstantiationSymbol.cs (1)
78internal override bool Equals(TypeSymbol t2, TypeCompareKind comparison)
Symbols\NoPiaMissingCanonicalTypeSymbol.cs (1)
116internal override bool Equals(TypeSymbol t2, TypeCompareKind comparison)
Symbols\NullableAnnotationExtensions.cs (3)
91internal static NullabilityInfo ToNullabilityInfo(this CodeAnalysis.NullableAnnotation annotation, TypeSymbol type) 102internal static NullabilityInfo ToNullabilityInfo(this NullableAnnotation annotation, TypeSymbol type) 126internal static CodeAnalysis.NullableAnnotation ToPublicAnnotation(TypeSymbol? type, NullableAnnotation annotation)
Symbols\OverriddenOrHiddenMembersResult.cs (2)
66if (TypeSymbol.Equals(baseType.OriginalDefinition, overriddenByDefinitionContainingTypeDefinition, TypeCompareKind.ConsiderEverything2)) 68if (TypeSymbol.Equals(baseType, overriddenByDefinitionContaining, TypeCompareKind.ConsiderEverything2))
Symbols\ParameterSymbol.cs (1)
54public TypeSymbol Type => TypeWithAnnotations.Type;
Symbols\PlaceholderTypeArgumentSymbol.cs (2)
14/// <see cref="TypeSymbol.IsValueType"/> with minimal binding. 62internal override bool Equals(TypeSymbol t2, TypeCompareKind comparison)
Symbols\PointerTypeSymbol.cs (9)
77public TypeSymbol PointedAtType => PointedAtTypeWithAnnotations.Type; 88internal override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol>? basesBeingResolved) 221TypeSymbol current = this; 231internal override bool Equals(TypeSymbol? t2, TypeCompareKind comparison) 256internal override bool ApplyNullableTransforms(byte defaultTransformFlag, ImmutableArray<byte> transforms, ref int position, out TypeSymbol result) 271internal override TypeSymbol SetNullabilityForReferenceTypes(Func<TypeWithAnnotations, TypeWithAnnotations> transform) 276internal override TypeSymbol MergeEquivalentTypes(TypeSymbol other, VarianceKind variance) 297internal override bool GetUnificationUseSiteDiagnosticRecursive(ref DiagnosticInfo result, Symbol owner, ref HashSet<TypeSymbol> checkedTypes)
Symbols\PropertySymbol.cs (3)
91public TypeSymbol Type => TypeWithAnnotations.Type; 415HashSet<TypeSymbol> unificationCheckedTypes = null; 475return TypeSymbol.Equals(this.ContainingType, other.ContainingType, compareKind) && ReferenceEquals(this.OriginalDefinition, other.OriginalDefinition);
Symbols\PublicModel\ArrayTypeSymbol.cs (1)
32internal override Symbols.TypeSymbol UnderlyingTypeSymbol => _underlying;
Symbols\PublicModel\DynamicTypeSymbol.cs (1)
29internal override Symbols.TypeSymbol UnderlyingTypeSymbol => _underlying;
Symbols\PublicModel\ErrorTypeSymbol.cs (1)
31internal override Symbols.TypeSymbol UnderlyingTypeSymbol => _underlying;
Symbols\PublicModel\FunctionPointerTypeSymbol.cs (1)
22internal override Symbols.TypeSymbol UnderlyingTypeSymbol => _underlying;
Symbols\PublicModel\NonErrorNamedTypeSymbol.cs (1)
32internal override Symbols.TypeSymbol UnderlyingTypeSymbol => _underlying;
Symbols\PublicModel\PointerTypeSymbol.cs (1)
32internal override Symbols.TypeSymbol UnderlyingTypeSymbol => _underlying;
Symbols\PublicModel\Symbol.cs (2)
24var type = typeArg.EnsureCSharpSymbolOrNull(nameof(typeArguments)); 47var type = typeArguments[i].EnsureCSharpSymbolOrNull(nameof(typeArguments));
Symbols\PublicModel\TypeParameterSymbol.cs (1)
30internal override Symbols.TypeSymbol UnderlyingTypeSymbol => _underlying;
Symbols\PublicModel\TypeSymbol.cs (1)
23internal abstract Symbols.TypeSymbol UnderlyingTypeSymbol { get; }
Symbols\ReducedExtensionMethodSymbol.cs (5)
37public static MethodSymbol Create(MethodSymbol method, TypeSymbol receiverType, CSharpCompilation compilation, out bool wasFullyInferred) 112internal static MethodSymbol InferExtensionMethodTypeArguments(MethodSymbol method, TypeSymbol thisType, CSharpCompilation compilation, 246public override TypeSymbol ReceiverType 257public override TypeSymbol GetTypeInferredDuringReduction(TypeParameterSymbol reducedFromTypeParameter) 604internal sealed override bool HasAsyncMethodBuilderAttribute(out TypeSymbol builderArgument)
Symbols\Retargeting\RetargetingMethodSymbol.cs (1)
383internal sealed override bool HasAsyncMethodBuilderAttribute(out TypeSymbol builderArgument)
Symbols\Retargeting\RetargetingNamedTypeSymbol.cs (6)
300private static ExtendedErrorTypeSymbol CyclicInheritanceError(TypeSymbol declaredBase) 336internal override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol> basesBeingResolved) 361internal override NamedTypeSymbol GetDeclaredBaseType(ConsList<TypeSymbol> basesBeingResolved) 373internal override ImmutableArray<NamedTypeSymbol> GetDeclaredInterfaces(ConsList<TypeSymbol> basesBeingResolved) 451internal sealed override bool HasCollectionBuilderAttribute(out TypeSymbol? builderType, out string? methodName) 461internal sealed override bool HasAsyncMethodBuilderAttribute(out TypeSymbol? builderArgument)
Symbols\Retargeting\RetargetingPropertySymbol.cs (1)
70if (type.Type.TryAsDynamicIfNoPia(this.ContainingType, out TypeSymbol asDynamic))
Symbols\Retargeting\RetargetingSymbolTranslator.cs (18)
171return marshallingInfo?.WithTranslatedTypes<TypeSymbol, RetargetingSymbolTranslator>( 175public TypeSymbol Retarget(TypeSymbol symbol, RetargetOptions options) 177return (TypeSymbol)symbol.Accept(this, options); 182var newTypeSymbol = Retarget(underlyingType.Type, options); 192if (modifiersHaveChanged || !TypeSymbol.Equals(underlyingType.Type, newTypeSymbol, TypeCompareKind.ConsiderEverything2)) 406TypeSymbol? cached; 475Debug.Assert(TypeSymbol.Equals(result1, result, TypeCompareKind.ConsiderEverything2)); 643private bool IsOrClosedOverAnExplicitLocalType(TypeSymbol symbol) 848public ImmutableArray<TypeSymbol> Retarget(ImmutableArray<TypeSymbol> sequence) 1119if (TypeSymbol.Equals(retargetedEvent.Type, targetType.Type, TypeCompareKind.ConsiderEverything2)) 1223TypeSymbol oldConstantType = (TypeSymbol)oldConstant.TypeInternal; 1224TypeSymbol newConstantType = (object)oldConstantType == null ? 1231if (!TypeSymbol.Equals(newConstantType, oldConstantType, TypeCompareKind.ConsiderEverything2) || newArray != oldConstant.Values) 1246newConstantValue = Retarget((TypeSymbol)oldConstantValue, RetargetOptions.RetargetPrimitiveTypesByTypeCode); 1253if (!TypeSymbol.Equals(newConstantType, oldConstantType, TypeCompareKind.ConsiderEverything2) || newConstantValue != oldConstantValue)
Symbols\Retargeting\RetargetingTypeParameterSymbol.cs (1)
107internal override TypeSymbol GetDeducedBaseType(ConsList<TypeParameterSymbol> inProgress)
Symbols\SignatureOnlyMethodSymbol.cs (3)
22private readonly TypeSymbol _containingType; 36TypeSymbol containingType, 99internal sealed override bool HasAsyncMethodBuilderAttribute(out TypeSymbol builderArgument)
Symbols\SignatureOnlyParameterSymbol.cs (1)
120TypeSymbol.Equals(_type.Type, other._type.Type, compareKind) &&
Symbols\SignatureOnlyPropertySymbol.cs (2)
22private readonly TypeSymbol _containingType; 32TypeSymbol containingType,
Symbols\Source\CrefTypeParameterSymbol.cs (2)
96internal override bool Equals(TypeSymbol t2, TypeCompareKind comparison) 213internal override TypeSymbol GetDeducedBaseType(ConsList<TypeParameterSymbol> inProgress)
Symbols\Source\CustomModifierUtils.cs (6)
48TypeSymbol returnTypeSymbol = returnType.Type; 56TypeSymbol returnTypeWithCustomModifiers = sourceMethodReturnType.Type; 69internal static TypeSymbol CopyTypeCustomModifiers(TypeSymbol sourceType, TypeSymbol destinationType, AssemblySymbol containingAssembly) 79TypeSymbol resultType = DynamicTypeDecoder.TransformTypeWithoutCustomModifierFlags(sourceType, containingAssembly, refKind, flags);
Symbols\Source\ExplicitInterfaceHelpers.cs (7)
27TypeSymbol discardedExplicitInterfaceType; 39out TypeSymbol explicitInterfaceTypeOpt, 59public static string GetMemberName(string name, TypeSymbol explicitInterfaceTypeOpt, string aliasQualifierOpt) 147TypeSymbol explicitInterfaceType, 157TypeSymbol explicitInterfaceType, 167TypeSymbol explicitInterfaceType, 178TypeSymbol explicitInterfaceType,
Symbols\Source\GlobalExpressionVariable.cs (2)
129var originalType = _lazyType?.Value.DefaultType; 136TypeSymbol.Equals(originalType, type.Type, TypeCompareKind.ConsiderEverything2));
Symbols\Source\ImplicitNamedTypeSymbol.cs (4)
66internal override NamedTypeSymbol GetDeclaredBaseType(ConsList<TypeSymbol> basesBeingResolved) 71internal override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol> basesBeingResolved) 76internal override ImmutableArray<NamedTypeSymbol> GetDeclaredInterfaces(ConsList<TypeSymbol> basesBeingResolved) 191internal sealed override bool HasCollectionBuilderAttribute(out TypeSymbol? builderType, out string? methodName)
Symbols\Source\IndexedTypeParameterSymbol.cs (2)
125internal override bool Equals(TypeSymbol t2, TypeCompareKind comparison) 227internal override TypeSymbol GetDeducedBaseType(ConsList<TypeParameterSymbol> inProgress)
Symbols\Source\LambdaSymbol.cs (3)
34internal static readonly TypeSymbol ReturnTypeIsBeingInferred = new UnsupportedMetadataTypeSymbol(); 39internal static readonly TypeSymbol InferenceFailureReturnType = new UnsupportedMetadataTypeSymbol(); 384&& TypeSymbol.Equals(lambda.ReturnType, this.ReturnType, compareKind)
Symbols\Source\LocalFunctionOrSourceMemberMethodSymbol.cs (1)
38Debug.Assert(TypeSymbol.Equals(_lazyIteratorElementType.Value.Type, elementType.Type, TypeCompareKind.ConsiderEverything));
Symbols\Source\ParameterHelpers.cs (2)
576static bool collectTypeParameters(TypeSymbol type, PooledHashSet<TypeParameterSymbol> typeParameters, bool ignored) 930TypeSymbol parameterType = parameter.Type;
Symbols\Source\SourceAssemblySymbol.cs (11)
109internal ConcurrentSet<TypeSymbol> TypesReferencedInExternalMethods = new ConcurrentSet<TypeSymbol>(); 651TypeSymbol compilationRelaxationsAttribute = compilation.GetWellKnownType(WellKnownType.System_Runtime_CompilerServices_CompilationRelaxationsAttribute); 660TypeSymbol runtimeCompatibilityAttribute = compilation.GetWellKnownType(WellKnownType.System_Runtime_CompilerServices_RuntimeCompatibilityAttribute); 693TypeSymbol unverifiableCodeAttribute = compilation.GetWellKnownType(WellKnownType.System_Security_UnverifiableCodeAttribute); 705TypeSymbol securityPermissionAttribute = compilation.GetWellKnownType(WellKnownType.System_Security_Permissions_SecurityPermissionAttribute); 712TypeSymbol securityAction = compilation.GetWellKnownType(WellKnownType.System_Security_Permissions_SecurityAction); 1237if (uniqueAttributes == null || !uniqueAttributes.Contains((a) => TypeSymbol.Equals(a.AttributeClass, attributeClass, TypeCompareKind.ConsiderEverything2))) 2208TypeSymbol forwardedType = (TypeSymbol)arguments.Attribute.CommonConstructorArguments[0].ValueInternal; 2781private static string DefaultValue(TypeSymbol type)
Symbols\Source\SourceComplexParameterSymbol.cs (6)
1011else if (!compilation.Conversions.ClassifyConversionFromType((TypeSymbol)arg.TypeInternal, this.Type, isChecked: false, ref useSiteInfo).Kind.IsImplicitConversion()) 1069TypeSymbol intType = compilation.GetSpecialType(SpecialType.System_Int32); 1097TypeSymbol stringType = compilation.GetSpecialType(SpecialType.System_String); 1130TypeSymbol stringType = compilation.GetSpecialType(SpecialType.System_String); 1171TypeSymbol stringType = compilation.GetSpecialType(SpecialType.System_String); 1554var elementType = elementTypeWithAnnotations.Type;
Symbols\Source\SourceCustomEventSymbol.cs (2)
23private readonly TypeSymbol _explicitInterfaceType; 230TypeSymbol.CheckModifierMismatchOnImplementingMember(this.ContainingType, this, explicitlyImplementedEvent, isExplicit: true, diagnostics);
Symbols\Source\SourceDelegateClonedParameterSymbolForBeginAndEndInvoke.cs (1)
29internal override ParameterSymbol WithCustomModifiersAndParams(TypeSymbol newType, ImmutableArray<CustomModifier> newCustomModifiers, ImmutableArray<CustomModifier> newRefCustomModifiers, bool newIsParams)
Symbols\Source\SourceEventAccessorSymbol.cs (3)
115TypeSymbol eventTokenType = compilation.GetWellKnownType(WellKnownType.System_Runtime_InteropServices_WindowsRuntime_EventRegistrationToken); 131TypeSymbol voidType = compilation.GetSpecialType(SpecialType.System_Void); 142TypeSymbol voidType = compilation.GetSpecialType(SpecialType.System_Void);
Symbols\Source\SourceEventSymbol.cs (1)
698TypeSymbol overriddenEventType = eventWithCustomModifiers.Type;
Symbols\Source\SourceFixedFieldSymbol.cs (3)
90TypeSymbol intType = binder.GetSpecialType(SpecialType.System_Int32, diagnostics, sizeExpression); 110TypeSymbol elementType = ((PointerTypeSymbol)this.Type).PointedAtType; 184var elementType = ((PointerTypeSymbol)_field.Type).PointedAtType;
Symbols\Source\SourceLocalSymbol.cs (1)
582var type = this.Type;
Symbols\Source\SourceMemberContainerSymbol.cs (12)
1078Debug.Assert(!nonTypeMembers.Any(static s => s is TypeSymbol)); 1423internal override bool HasAsyncMethodBuilderAttribute(out TypeSymbol? builderArgument) 1432internal static bool HasAsyncMethodBuilderAttribute(Symbol symbol, [NotNullWhen(true)] out TypeSymbol? builderArgument) 1445builderArgument = (TypeSymbol)attr.CommonConstructorArguments[0].ValueInternal!; 1926static bool needsTupleElementNamesAttribute(TypeSymbol type) 1933var resultType = type.VisitType( 2480public readonly TypeSymbol ReceiverType; 2651var type = field.NonPointerType(); 2688if (member is TypeSymbol) 2992return (!TypeSymbol.Equals(oldInstance, t, TypeCompareKind.AllNullableIgnoreOptions)) && ReferenceEquals(tOriginal, top); 3241Debug.Assert(!nonTypeMembersWithPartialImplementations.Any(static s => s is TypeSymbol)); 4469var propertyParamType = (((i == numParams - 1) && !getNotSet) ? propertySymbol.TypeWithAnnotations : propertyParams[i].TypeWithAnnotations).Type;
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (6)
320if (synthesizedImplementation.ForwardingMethod is not null || TypeSymbol.Equals(implementingMember.ContainingType, this, TypeCompareKind.ConsiderEverything2)) 362if (TypeSymbol.Equals(iface, implementedInterface, TypeCompareKind.ConsiderEverything2)) 1195internal static bool IsOrContainsErrorType(TypeSymbol typeSymbol) 1350TypeSymbol sourceType, 1351TypeSymbol targetType) 1780TypeSymbol.Equals(interface1.OriginalDefinition, interface2.OriginalDefinition, TypeCompareKind.ConsiderEverything2) &&
Symbols\Source\SourceMemberFieldSymbol.cs (2)
47protected void TypeChecks(TypeSymbol type, BindingDiagnosticBag diagnostics) 583var elementType = ((PointerTypeSymbol)type.Type).PointedAtType;
Symbols\Source\SourceMethodSymbol.cs (1)
98internal override bool HasAsyncMethodBuilderAttribute(out TypeSymbol? builderArgument)
Symbols\Source\SourceMethodSymbolWithAttributes.cs (2)
1406static void checkAndReportManagedTypes(TypeSymbol type, RefKind refKind, SyntaxNode syntax, bool isParam, BindingDiagnosticBag diagnostics) 1608var returnType = methodSymbol.ReturnType;
Symbols\Source\SourceNamedTypeSymbol.cs (12)
62TypeSymbol bt = baseBinder.BindType(t, BindingDiagnosticBag.Discarded).Type; 64if (TypeSymbol.Equals(bt, @base, TypeCompareKind.ConsiderEverything2)) 1035TypeSymbol? builderType = attributeData.CommonConstructorArguments[0].ValueInternal as TypeSymbol; 1186var builderType = attribute.CommonConstructorArguments[0].ValueInternal as TypeSymbol; 1238internal static bool IsValidCollectionBuilderType([NotNullWhen(true)] TypeSymbol? builderType) 1373internal sealed override bool HasCollectionBuilderAttribute(out TypeSymbol? builderType, out string? methodName) 1807internal override bool Equals(TypeSymbol t2, TypeCompareKind comparison) 1916bool fieldSupported = TypeSymbol.IsInlineArrayElementFieldSupported(elementField); 1921TypeSymbol returnType = conversion.ReturnType; 1922TypeSymbol returnTypeOriginalDefinition = returnType.OriginalDefinition;
Symbols\Source\SourceNamedTypeSymbol_Bases.cs (12)
66internal sealed override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol> basesBeingResolved) 226var curBaseSym = baseBinder.BindType(b, BindingDiagnosticBag.Discarded).Type; 255internal Tuple<NamedTypeSymbol, ImmutableArray<NamedTypeSymbol>> GetDeclaredBases(ConsList<TypeSymbol> basesBeingResolved) 270internal override NamedTypeSymbol GetDeclaredBaseType(ConsList<TypeSymbol> basesBeingResolved) 275internal override ImmutableArray<NamedTypeSymbol> GetDeclaredInterfaces(ConsList<TypeSymbol> basesBeingResolved) 280private Tuple<NamedTypeSymbol, ImmutableArray<NamedTypeSymbol>> MakeDeclaredBases(ConsList<TypeSymbol> basesBeingResolved, BindingDiagnosticBag diagnostics) 319else if ((object)partBase != null && !TypeSymbol.Equals(partBase, baseType, TypeCompareKind.ConsiderEverything) && partBase.TypeKind != TypeKind.Error) 347static bool containsOnlyOblivious(TypeSymbol type) 438private Tuple<NamedTypeSymbol, ImmutableArray<NamedTypeSymbol>> MakeOneDeclaredBases(ConsList<TypeSymbol> newBasesBeingResolved, SingleTypeDeclaration decl, BindingDiagnosticBag diagnostics) 467TypeSymbol baseType; 630void checkPrimaryConstructorBaseType(BaseTypeSyntax baseTypeSyntax, TypeSymbol baseType) 658private ImmutableArray<NamedTypeSymbol> MakeAcyclicInterfaces(ConsList<TypeSymbol> basesBeingResolved, BindingDiagnosticBag diagnostics)
Symbols\Source\SourceNamedTypeSymbol_Enum.cs (1)
62var type = baseBinder.BindType(typeSyntax, diagnostics).Type;
Symbols\Source\SourceNamedTypeSymbol_Extension.cs (2)
158internal static Symbol? GetCompatibleSubstitutedMember(CSharpCompilation compilation, Symbol extensionMember, TypeSymbol receiverType) 194static NamedTypeSymbol? inferExtensionTypeArguments(NamedTypeSymbol extension, TypeSymbol receiverType, CSharpCompilation compilation)
Symbols\Source\SourceNamespaceSymbol.AliasesAndUsings.cs (21)
21public Imports GetImports(CSharpSyntaxNode declarationSyntax, ConsList<TypeSymbol>? basesBeingResolved) 143public ImmutableArray<AliasAndUsingDirective> GetUsingAliases(CSharpSyntaxNode declarationSyntax, ConsList<TypeSymbol>? basesBeingResolved) 174public ImmutableDictionary<string, AliasAndUsingDirective> GetUsingAliasesMap(CSharpSyntaxNode declarationSyntax, ConsList<TypeSymbol>? basesBeingResolved) 206public ImmutableArray<NamespaceOrTypeAndUsingDirective> GetUsingNamespacesOrTypes(CSharpSyntaxNode declarationSyntax, ConsList<TypeSymbol>? basesBeingResolved) 238private Imports GetGlobalUsingImports(ConsList<TypeSymbol>? basesBeingResolved) 243private ImmutableDictionary<string, AliasAndUsingDirective> GetGlobalUsingAliasesMap(ConsList<TypeSymbol>? basesBeingResolved) 248private ImmutableArray<NamespaceOrTypeAndUsingDirective> GetGlobalUsingNamespacesOrTypes(ConsList<TypeSymbol>? basesBeingResolved) 253private MergedGlobalAliasesAndUsings GetMergedGlobalAliasesAndUsings(ConsList<TypeSymbol>? basesBeingResolved, CancellationToken cancellationToken = default) 510internal ImmutableArray<AliasAndUsingDirective> GetUsingAliases(SourceNamespaceSymbol declaringSymbol, CSharpSyntaxNode declarationSyntax, ConsList<TypeSymbol>? basesBeingResolved) 515internal ImmutableArray<AliasAndUsingDirective> GetGlobalUsingAliases(SourceNamespaceSymbol declaringSymbol, CSharpSyntaxNode declarationSyntax, ConsList<TypeSymbol>? basesBeingResolved) 520internal ImmutableDictionary<string, AliasAndUsingDirective> GetUsingAliasesMap(SourceNamespaceSymbol declaringSymbol, CSharpSyntaxNode declarationSyntax, ConsList<TypeSymbol>? basesBeingResolved) 525internal ImmutableDictionary<string, AliasAndUsingDirective> GetGlobalUsingAliasesMap(SourceNamespaceSymbol declaringSymbol, SyntaxReference declarationSyntax, ConsList<TypeSymbol>? basesBeingResolved) 530internal ImmutableArray<NamespaceOrTypeAndUsingDirective> GetUsingNamespacesOrTypes(SourceNamespaceSymbol declaringSymbol, CSharpSyntaxNode declarationSyntax, ConsList<TypeSymbol>? basesBeingResolved) 535private UsingsAndDiagnostics GetUsingsAndDiagnostics(SourceNamespaceSymbol declaringSymbol, CSharpSyntaxNode declarationSyntax, ConsList<TypeSymbol>? basesBeingResolved) 540internal ImmutableArray<NamespaceOrTypeAndUsingDirective> GetGlobalUsingNamespacesOrTypes(SourceNamespaceSymbol declaringSymbol, SyntaxReference declarationSyntax, ConsList<TypeSymbol>? basesBeingResolved) 545private UsingsAndDiagnostics GetGlobalUsingsAndDiagnostics(SourceNamespaceSymbol declaringSymbol, CSharpSyntaxNode declarationSyntax, ConsList<TypeSymbol>? basesBeingResolved) 550private UsingsAndDiagnostics GetUsingsAndDiagnostics(ref UsingsAndDiagnostics? usings, SourceNamespaceSymbol declaringSymbol, CSharpSyntaxNode declarationSyntax, ConsList<TypeSymbol>? basesBeingResolved, bool onlyGlobal) 620ConsList<TypeSymbol>? basesBeingResolved) 898internal Imports GetImports(SourceNamespaceSymbol declaringSymbol, CSharpSyntaxNode declarationSyntax, ConsList<TypeSymbol>? basesBeingResolved) 1019var typeSymbol = (TypeSymbol)target;
Symbols\Source\SourceNamespaceSymbol.cs (1)
307Debug.Assert((object)nts != null || symbol is not TypeSymbol);
Symbols\Source\SourceOrdinaryMethodOrUserDefinedOperatorSymbol.cs (2)
139TypeSymbol.CheckModifierMismatchOnImplementingMember(this.ContainingType, this, overriddenOrExplicitlyImplementedMethod, isExplicit: true, diagnostics); 157protected abstract TypeSymbol? ExplicitInterfaceType { get; }
Symbols\Source\SourceOrdinaryMethodSymbol.cs (5)
32TypeSymbol explicitInterfaceType; 957protected sealed override TypeSymbol ExplicitInterfaceType 988private readonly TypeSymbol _explicitInterfaceType; 1001TypeSymbol explicitInterfaceType, 1020protected sealed override TypeSymbol ExplicitInterfaceType => _explicitInterfaceType;
Symbols\Source\SourceParameterSymbol.cs (3)
111Debug.Assert((owner.Kind == SymbolKind.Method) || (owner.Kind == SymbolKind.Property) || owner is TypeSymbol { IsExtension: true }); 118internal override ParameterSymbol WithCustomModifiersAndParams(TypeSymbol newType, ImmutableArray<CustomModifier> newCustomModifiers, ImmutableArray<CustomModifier> newRefCustomModifiers, bool newIsParams) 123internal SourceParameterSymbol WithCustomModifiersAndParamsCore(TypeSymbol newType, ImmutableArray<CustomModifier> newCustomModifiers, ImmutableArray<CustomModifier> newRefCustomModifiers, bool newIsParams)
Symbols\Source\SourceParameterSymbolBase.cs (1)
137internal abstract ParameterSymbol WithCustomModifiersAndParams(TypeSymbol newType, ImmutableArray<CustomModifier> newCustomModifiers, ImmutableArray<CustomModifier> newRefCustomModifiers, bool newIsParams);
Symbols\Source\SourcePropertyClonedParameterSymbolForAccessors.cs (1)
25internal override ParameterSymbol WithCustomModifiersAndParams(TypeSymbol newType, ImmutableArray<CustomModifier> newCustomModifiers, ImmutableArray<CustomModifier> newRefCustomModifiers, bool newIsParams)
Symbols\Source\SourcePropertySymbol.cs (2)
76TypeSymbol? explicitInterfaceType; 107TypeSymbol? explicitInterfaceType,
Symbols\Source\SourcePropertySymbolBase.cs (5)
55private readonly TypeSymbol _explicitInterfaceType; 86TypeSymbol? explicitInterfaceType, 1036TypeSymbol.CheckModifierMismatchOnImplementingMember(this.ContainingType, this, explicitlyImplementedProperty, isExplicit: true, diagnostics); 1203else if (TypeSymbol.HaveInitOnlyMismatch(thisAccessor, otherAccessor)) 1867var type = this.Type;
Symbols\Source\SourceTypeParameterSymbol.cs (1)
110internal override TypeSymbol GetDeducedBaseType(ConsList<TypeParameterSymbol> inProgress)
Symbols\Source\SourceUserDefinedConversionSymbol.cs (2)
39TypeSymbol explicitInterfaceType; 56TypeSymbol explicitInterfaceType,
Symbols\Source\SourceUserDefinedOperatorSymbol.cs (2)
45TypeSymbol explicitInterfaceType; 62TypeSymbol explicitInterfaceType,
Symbols\Source\SourceUserDefinedOperatorSymbolBase.cs (14)
21private readonly TypeSymbol? _explicitInterfaceType; 26TypeSymbol explicitInterfaceType, 410protected sealed override TypeSymbol? ExplicitInterfaceType => _explicitInterfaceType; 576var source = this.GetParameterType(0); 577var target = this.ReturnType; 578var source0 = source.StrippedType(); 579var target0 = target.StrippedType(); 686TypeSymbol same; 687TypeSymbol different; 803var parameterType = this.GetParameterType(0); 824private bool MatchesContainingType(TypeSymbol type) 829private bool IsContainingType(TypeSymbol type) 834public static bool IsSelfConstrainedTypeParameter(TypeSymbol type, NamedTypeSymbol containingType) 843private bool IsSelfConstrainedTypeParameter(TypeSymbol type)
Symbols\Source\SynthesizedSourceOrdinaryMethodSymbol.cs (1)
59protected sealed override TypeSymbol? ExplicitInterfaceType => null;
Symbols\Source\ThisParameterSymbol.cs (2)
132private readonly TypeSymbol _containingType; 138internal ThisParameterSymbol(MethodSymbol? forMethod, TypeSymbol containingType)
Symbols\Source\TypeParameterConstraintClause.cs (2)
173TypeSymbol type = constraintType.IsResolved ? constraintType.Type : constraintType.DefaultType; 233TypeSymbol type = constraintType.IsResolved ? constraintType.Type : constraintType.DefaultType;
Symbols\SubstitutedFieldSymbol.cs (1)
119return (object)other != null && TypeSymbol.Equals(_containingType, other.ContainingType, compareKind) && OriginalDefinition == other.OriginalDefinition;
Symbols\SubstitutedMethodSymbol.cs (6)
44Debug.Assert(TypeSymbol.Equals(originalDefinition.ContainingType, containingSymbol.OriginalDefinition, TypeCompareKind.ConsiderEverything2)); 159public override TypeSymbol ReceiverType 173public override TypeSymbol GetTypeInferredDuringReduction(TypeParameterSymbol reducedFromTypeParameter) 176var notUsed = OriginalDefinition.GetTypeInferredDuringReduction(reducedFromTypeParameter); 442if (!TypeSymbol.Equals(this.ContainingType, other.ContainingType, compareKind)) return false; 479internal sealed override bool HasAsyncMethodBuilderAttribute(out TypeSymbol builderArgument)
Symbols\SubstitutedNamedTypeSymbol.cs (6)
149internal sealed override NamedTypeSymbol GetDeclaredBaseType(ConsList<TypeSymbol> basesBeingResolved) 154internal sealed override ImmutableArray<NamedTypeSymbol> GetDeclaredInterfaces(ConsList<TypeSymbol> basesBeingResolved) 179internal sealed override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol> basesBeingResolved) 189internal abstract override bool GetUnificationUseSiteDiagnosticRecursive(ref DiagnosticInfo result, Symbol owner, ref HashSet<TypeSymbol> checkedTypes); 446internal sealed override bool HasCollectionBuilderAttribute(out TypeSymbol? builderType, out string? methodName) 451internal sealed override bool HasAsyncMethodBuilderAttribute(out TypeSymbol? builderArgument)
Symbols\SubstitutedTypeParameterSymbol.cs (1)
180internal override TypeSymbol GetDeducedBaseType(ConsList<TypeParameterSymbol> inProgress)
Symbols\Symbol.cs (8)
1209internal bool DeriveUseSiteInfoFromType(ref UseSiteInfo<AssemblySymbol> result, TypeSymbol type) 1341internal static bool GetUnificationUseSiteDiagnosticRecursive<T>(ref DiagnosticInfo result, ImmutableArray<T> types, Symbol owner, ref HashSet<TypeSymbol> checkedTypes) where T : TypeSymbol 1354internal static bool GetUnificationUseSiteDiagnosticRecursive(ref DiagnosticInfo result, ImmutableArray<TypeWithAnnotations> types, Symbol owner, ref HashSet<TypeSymbol> checkedTypes) 1367internal static bool GetUnificationUseSiteDiagnosticRecursive(ref DiagnosticInfo result, ImmutableArray<CustomModifier> modifiers, Symbol owner, ref HashSet<TypeSymbol> checkedTypes) 1380internal static bool GetUnificationUseSiteDiagnosticRecursive(ref DiagnosticInfo result, ImmutableArray<ParameterSymbol> parameters, Symbol owner, ref HashSet<TypeSymbol> checkedTypes) 1394internal static bool GetUnificationUseSiteDiagnosticRecursive(ref DiagnosticInfo result, ImmutableArray<TypeParameterSymbol> typeParameters, Symbol owner, ref HashSet<TypeSymbol> checkedTypes) 1756&& variable is ParameterSymbol { ContainingSymbol: TypeSymbol { IsExtension: true } })
Symbols\Symbol_Attributes.cs (1)
476boundAttribute.CommonConstructorArguments[0].ValueInternal is TypeSymbol &&
Symbols\SymbolExtensions.cs (14)
87public static bool IsNoMoreVisibleThan(this Symbol symbol, TypeSymbol type, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 219public static bool IsContainingSymbolOfAllTypeParameters(this Symbol containingSymbol, TypeSymbol type) 228public static bool IsContainingSymbolOfAllTypeParameters(this Symbol containingSymbol, ImmutableArray<TypeSymbol> types) 233private static readonly Func<TypeSymbol, Symbol, bool, bool> s_hasInvalidTypeParameterFunc = 236private static bool HasInvalidTypeParameter(TypeSymbol type, Symbol? containingSymbol) 268Debug.Assert(!(symbol is TypeSymbol)); 407internal static TypeSymbol? EnsureCSharpSymbolOrNull(this ITypeSymbol? symbol, string paramName) 409return (TypeSymbol?)EnsureCSharpSymbolOrNull((ISymbol?)symbol, paramName); 517returnType = TypeWithAnnotations.Create((TypeSymbol)symbol); 580internal static ITypeSymbol? GetPublicSymbol(this TypeSymbol? symbol) 701internal static ImmutableArray<ITypeSymbol> GetPublicSymbols(this ImmutableArray<TypeSymbol> symbols) 765internal static TypeSymbol? GetSymbol(this ITypeSymbol? symbol) 767return symbol.GetSymbol<TypeSymbol>(); 825return parameter.ContainingSymbol is TypeSymbol { IsExtension: true };
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListConstructor.cs (1)
12internal SynthesizedReadOnlyListConstructor(SynthesizedReadOnlyListTypeSymbol containingType, TypeSymbol parameterType, string parameterName) : base(containingType)
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListEnumeratorConstructor.cs (1)
12internal SynthesizedReadOnlyListEnumeratorConstructor(SynthesizedReadOnlyListEnumeratorTypeSymbol containingType, TypeSymbol parameterType) : base(containingType)
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListEnumeratorTypeSymbol.cs (5)
226internal override NamedTypeSymbol GetDeclaredBaseType(ConsList<TypeSymbol> basesBeingResolved) => BaseTypeNoUseSiteDiagnostics; 228internal override ImmutableArray<NamedTypeSymbol> GetDeclaredInterfaces(ConsList<TypeSymbol> basesBeingResolved) => _interfaces; 246internal override bool HasCollectionBuilderAttribute(out TypeSymbol? builderType, out string? methodName) 259internal override bool HasAsyncMethodBuilderAttribute(out TypeSymbol? builderArgument) 267internal override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol>? basesBeingResolved = null) => _interfaces;
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListTypeParameterSymbol.cs (1)
61internal override TypeSymbol GetDeducedBaseType(ConsList<TypeParameterSymbol> inProgress) => ContainingAssembly.GetSpecialType(SpecialType.System_Object);
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListTypeSymbol.cs (7)
276TypeSymbol fieldType = kind switch 739TypeSymbol fieldType = fieldReference.Type; 908internal override NamedTypeSymbol GetDeclaredBaseType(ConsList<TypeSymbol> basesBeingResolved) => BaseTypeNoUseSiteDiagnostics; 910internal override ImmutableArray<NamedTypeSymbol> GetDeclaredInterfaces(ConsList<TypeSymbol> basesBeingResolved) => _interfaces; 934internal override bool HasCollectionBuilderAttribute(out TypeSymbol? builderType, out string? methodName) 947internal override bool HasAsyncMethodBuilderAttribute(out TypeSymbol? builderArgument) 955internal override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol>? basesBeingResolved = null) => _interfaces;
Symbols\Synthesized\Records\SynthesizedRecordClone.cs (1)
141internal static MethodSymbol? FindValidCloneMethod(TypeSymbol containingType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Symbols\Synthesized\Records\SynthesizedRecordEquals.cs (1)
138var parameterType = f.Type;
Symbols\Synthesized\Records\SynthesizedRecordPropertySymbol.cs (1)
70private static bool ShouldUseInit(TypeSymbol container)
Symbols\Synthesized\SynthesizedAccessorValueParameterSymbol.cs (1)
138TypeSymbol eventTokenType = @event.DeclaringCompilation.GetWellKnownType(WellKnownType.System_Runtime_InteropServices_WindowsRuntime_EventRegistrationToken);
Symbols\Synthesized\SynthesizedContainer.cs (5)
157internal override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol> basesBeingResolved) => ImmutableArray<NamedTypeSymbol>.Empty; 163internal override NamedTypeSymbol GetDeclaredBaseType(ConsList<TypeSymbol> basesBeingResolved) => BaseTypeNoUseSiteDiagnostics; 165internal override ImmutableArray<NamedTypeSymbol> GetDeclaredInterfaces(ConsList<TypeSymbol> basesBeingResolved) => InterfacesNoUseSiteDiagnostics(basesBeingResolved); 223internal sealed override bool HasCollectionBuilderAttribute(out TypeSymbol? builderType, out string? methodName) 230internal sealed override bool HasAsyncMethodBuilderAttribute(out TypeSymbol? builderArgument)
Symbols\Synthesized\SynthesizedDelegateSymbol.cs (2)
17public SynthesizedDelegateConstructor(NamedTypeSymbol containingType, TypeSymbol objectType, TypeSymbol intPtrType)
Symbols\Synthesized\SynthesizedEmbeddedAttributeSymbol.cs (5)
163internal override NamedTypeSymbol GetDeclaredBaseType(ConsList<TypeSymbol> basesBeingResolved) => _baseType; 165internal override ImmutableArray<NamedTypeSymbol> GetDeclaredInterfaces(ConsList<TypeSymbol> basesBeingResolved) => ImmutableArray<NamedTypeSymbol>.Empty; 177internal override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol> basesBeingResolved = null) => ImmutableArray<NamedTypeSymbol>.Empty; 220internal sealed override bool HasCollectionBuilderAttribute(out TypeSymbol? builderType, out string? methodName) 227internal sealed override bool HasAsyncMethodBuilderAttribute(out TypeSymbol? builderArgument)
Symbols\Synthesized\SynthesizedEmbeddedNativeIntegerAttributeSymbol.cs (2)
18private readonly TypeSymbol _boolType; 27TypeSymbol boolType)
Symbols\Synthesized\SynthesizedEmbeddedNullableAttributeSymbol.cs (2)
20private readonly TypeSymbol _byteTypeSymbol; 29TypeSymbol systemByteType)
Symbols\Synthesized\SynthesizedEmbeddedNullableContextAttributeSymbol.cs (1)
26TypeSymbol systemByteType)
Symbols\Synthesized\SynthesizedEmbeddedNullablePublicOnlyAttributeSymbol.cs (1)
26TypeSymbol systemBooleanType)
Symbols\Synthesized\SynthesizedEmbeddedRefSafetyRulesAttributeSymbol.cs (1)
24TypeSymbol int32Type)
Symbols\Synthesized\SynthesizedEntryPointSymbol.cs (3)
317internal sealed override bool HasAsyncMethodBuilderAttribute(out TypeSymbol builderArgument) 535internal SubmissionEntryPoint(NamedTypeSymbol containingType, TypeWithAnnotations returnType, TypeSymbol submissionArrayType) : 610Debug.Assert(TypeSymbol.Equals(initializeResult.Type, _returnType.Type, TypeCompareKind.ConsiderEverything2));
Symbols\Synthesized\SynthesizedFieldSymbol.cs (1)
25TypeSymbol type,
Symbols\Synthesized\SynthesizedFieldSymbolBase.cs (1)
52var type = typeWithAnnotations.Type;
Symbols\Synthesized\SynthesizedGlobalMethodSymbol.cs (4)
24private TypeSymbol _returnType; 38internal SynthesizedGlobalMethodSymbol(SynthesizedPrivateImplementationDetailsType privateImplType, TypeSymbol returnType, string name) 46protected void SetReturnType(TypeSymbol returnType) 359internal sealed override bool HasAsyncMethodBuilderAttribute(out TypeSymbol builderArgument)
Symbols\Synthesized\SynthesizedHotReloadExceptionConstructorSymbol.cs (2)
14internal SynthesizedHotReloadExceptionConstructorSymbol(NamedTypeSymbol containingType, TypeSymbol stringType, TypeSymbol intType) :
Symbols\Synthesized\SynthesizedHotReloadExceptionSymbol.cs (7)
34TypeSymbol stringType, 35TypeSymbol intType) 129internal override NamedTypeSymbol GetDeclaredBaseType(ConsList<TypeSymbol> basesBeingResolved) => _baseType; 130internal override ImmutableArray<NamedTypeSymbol> GetDeclaredInterfaces(ConsList<TypeSymbol> basesBeingResolved) => []; 135internal override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol>? basesBeingResolved = null) => []; 155internal sealed override bool HasCollectionBuilderAttribute(out TypeSymbol? builderType, out string? methodName) 162internal sealed override bool HasAsyncMethodBuilderAttribute(out TypeSymbol? builderArgument)
Symbols\Synthesized\SynthesizedInlineArrayAsReadOnlySpanMethod.cs (1)
33f.WellKnownMethod(WellKnownMember.System_Runtime_CompilerServices_Unsafe__As_T).Construct(ImmutableArray<TypeSymbol>.CastUp(TypeParameters)),
Symbols\Synthesized\SynthesizedInlineArrayAsSpanMethod.cs (1)
33f.WellKnownMethod(WellKnownMember.System_Runtime_CompilerServices_Unsafe__As_T).Construct(ImmutableArray<TypeSymbol>.CastUp(TypeParameters)),
Symbols\Synthesized\SynthesizedInlineArrayElementRefMethod.cs (1)
35f.WellKnownMethod(WellKnownMember.System_Runtime_CompilerServices_Unsafe__As_T).Construct(ImmutableArray<TypeSymbol>.CastUp(TypeParameters)),
Symbols\Synthesized\SynthesizedInlineArrayElementRefReadOnlyMethod.cs (1)
35f.WellKnownMethod(WellKnownMember.System_Runtime_CompilerServices_Unsafe__As_T).Construct(ImmutableArray<TypeSymbol>.CastUp(TypeParameters)),
Symbols\Synthesized\SynthesizedInlineArrayFirstElementRefMethod.cs (1)
32f.WellKnownMethod(WellKnownMember.System_Runtime_CompilerServices_Unsafe__As_T).Construct(ImmutableArray<TypeSymbol>.CastUp(TypeParameters)),
Symbols\Synthesized\SynthesizedInlineArrayFirstElementRefReadOnlyMethod.cs (1)
32f.WellKnownMethod(WellKnownMember.System_Runtime_CompilerServices_Unsafe__As_T).Construct(ImmutableArray<TypeSymbol>.CastUp(TypeParameters)),
Symbols\Synthesized\SynthesizedInlineArrayTypeSymbol.cs (6)
157internal override NamedTypeSymbol GetDeclaredBaseType(ConsList<TypeSymbol> basesBeingResolved) => BaseTypeNoUseSiteDiagnostics; 159internal override ImmutableArray<NamedTypeSymbol> GetDeclaredInterfaces(ConsList<TypeSymbol> basesBeingResolved) => ImmutableArray<NamedTypeSymbol>.Empty; 171internal override bool HasCollectionBuilderAttribute(out TypeSymbol? builderType, out string? methodName) 184internal sealed override bool HasAsyncMethodBuilderAttribute(out TypeSymbol? builderArgument) 192internal override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol>? basesBeingResolved = null) => ImmutableArray<NamedTypeSymbol>.Empty; 261internal override TypeSymbol GetDeducedBaseType(ConsList<TypeParameterSymbol> inProgress) => ContainingAssembly.GetSpecialType(SpecialType.System_Object);
Symbols\Synthesized\SynthesizedInteractiveInitializerMethod.cs (5)
22private readonly TypeSymbol _resultType; 23private readonly TypeSymbol _returnType; 238internal TypeSymbol ResultType 261out TypeSymbol resultType, 262out TypeSymbol returnType)
Symbols\Synthesized\SynthesizedIntrinsicOperatorSymbol.cs (12)
18private readonly TypeSymbol _containingType; 21private readonly TypeSymbol _returnType; 23public SynthesizedIntrinsicOperatorSymbol(TypeSymbol leftType, string name, TypeSymbol rightType, TypeSymbol returnType) 49public SynthesizedIntrinsicOperatorSymbol(TypeSymbol container, string name, TypeSymbol returnType) 440TypeSymbol.Equals(_containingType, other._containingType, compareKind) && 441TypeSymbol.Equals(_returnType, other._returnType, compareKind)) 445if (!TypeSymbol.Equals(_parameters[i].Type, other._parameters[i].Type, compareKind)) 466TypeSymbol type, 514internal sealed override bool HasAsyncMethodBuilderAttribute(out TypeSymbol builderArgument)
Symbols\Synthesized\SynthesizedLambdaCacheFieldSymbol.cs (1)
19public SynthesizedLambdaCacheFieldSymbol(NamedTypeSymbol containingType, TypeSymbol type, string name, MethodSymbol topLevelMethod, bool isReadOnly, bool isStatic)
Symbols\Synthesized\SynthesizedMethodSymbol.cs (1)
92internal sealed override bool HasAsyncMethodBuilderAttribute(out TypeSymbol builderArgument)
Symbols\Synthesized\SynthesizedParameterlessThrowMethod.cs (1)
17internal SynthesizedParameterlessThrowMethod(SynthesizedPrivateImplementationDetailsType privateImplType, TypeSymbol returnType, string synthesizedMethodName, MethodSymbol exceptionConstructor)
Symbols\Synthesized\SynthesizedPrivateImplementationDetailsType.cs (5)
149internal override NamedTypeSymbol GetDeclaredBaseType(ConsList<TypeSymbol> basesBeingResolved) => _objectType; 151internal override ImmutableArray<NamedTypeSymbol> GetDeclaredInterfaces(ConsList<TypeSymbol> basesBeingResolved) => ImmutableArray<NamedTypeSymbol>.Empty; 169internal override bool HasAsyncMethodBuilderAttribute(out TypeSymbol? builderArgument) 175internal override bool HasCollectionBuilderAttribute(out TypeSymbol? builderType, out string? methodName) 190internal override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol>? basesBeingResolved = null) => ImmutableArray<NamedTypeSymbol>.Empty;
Symbols\Synthesized\SynthesizedSimpleProgramEntryPointSymbol.cs (1)
23private readonly TypeSymbol _returnType;
Symbols\Synthesized\SynthesizedStaticConstructor.cs (1)
438internal sealed override bool HasAsyncMethodBuilderAttribute(out TypeSymbol? builderArgument)
Symbols\Synthesized\SynthesizedStringHashFunctionSymbol.cs (4)
18internal SynthesizedStringSwitchHashMethod(SynthesizedPrivateImplementationDetailsType privateImplType, TypeSymbol returnType, TypeSymbol paramType) 27internal SynthesizedSpanSwitchHashMethod(SynthesizedPrivateImplementationDetailsType privateImplType, TypeSymbol returnType, TypeSymbol paramType, bool isReadOnlySpan)
Symbols\Synthesized\SynthesizedThrowSwitchExpressionExceptionMethod.cs (2)
16internal SynthesizedThrowSwitchExpressionExceptionMethod(SynthesizedPrivateImplementationDetailsType privateImplType, TypeSymbol returnType, TypeSymbol paramType)
Symbols\SynthesizedSimpleMethodTypeParameterSymbol.cs (1)
125internal override TypeSymbol GetDeducedBaseType(ConsList<TypeParameterSymbol> inProgress)
Symbols\Tuples\TupleErrorFieldSymbol.cs (1)
190TypeSymbol.Equals(ContainingType, other.ContainingType, compareKind);
Symbols\Tuples\TupleFieldSymbol.cs (1)
172TypeSymbol.Equals(_containingTuple, other._containingTuple, compareKind);
Symbols\Tuples\TupleTypeSymbol.cs (3)
277internal static void ReportTupleNamesMismatchesIfAny(TypeSymbol destination, BoundTupleLiteral literal, BindingDiagnosticBag diagnostics) 853private TypeSymbol MergeTupleNames(NamedTypeSymbol other, NamedTypeSymbol mergedType) 1112if (TypeSymbol.Equals(underlyingMemberDefinition.ContainingType, TupleUnderlyingType.OriginalDefinition, TypeCompareKind.ConsiderEverything))
Symbols\TypeMap.cs (3)
23public static readonly Func<TypeWithAnnotations, TypeSymbol> AsTypeSymbol = t => t.Type; 35internal static ImmutableArray<TypeSymbol> AsTypeSymbols(ImmutableArray<TypeWithAnnotations> typesOpt) 140Debug.Assert(TypeSymbol.Equals(oldOwner.ConstructedFrom, oldOwner, TypeCompareKind.ConsiderEverything2));
Symbols\TypeParameterBounds.cs (2)
27TypeSymbol deducedBaseType) 80public readonly TypeSymbol DeducedBaseType;
Symbols\TypeParameterSymbol.cs (17)
36protected sealed override TypeSymbol OriginalTypeSymbolDefinition 100((TypeSymbol)constraint.Type.OriginalDefinition).AddUseSiteInfo(ref useSiteInfo); 243internal sealed override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol> basesBeingResolved = null) 309internal TypeSymbol DeducedBaseTypeNoUseSiteDiagnostics 318internal TypeSymbol DeducedBaseType(ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 321var result = DeducedBaseTypeNoUseSiteDiagnostics; 325((TypeSymbol)result.OriginalDefinition).AddUseSiteInfo(ref useSiteInfo); 349var current = DeducedBaseType(ref useSiteInfo); 390internal abstract TypeSymbol GetDeducedBaseType(ConsList<TypeParameterSymbol> inProgress); 392private static bool ConstraintImpliesReferenceType(TypeSymbol constraint) 402internal static bool NonTypeParameterConstraintImpliesReferenceType(TypeSymbol constraint) 648internal sealed override bool GetUnificationUseSiteDiagnosticRecursive(ref DiagnosticInfo result, Symbol owner, ref HashSet<TypeSymbol> checkedTypes) 653internal override bool Equals(TypeSymbol t2, TypeCompareKind comparison) 688internal override bool ApplyNullableTransforms(byte defaultTransformFlag, ImmutableArray<byte> transforms, ref int position, out TypeSymbol result) 694internal override TypeSymbol SetNullabilityForReferenceTypes(Func<TypeWithAnnotations, TypeWithAnnotations> transform) 699internal override TypeSymbol MergeEquivalentTypes(TypeSymbol other, VarianceKind variance)
Symbols\TypeSymbol.cs (53)
51/// <see cref="TypeSymbol.InterfacesAndTheirBaseInterfacesNoUseSiteDiagnostics"/> 106for (var baseType = this; !ReferenceEquals(baseType, null); baseType = baseType.BaseTypeNoUseSiteDiagnostics) 130public new TypeSymbol OriginalDefinition 138protected virtual TypeSymbol OriginalTypeSymbolDefinition 191internal abstract ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol> basesBeingResolved = null); 216var current = this; 235internal TypeSymbol EffectiveTypeNoUseSiteDiagnostics 243internal TypeSymbol EffectiveType(ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 251internal bool IsDerivedFrom(TypeSymbol type, TypeCompareKind comparison, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 278internal bool IsEqualToOrDerivedFrom(TypeSymbol type, TypeCompareKind comparison, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 293internal virtual bool Equals(TypeSymbol t2, TypeCompareKind compareKind) 300var t2 = other as TypeSymbol; 342for (var baseType = this; !ReferenceEquals(baseType, null); baseType = baseType.BaseTypeNoUseSiteDiagnostics) 531internal abstract bool GetUnificationUseSiteDiagnosticRecursive(ref DiagnosticInfo result, Symbol owner, ref HashSet<TypeSymbol> checkedTypes); 645internal abstract bool ApplyNullableTransforms(byte defaultTransformFlag, ImmutableArray<byte> transforms, ref int position, out TypeSymbol result); 647internal abstract TypeSymbol SetNullabilityForReferenceTypes(Func<TypeWithAnnotations, TypeWithAnnotations> transform); 649internal TypeSymbol SetUnknownNullabilityForReferenceTypes() 663internal abstract TypeSymbol MergeEquivalentTypes(TypeSymbol other, VarianceKind variance); 814private static Symbol ComputeImplementationForInterfaceMember(Symbol interfaceMember, TypeSymbol implementingType, BindingDiagnosticBag diagnostics, 845TypeSymbol implementingBaseOpt = null; // Calculated only if canBeImplementedImplicitly == false 850for (TypeSymbol currType = implementingType; (object)currType != null; currType = currType.BaseTypeWithDefinitionUseSiteDiagnostics(ref useSiteInfo)) 1066private static Symbol FindMostSpecificImplementationInInterfaces(Symbol interfaceMember, TypeSymbol implementingType, 1099static bool stopLookup(MethodSymbol interfaceAccessor, TypeSymbol implementingType) 1162TypeSymbol implementingType, 1475private static bool IsExplicitlyImplementedViaAccessors(bool checkPendingExplicitImplementations, Symbol interfaceMember, TypeSymbol currType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, out Symbol implementingMember) 1512private static bool TryGetExplicitImplementationAssociatedPropertyOrEvent(bool checkPendingExplicitImplementations, MethodSymbol interfaceAccessor, TypeSymbol currType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, out Symbol associated) 1556private static void CheckForImplementationOfCorrespondingPropertyOrEvent(MethodSymbol interfaceMethod, TypeSymbol implementingType, bool implementingTypeIsFromSomeCompilation, 1608else if ((object)correspondingImplementingAccessor != null && ((object)implicitImpl == null || TypeSymbol.Equals(correspondingImplementingAccessor.ContainingType, implicitImpl.ContainingType, TypeCompareKind.ConsiderEverything2))) 1639private static void ReportDefaultInterfaceImplementationMatchDiagnostics(Symbol interfaceMember, TypeSymbol implementingType, Symbol implicitImpl, BindingDiagnosticBag diagnostics) 1687private static void ReportImplicitImplementationMatchDiagnostics(Symbol interfaceMember, TypeSymbol implementingType, Symbol implicitImpl, BindingDiagnosticBag diagnostics) 1782internal static void CheckModifierMismatchOnImplementingMember(TypeSymbol implementingType, Symbol implementingMember, Symbol interfaceMember, bool isExplicit, BindingDiagnosticBag diagnostics) 1813TypeSymbol implementingType, 1819ReportMismatchInReturnType<(TypeSymbol implementingType, bool isExplicit)> reportMismatchInReturnType = 1842ReportMismatchInParameterType<(TypeSymbol implementingType, bool isExplicit)> reportMismatchInParameterType = 1999private static void ReportImplicitImplementationMismatchDiagnostics(Symbol interfaceMember, TypeSymbol implementingType, Symbol closestMismatch, BindingDiagnosticBag diagnostics) 2021TypeSymbol interfaceMemberReturnType; 2094private static Location GetInterfaceLocation(Symbol interfaceMember, TypeSymbol implementingType) 2108private static bool ReportAnyMismatchedConstraints(MethodSymbol interfaceMethod, TypeSymbol implementingType, MethodSymbol implicitImpl, BindingDiagnosticBag diagnostics) 2153internal static Location GetImplicitImplementationDiagnosticLocation(Symbol interfaceMember, TypeSymbol implementingType, Symbol member) 2155if (TypeSymbol.Equals(member.ContainingType, implementingType, TypeCompareKind.ConsiderEverything2)) 2185TypeSymbol currType, 2469public static bool Equals(TypeSymbol? left, TypeSymbol? right, TypeCompareKind comparison) 2481public static bool operator ==(TypeSymbol left, TypeSymbol right) 2485public static bool operator !=(TypeSymbol left, TypeSymbol right) 2489public static bool operator ==(Symbol left, TypeSymbol right) 2493public static bool operator !=(Symbol left, TypeSymbol right) 2497public static bool operator ==(TypeSymbol left, Symbol right) 2501public static bool operator !=(TypeSymbol left, Symbol right)
Symbols\TypeSymbolExtensions.cs (169)
26public static bool ImplementsInterface(this TypeSymbol subType, TypeSymbol superInterface, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 30if (@interface.IsInterface && TypeSymbol.Equals(@interface, superInterface, TypeCompareKind.ConsiderEverything2)) 38public static bool CanBeAssignedNull(this TypeSymbol type) 43public static bool CanContainNull(this TypeSymbol type) 49public static bool CanBeConst(this TypeSymbol typeSymbol) 69public static bool IsTypeParameterDisallowingAnnotationInCSharp8(this TypeSymbol type) 90public static bool IsPossiblyNullableReferenceTypeTypeParameter(this TypeSymbol type) 95public static bool IsNonNullableValueType(this TypeSymbol typeArgument) 105public static bool IsVoidType(this TypeSymbol type) 110public static bool IsNullableTypeOrTypeParameter(this TypeSymbol? type) 139public static bool IsNullableType(this TypeSymbol type) 144public static bool IsValidNullableTypeArgument(this TypeSymbol type) 152public static TypeSymbol GetNullableUnderlyingType(this TypeSymbol type) 157public static bool IsNullableType(this TypeSymbol? type, [NotNullWhen(true)] out TypeSymbol? underlyingType) 170public static TypeWithAnnotations GetNullableUnderlyingTypeWithAnnotations(this TypeSymbol type) 179public static TypeSymbol StrippedType(this TypeSymbol type) 184public static TypeSymbol EnumUnderlyingTypeOrSelf(this TypeSymbol type) 189public static bool IsNativeIntegerOrNullableThereof(this TypeSymbol? type) 194public static bool IsObjectType(this TypeSymbol type) 199public static bool IsStringType(this TypeSymbol type) 204public static bool IsCharType(this TypeSymbol type) 209public static bool IsIntegralType(this TypeSymbol type) 214public static NamedTypeSymbol? GetEnumUnderlyingType(this TypeSymbol? type) 219public static bool IsEnumType(this TypeSymbol type) 225public static bool IsValidEnumType(this TypeSymbol type) 238public static bool IsValidAttributeParameterType(this TypeSymbol type, CSharpCompilation compilation) 249public static TypedConstantKind GetAttributeParameterTypedConstantKind(this TypeSymbol type, CSharpCompilation compilation) 313public static bool IsValidExtensionParameterType(this TypeSymbol type) 326public static bool IsInterfaceType(this TypeSymbol type) 332public static bool IsClassType(this TypeSymbol type) 338public static bool IsStructType(this TypeSymbol type) 344public static bool IsErrorType(this TypeSymbol type) 355public static bool IsDynamic(this TypeSymbol type) 360public static bool IsTypeParameter(this TypeSymbol type) 366public static bool IsArray(this TypeSymbol type) 372public static bool IsSZArray(this TypeSymbol type) 378internal static bool IsArrayInterface(this TypeSymbol type, out TypeWithAnnotations typeArgument) 398public static bool IsFunctionPointer(this TypeSymbol type) 403public static bool IsPointerOrFunctionPointer(this TypeSymbol type) 416internal static ImmutableArray<NamedTypeSymbol> GetAllInterfacesOrEffectiveInterfaces(this TypeSymbol type) 437public static NamedTypeSymbol? GetDelegateType(this TypeSymbol? type) 448public static TypeSymbol? GetDelegateOrFunctionPointerType(this TypeSymbol? type) 450return (TypeSymbol?)GetDelegateType(type) ?? type as FunctionPointerTypeSymbol; 457public static bool IsExpressionTree(this TypeSymbol type) 466public static bool IsNonGenericExpressionType(this TypeSymbol type) 476public static bool IsGenericOrNonGenericExpressionType(this TypeSymbol _type, out bool isGenericType) 516public static bool IsPossibleArrayGenericInterface(this TypeSymbol type) 539internal static bool IsErrorOrRefLikeOrAllowsRefLikeType(this TypeSymbol type) 544internal static bool IsRefLikeOrAllowsRefLikeType(this TypeSymbol type) 567public static bool IsDelegateType(this TypeSymbol type) 573public static ImmutableArray<ParameterSymbol> DelegateParameters(this TypeSymbol type) 583public static ImmutableArray<ParameterSymbol> DelegateOrFunctionPointerParameters(this TypeSymbol type) 596public static bool TryGetElementTypesWithAnnotationsIfTupleType(this TypeSymbol type, out ImmutableArray<TypeWithAnnotations> elementTypes) 609public static MethodSymbol? DelegateInvokeMethod(this TypeSymbol type) 620public static ConstantValue? GetDefaultValue(this TypeSymbol type) 668public static SpecialType GetSpecialTypeSafe(this TypeSymbol? type) 673public static bool IsAtLeastAsVisibleAs(this TypeSymbol type, Symbol sym, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 682var result = type.VisitType(static (type1, arg, unused) => IsTypeLessVisibleThan(type1, arg.Symbol!, ref arg.UseSiteInfo), 697private static bool IsTypeLessVisibleThan(TypeSymbol type, Symbol sym, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 721public static TypeSymbol? VisitType<T>( 722this TypeSymbol type, 723Func<TypeSymbol, T, bool, bool> predicate, 749public static TypeSymbol? VisitType<T>( 751TypeSymbol? type, 753Func<TypeSymbol, T, bool, bool>? typePredicate, 770TypeSymbol current = type ?? (useDefaultType ? typeWithAnnotationsOpt.DefaultType : typeWithAnnotationsOpt.Type); 786var result = VisitType(default, containingType, typeWithAnnotationsPredicate, typePredicate, arg, canDigThroughNullable, useDefaultType, visitCustomModifiers); 819var result = VisitType( 870(TypeWithAnnotations nextTypeWithAnnotations, TypeSymbol? nextType) = getNextIterationElements(fields[i].TypeWithAnnotations, canDigThroughNullable); 871var result = VisitType( 901(TypeWithAnnotations nextTypeWithAnnotations, TypeSymbol? nextType) = getNextIterationElements(typeArguments[i], canDigThroughNullable); 902var result = VisitType( 932var result = visitFunctionPointerType((FunctionPointerTypeSymbol)current, typeWithAnnotationsPredicate, typePredicate, arg, useDefaultType, canDigThroughNullable, visitCustomModifiers, out next); 950static (TypeWithAnnotations, TypeSymbol?) getNextIterationElements(TypeWithAnnotations type, bool canDigThroughNullable) 953static TypeSymbol? visitFunctionPointerType(FunctionPointerTypeSymbol type, Func<TypeWithAnnotations, T, bool, bool>? typeWithAnnotationsPredicate, Func<TypeSymbol, T, bool, bool>? typePredicate, T arg, bool useDefaultType, bool canDigThroughNullable, bool visitCustomModifiers, out TypeWithAnnotations next) 962var result = VisitType( 980(TypeWithAnnotations nextTypeWithAnnotations, TypeSymbol? nextType) = getNextIterationElements(currentPointer.Parameters[i].TypeWithAnnotations, canDigThroughNullable); 1182public static bool IsUnboundGenericType(this TypeSymbol type) 1198public static bool ContainsTypeParameter(this TypeSymbol type, TypeParameterSymbol? parameter = null) 1200var result = type.VisitType(s_containsTypeParameterPredicate, parameter); 1204private static readonly Func<TypeSymbol, TypeParameterSymbol?, bool, bool> s_containsTypeParameterPredicate = 1205(type, parameter, unused) => type.TypeKind == TypeKind.TypeParameter && (parameter is null || TypeSymbol.Equals(type, parameter, TypeCompareKind.ConsiderEverything2)); 1207public static bool ContainsTypeParameter(this TypeSymbol type, MethodSymbol parameterContainer) 1211var result = type.VisitType(s_isTypeParameterWithSpecificContainerPredicate, parameterContainer); 1215private static readonly Func<TypeSymbol, Symbol, bool, bool> s_isTypeParameterWithSpecificContainerPredicate = 1218public static bool ContainsTypeParameters(this TypeSymbol type, HashSet<TypeParameterSymbol> parameters) 1220var result = type.VisitType(s_containsTypeParametersPredicate, parameters); 1224private static readonly Func<TypeSymbol, HashSet<TypeParameterSymbol>, bool, bool> s_containsTypeParametersPredicate = 1227public static bool ContainsMethodTypeParameter(this TypeSymbol type) 1229var result = type.VisitType(s_containsMethodTypeParameterPredicate, null); 1233private static readonly Func<TypeSymbol, object?, bool, bool> s_containsMethodTypeParameterPredicate = 1239public static bool ContainsDynamic(this TypeSymbol type) 1241var result = type.VisitType(s_containsDynamicPredicate, null, canDigThroughNullable: true); 1245private static readonly Func<TypeSymbol, object?, bool, bool> s_containsDynamicPredicate = (type, unused1, unused2) => type.TypeKind == TypeKind.Dynamic; 1247internal static bool ContainsNativeIntegerWrapperType(this TypeSymbol type) 1249var result = type.VisitType((type, unused1, unused2) => type.IsNativeIntegerWrapperType, (object?)null, canDigThroughNullable: true); 1258internal static bool ContainsErrorType(this TypeSymbol type) 1260var result = type.VisitType((type, unused1, unused2) => type.IsErrorType(), (object?)null, canDigThroughNullable: true); 1267internal static bool ContainsTuple(this TypeSymbol type) => 1268type.VisitType((TypeSymbol t, object? _1, bool _2) => t.IsTupleType, null) is object; 1273internal static bool ContainsTupleNames(this TypeSymbol type) => 1274type.VisitType((TypeSymbol t, object? _1, bool _2) => !t.TupleElementNames.IsDefault, null) is object; 1279internal static bool ContainsFunctionPointer(this TypeSymbol type) => 1280type.VisitType((TypeSymbol t, object? _, bool _) => t.IsFunctionPointer(), null) is object; 1282internal static bool ContainsPointerOrFunctionPointer(this TypeSymbol type) => 1283type.VisitType((TypeSymbol t, object? _, bool _) => t.TypeKind is TypeKind.Pointer or TypeKind.FunctionPointer, null) is object; 1300internal static TypeSymbol? GetNonErrorGuess(this TypeSymbol type) 1302var result = ExtendedErrorTypeSymbol.ExtractNonErrorType(type); 1311internal static TypeKind GetNonErrorTypeKindGuess(this TypeSymbol type) 1321internal static bool IsValidV6SwitchGoverningType(this TypeSymbol type, bool isTargetTypeOfUserDefinedOp = false) 1366internal static bool IsSpan(this TypeSymbol type) 1379internal static bool IsReadOnlySpan(this TypeSymbol type) 1392internal static bool IsSpanChar(this TypeSymbol type) 1403internal static bool IsReadOnlySpanChar(this TypeSymbol type) 1414internal static bool IsSpanOrReadOnlySpanChar(this TypeSymbol type) 1432internal static bool IsRestrictedType(this TypeSymbol type, 1448public static bool IsIntrinsicType(this TypeSymbol type) 1475public static bool IsPartial(this TypeSymbol type) 1480public static bool HasFileLocalTypes(this TypeSymbol type) 1482var foundType = type.VisitType(predicate: (type, _, _) => type is NamedTypeSymbol { IsFileLocal: true }, arg: (object?)null); 1495public static bool IsPointerType(this TypeSymbol type) 1500internal static int FixedBufferElementSizeInBytes(this TypeSymbol type) 1506internal static bool IsValidVolatileFieldType(this TypeSymbol type) 1540public static bool MarkCheckedIfNecessary(this TypeSymbol type, ref HashSet<TypeSymbol> checkedTypes) 1544checkedTypes = new HashSet<TypeSymbol>(); 1550internal static bool IsVoidPointer(this TypeSymbol type) 1559internal static bool IsPrimitiveRecursiveStruct(this TypeSymbol t) 1643public static TypeSymbol AsDynamicIfNoPia(this TypeSymbol type, NamedTypeSymbol containingType) 1645return type.TryAsDynamicIfNoPia(containingType, out TypeSymbol? result) ? result : type; 1648public static bool TryAsDynamicIfNoPia(this TypeSymbol type, NamedTypeSymbol containingType, [NotNullWhen(true)] out TypeSymbol? result) 1668internal static bool IsVerifierReference(this TypeSymbol type) 1676internal static bool IsVerifierValue(this TypeSymbol type) 1828internal static bool IsNonGenericTaskType(this TypeSymbol type, CSharpCompilation compilation) 1846internal static bool IsGenericTaskType(this TypeSymbol type, CSharpCompilation compilation) 1859internal static bool IsIAsyncEnumerableType(this TypeSymbol type, CSharpCompilation compilation) 1869internal static bool IsIAsyncEnumeratorType(this TypeSymbol type, CSharpCompilation compilation) 1889internal static bool IsCustomTaskType(this NamedTypeSymbol type, [NotNullWhen(true)] out TypeSymbol? builderArgument) 1906internal static TypeSymbol NormalizeTaskTypes(this TypeSymbol type, CSharpCompilation compilation) 1915private static bool NormalizeTaskTypesInType(CSharpCompilation compilation, ref TypeSymbol type) 1954var type = typeWithAnnotations.Type; 2119internal static bool IsWellKnownTypeInAttribute(this TypeSymbol typeSymbol) 2122internal static bool IsWellKnownTypeRequiresLocationAttribute(this TypeSymbol typeSymbol) 2125internal static bool IsWellKnownTypeUnmanagedType(this TypeSymbol typeSymbol) 2128internal static bool IsWellKnownTypeIsExternalInit(this TypeSymbol typeSymbol) 2131internal static bool IsWellKnownTypeOutAttribute(this TypeSymbol typeSymbol) => typeSymbol.IsWellKnownInteropServicesTopLevelType("OutAttribute"); 2134internal static bool IsWellKnownTypeLock(this TypeSymbol typeSymbol) 2140internal static bool IsMicrosoftCodeAnalysisEmbeddedAttribute(this TypeSymbol typeSymbol) 2151private static bool IsWellKnownInteropServicesTopLevelType(this TypeSymbol typeSymbol, string name) 2161private static bool IsWellKnownCompilerServicesTopLevelType(this TypeSymbol typeSymbol, string name) 2171internal static bool IsCompilerServicesTopLevelType(this TypeSymbol typeSymbol) 2174internal static bool IsWellKnownSetsRequiredMembersAttribute(this TypeSymbol type) 2177internal static bool IsWellKnownINumberBaseType(this TypeSymbol type) 2184internal static bool IsWellKnownDiagnosticsCodeAnalysisTopLevelType(this TypeSymbol typeSymbol) 2187private static bool IsContainedInNamespace(this TypeSymbol typeSymbol, string outerNS, string midNS, string? innerNS = null) 2220internal static int TypeToIndex(this TypeSymbol type) 2245TypeSymbol underlyingType = type.GetNullableUnderlyingType(); 2274internal static bool IsDisplayClassType(this TypeSymbol type)
Symbols\TypeUnification.cs (9)
18public static bool CanUnify(TypeSymbol t1, TypeSymbol t2) 20if (TypeSymbol.Equals(t1, t2, TypeCompareKind.CLRSignatureCompareOptions)) 57private static bool CanUnifyHelper(TypeSymbol t1, TypeSymbol t2, ref MutableTypeMap? substitution) 92if (TypeSymbol.Equals(t1.Type, t2.Type, TypeCompareKind.CLRSignatureCompareOptions) && t1.CustomModifiers.SequenceEqual(t2.CustomModifiers)) 160if (nt2.Arity != arity || !TypeSymbol.Equals(nt2.OriginalDefinition, nt1.OriginalDefinition, TypeCompareKind.ConsiderEverything)) 265private static bool Contains(TypeSymbol type, TypeParameterSymbol typeParam) 293return TypeSymbol.Equals(type, typeParam, TypeCompareKind.ConsiderEverything);
Symbols\TypeWithAnnotations.cs (89)
40internal readonly TypeSymbol DefaultType; 53private TypeWithAnnotations(TypeSymbol defaultType, NullableAnnotation defaultAnnotation, Extensions extensions) 75internal static TypeWithAnnotations Create(bool isNullableEnabled, TypeSymbol typeSymbol, bool isAnnotated = false) 85internal static TypeWithAnnotations Create(TypeSymbol typeSymbol, NullableAnnotation nullableAnnotation = NullableAnnotation.Oblivious, ImmutableArray<CustomModifier> customModifiers = default) 168private static TypeWithAnnotations CreateNonLazyType(TypeSymbol typeSymbol, NullableAnnotation nullableAnnotation, ImmutableArray<CustomModifier> customModifiers) 178private static TypeWithAnnotations CreateLazySubstitutedType(TypeSymbol substitutedTypeSymbol, ImmutableArray<CustomModifier> customModifiers, TypeParameterSymbol typeParameter) 198var typeSymbol = this.Type; 243TypeSymbol typeSymbol = other.Type; 245TypeSymbol type = Type.MergeEquivalentTypes(typeSymbol, variance); 254public TypeSymbol Type => _extensions?.GetResolvedType(DefaultType); 256public TypeSymbol NullableUnderlyingTypeOrSelf => _extensions.GetNullableUnderlyingTypeOrSelf(DefaultType); 377TypeSymbol type = Type; 424public bool GetUnificationUseSiteDiagnosticRecursive(ref DiagnosticInfo result, Symbol owner, ref HashSet<TypeSymbol> checkedTypes) 445TypeSymbol typeSymbol = this.Type; 556public TypeSymbol AsTypeSymbolOnly() => _extensions.AsTypeSymbolOnly(DefaultType); 567public TypeWithAnnotations WithTypeAndModifiers(TypeSymbol typeSymbol, ImmutableArray<CustomModifier> customModifiers) => 570public TypeWithAnnotations WithType(TypeSymbol typeSymbol) => 591TypeSymbol typeOpt) 593var type = TypeSymbolExtensions.VisitType( 606private static bool IsNonGenericValueType(TypeSymbol type) 629var type = typeWithAnnotations.Type; 665TypeSymbol oldTypeSymbol = Type; 687TypeSymbol newTypeSymbol; 726var typeSymbol = Type; 737var typeSymbol = Type; 738var newTypeSymbol = typeSymbol.SetUnknownNullabilityForReferenceTypes(); 813static NullableFlowState getFlowState(TypeSymbol type, NullableAnnotation annotation) 852internal abstract TypeSymbol GetResolvedType(TypeSymbol defaultType); 861internal abstract TypeSymbol GetNullableUnderlyingTypeOrSelf(TypeSymbol typeSymbol); 863internal abstract TypeSymbol AsTypeSymbolOnly(TypeSymbol typeSymbol); 865internal abstract SpecialType GetSpecialType(TypeSymbol typeSymbol); 866internal abstract bool IsRestrictedType(TypeSymbol typeSymbol, bool ignoreSpanLikeTypes); 867internal abstract bool IsStatic(TypeSymbol typeSymbol); 868internal abstract bool IsVoid(TypeSymbol typeSymbol); 869internal abstract bool IsSZArray(TypeSymbol typeSymbol); 870internal abstract bool IsRefLikeType(TypeSymbol typeSymbol); 871internal abstract bool IsRefLikeOrAllowsRefLikeType(TypeSymbol typeSymbol); 873internal abstract TypeWithAnnotations WithTypeAndModifiers(TypeWithAnnotations type, TypeSymbol typeSymbol, ImmutableArray<CustomModifier> customModifiers); 893internal override TypeSymbol GetResolvedType(TypeSymbol defaultType) => defaultType; 897internal override SpecialType GetSpecialType(TypeSymbol typeSymbol) => typeSymbol.SpecialType; 898internal override bool IsRestrictedType(TypeSymbol typeSymbol, bool ignoreSpanLikeTypes) => typeSymbol.IsRestrictedType(ignoreSpanLikeTypes); 899internal override bool IsStatic(TypeSymbol typeSymbol) => typeSymbol.IsStatic; 900internal override bool IsVoid(TypeSymbol typeSymbol) => typeSymbol.IsVoidType(); 901internal override bool IsSZArray(TypeSymbol typeSymbol) => typeSymbol.IsSZArray(); 902internal override bool IsRefLikeType(TypeSymbol typeSymbol) => typeSymbol.IsRefLikeType; 903internal override bool IsRefLikeOrAllowsRefLikeType(TypeSymbol typeSymbol) => typeSymbol.IsRefLikeOrAllowsRefLikeType(); 905internal override TypeSymbol GetNullableUnderlyingTypeOrSelf(TypeSymbol typeSymbol) => typeSymbol.StrippedType(); 912internal override TypeSymbol AsTypeSymbolOnly(TypeSymbol typeSymbol) => typeSymbol; 914internal override TypeWithAnnotations WithTypeAndModifiers(TypeWithAnnotations type, TypeSymbol typeSymbol, ImmutableArray<CustomModifier> customModifiers) 926var defaultType = type.DefaultType; 970internal override SpecialType GetSpecialType(TypeSymbol typeSymbol) => typeSymbol.SpecialType; 971internal override bool IsRestrictedType(TypeSymbol typeSymbol, bool ignoreSpanLikeTypes) => typeSymbol.IsRestrictedType(ignoreSpanLikeTypes); 972internal override bool IsStatic(TypeSymbol typeSymbol) => typeSymbol.IsStatic; 973internal override bool IsVoid(TypeSymbol typeSymbol) => typeSymbol.IsVoidType(); 974internal override bool IsSZArray(TypeSymbol typeSymbol) => typeSymbol.IsSZArray(); 975internal override bool IsRefLikeType(TypeSymbol typeSymbol) => typeSymbol.IsRefLikeType; 976internal override bool IsRefLikeOrAllowsRefLikeType(TypeSymbol typeSymbol) => typeSymbol.IsRefLikeOrAllowsRefLikeType(); 1006internal override TypeSymbol GetNullableUnderlyingTypeOrSelf(TypeSymbol typeSymbol) => typeSymbol.StrippedType(); 1007internal override TypeSymbol AsTypeSymbolOnly(TypeSymbol typeSymbol) => typeSymbol; 1009internal override TypeSymbol GetResolvedType(TypeSymbol defaultType) => defaultType; 1017internal override TypeWithAnnotations WithTypeAndModifiers(TypeWithAnnotations type, TypeSymbol typeSymbol, ImmutableArray<CustomModifier> customModifiers) 1029var defaultType = type.DefaultType; 1063private TypeSymbol _resolved; 1074internal override bool IsVoid(TypeSymbol typeSymbol) => false; 1075internal override bool IsSZArray(TypeSymbol typeSymbol) => false; 1076internal override bool IsRefLikeType(TypeSymbol typeSymbol) => false; 1077internal override bool IsRefLikeOrAllowsRefLikeType(TypeSymbol typeSymbol) => typeSymbol.IsRefLikeOrAllowsRefLikeType(); 1078internal override bool IsStatic(TypeSymbol typeSymbol) => false; 1080private TypeSymbol GetResolvedType() 1090internal override TypeSymbol GetNullableUnderlyingTypeOrSelf(TypeSymbol typeSymbol) => _underlying.Type; 1092internal override SpecialType GetSpecialType(TypeSymbol typeSymbol) 1098internal override bool IsRestrictedType(TypeSymbol typeSymbol, bool ignoreSpanLikeTypes) => _underlying.IsRestrictedType(ignoreSpanLikeTypes); 1100internal override TypeSymbol AsTypeSymbolOnly(TypeSymbol typeSymbol) 1102var resolvedType = GetResolvedType(); 1108internal override TypeSymbol GetResolvedType(TypeSymbol defaultType) => GetResolvedType(); 1119var resolvedType = GetResolvedType(); 1128internal override TypeWithAnnotations WithTypeAndModifiers(TypeWithAnnotations type, TypeSymbol typeSymbol, ImmutableArray<CustomModifier> customModifiers)
Symbols\TypeWithState.cs (5)
16public readonly TypeSymbol? Type; 23public static TypeWithState ForType(TypeSymbol? type) 28public static TypeWithState Create(TypeSymbol? type, NullableFlowState defaultState) 42var type = typeWithAnnotations.Type; 69private TypeWithState(TypeSymbol? type, NullableFlowState state)
Symbols\UnboundGenericType.cs (1)
105internal override bool Equals(TypeSymbol t2, TypeCompareKind comparison)
Symbols\VarianceSafety.cs (3)
292TypeSymbol type, 389TypeSymbol typeArg = namedType.TypeArgumentsWithAnnotationsNoUseSiteDiagnostics[i].Type; 475if (!(context is TypeSymbol) && context.IsStatic && !context.IsAbstract && !context.IsVirtual)
Utilities\TypeSymbolExtensions.cs (9)
21public static int CustomModifierCount(this TypeSymbol type) 87public static bool HasCustomModifiers(this TypeSymbol type, bool flagNonDefaultArraySizesOrLowerBounds) 165public static bool CanUnifyWith(this TypeSymbol thisType, TypeSymbol otherType) 179internal static TypeSymbol GetNextBaseTypeNoUseSiteDiagnostics(this TypeSymbol type, ConsList<TypeSymbol> basesBeingResolved, CSharpCompilation compilation, ref PooledHashSet<NamedTypeSymbol> visited) 210private static TypeSymbol GetNextDeclaredBase(NamedTypeSymbol type, ConsList<TypeSymbol> basesBeingResolved, CSharpCompilation compilation, ref PooledHashSet<NamedTypeSymbol> visited)
Utilities\ValueSetFactory.cs (1)
56public static IValueSetFactory? ForType(TypeSymbol type)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (9)
CodeGen\CodeGenTupleTest.cs (6)
12002var m4TupleRestTuple = ((FieldSymbol)m4Tuple.GetMembers("Rest").Single()).Type; 12231var m5TupleRestTuple = ((FieldSymbol)m5Tuple.GetMembers("Rest").Single()).Type; 12273var m5TupleRestTupleRestTuple = ((FieldSymbol)m5TupleRestTuple.GetMembers("Rest").Single()).Type; 12620var m8TupleRestTuple = ((FieldSymbol)m8Tuple.GetMembers("Rest").Single()).Type; 28587var tuple = m.ReturnType; 28619var tuple = m.ReturnType;
CodeGen\WinMdDelegateTests.cs (1)
225var fieldType = field.Type;
Emit\EmitMetadataTests.cs (2)
2086var invokeReturn = invoke.ReturnType; 2088var endInvokeReturn = endInvoke.ReturnType;
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
Semantics\DynamicTests.cs (1)
2158var erasedType = eraser.EraseDynamic(f.Type);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (35)
Compilation\SemanticModelAPITests.cs (1)
470var s = v.Type;
SymbolDisplay\SymbolDisplayTests.cs (1)
3149var hostTypeSymbol = comp.GetHostObjectTypeSymbol();
Symbols\ConversionTests.cs (12)
232var f1Type = ((FieldSymbol)(classX.ChildSymbol("f1"))).Type; 233var f2Type = ((FieldSymbol)(classX.ChildSymbol("f2"))).Type; 234var f3Type = ((FieldSymbol)(classX.ChildSymbol("f3"))).Type; 235var f4Type = ((FieldSymbol)(classX.ChildSymbol("f4"))).Type; 236var f5Type = ((FieldSymbol)(classX.ChildSymbol("f5"))).Type; 237var f6Type = ((FieldSymbol)(classX.ChildSymbol("f6"))).Type; 238var f7Type = ((FieldSymbol)(classX.ChildSymbol("f7"))).Type; 239var f8Type = ((FieldSymbol)(classX.ChildSymbol("f8"))).Type; 240var f9Type = ((FieldSymbol)(classX.ChildSymbol("f9"))).Type; 241var f10Type = ((FieldSymbol)(classX.ChildSymbol("f10"))).Type; 242var g1Type = ((FieldSymbol)(classI.ChildSymbol("g1"))).Type; 243var g2Type = ((FieldSymbol)(classI.ChildSymbol("g2"))).Type;
Symbols\SymbolErrorTests.cs (2)
16919var fieldType = fieldSym.Type; 16956var fieldType = fieldSym.Type;
Symbols\TypeTests.cs (19)
42var arr = x.Type; 68var xtype1 = (b1.GetMembers("X")[0] as FieldSymbol).Type; // Types using them are the same too 69var xtype2 = (b2.GetMembers("X")[0] as FieldSymbol).Type; 487var elemType2 = (field1 as FieldSymbol).Type; 497var retType = (method as MethodSymbol).ReturnType; 543var sym1 = (classTest.GetMembers("AryField").First() as FieldSymbol).Type; 572var sym2 = (classTest.GetMembers("AryField2").First() as FieldSymbol).Type; 591var sym1 = (classTest.GetMembers().First() as FieldSymbol).Type; 597var sym2 = (classTest.GetMembers("AryField2").First() as FieldSymbol).Type; 603var sym3 = (classTest.GetMembers("AryField3").First() as FieldSymbol).Type; 626var f1 = (m as FieldSymbol).Type; 643var objType = (obj as FieldSymbol).Type; 651var dynType = (obj as FieldSymbol).Type; 1507var memType = (mem as FieldSymbol).Type; 1616var deleType = (mem as EventSymbol).Type; 1805var Dynamic = (Goo.GetMembers("X")[0] as FieldSymbol).Type; 1806var Object = (Goo.GetMembers("Y")[0] as FieldSymbol).Type; 1807var Func_Dynamic = (Goo.GetMembers("Z")[0] as FieldSymbol).Type; 1808var Func_Object = (Goo.GetMembers("W")[0] as FieldSymbol).Type;
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
UsesIsNullableVisitor.cs (1)
157var typeSymbol = type.Type;
Microsoft.CodeAnalysis.CSharp.WinRT.UnitTests (1)
Metadata\WinMdEventTests.cs (1)
3606var eventType = @event.Type;