7 types derived from TypeSymbol
Microsoft.CodeAnalysis.CSharp (7)
Symbols\ArrayTypeSymbol.cs (1)
20internal abstract partial class ArrayTypeSymbol : TypeSymbol, IArrayTypeSymbolInternal
Symbols\DynamicTypeSymbol.cs (1)
14internal sealed partial class DynamicTypeSymbol : TypeSymbol
Symbols\FunctionPointers\FunctionPointerTypeSymbol.cs (1)
16internal 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)
18internal sealed partial class PointerTypeSymbol : TypeSymbol
Symbols\TypeParameterSymbol.cs (1)
20internal abstract partial class TypeParameterSymbol : TypeSymbol, ITypeParameterSymbolInternal
4710 references to TypeSymbol
Microsoft.CodeAnalysis.CSharp (4663)
Binder\Binder.cs (4)
783TypeSymbol? throughTypeOpt = null) 791TypeSymbol throughTypeOpt, 794ConsList<TypeSymbol>? basesBeingResolved = null) 864TypeSymbol 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)
963TypeSymbol.Equals( 1420? TypeSymbol.Equals(fieldSymbol.ContainingType, containing.ContainingType, TypeCompareKind.AllIgnoreOptions) 1422: TypeSymbol.Equals(fieldSymbol.ContainingType.OriginalDefinition, containing.ContainingType.OriginalDefinition, TypeCompareKind.AllIgnoreOptions))) 1753var accessThroughType = this.GetAccessThroughType(receiver); 1802var accessThroughType = this.GetAccessThroughType(receiver); 5501private 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 (72)
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, 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); 1076internal BoundExpression BindCollectionExpressionConstructor(SyntaxNode syntax, TypeSymbol targetType, MethodSymbol? constructor, BindingDiagnosticBag diagnostics) 1106internal bool HasCollectionExpressionApplicableConstructor(SyntaxNode syntax, TypeSymbol targetType, out MethodSymbol? constructor, out bool isExpanded, BindingDiagnosticBag diagnostics, bool isParamsModifierValidation = false) 1238internal bool HasCollectionExpressionApplicableAddMethod(SyntaxNode syntax, TypeSymbol targetType, out ImmutableArray<MethodSymbol> addMethods, BindingDiagnosticBag diagnostics) 1466TypeSymbol? receiverType = methodGroup.ReceiverOpt.Type; 1503TypeSymbol secondArgumentType = (constructed ?? member).Parameters[1].Type; 1690internal bool TryGetCollectionIterationType(SyntaxNode syntax, TypeSymbol collectionType, out TypeWithAnnotations iterationType) 1713TypeSymbol targetType, 1744TypeSymbol targetType, 1773var elementType = elementTypeWithAnnotations.Type; 1834TypeSymbol elementTypeOriginalDefinition, 1835TypeSymbol? builderType, 1894var spanTypeArg = ((NamedTypeSymbol)methodWithTargetTypeParameters.Parameters[0].Type).TypeArgumentsWithAnnotationsNoUseSiteDiagnostics[0].Type; 1925TypeSymbol destination, 1966private BoundExpression ConvertSwitchExpression(BoundUnconvertedSwitchExpression source, TypeSymbol destination, Conversion? conversionIfTargetTyped, BindingDiagnosticBag diagnostics, bool hasErrors = false) 1999TypeSymbol destination, 2065TypeSymbol conversionParameterType = conversion.BestUserDefinedConversionAnalysis.Operator.GetParameterType(0); 2069!TypeSymbol.Equals(conversion.BestUserDefinedConversionAnalysis.FromType, conversionParameterType, TypeCompareKind.ConsiderEverything2)) 2085TypeSymbol conversionReturnType = conversion.BestUserDefinedConversionAnalysis.Operator.ReturnType; 2086TypeSymbol conversionToType = conversion.BestUserDefinedConversionAnalysis.ToType; 2090!TypeSymbol.Equals(conversionToType, conversionReturnType, TypeCompareKind.ConsiderEverything2)) 2105if (conversionToType.IsNullableType() && TypeSymbol.Equals(conversionToType.GetNullableUnderlyingType(), conversionReturnType, TypeCompareKind.ConsiderEverything2)) 2164private BoundExpression CreateFunctionTypeConversion(SyntaxNode syntax, BoundExpression source, Conversion conversion, bool isCast, ConversionGroup? conversionGroup, TypeSymbol destination, BindingDiagnosticBag diagnostics) 2212private BoundExpression CreateAnonymousFunctionConversion(SyntaxNode syntax, BoundExpression source, Conversion conversion, bool isCast, ConversionGroup? conversionGroup, TypeSymbol destination, BindingDiagnosticBag diagnostics) 2239private BoundExpression CreateMethodGroupConversion(SyntaxNode syntax, BoundExpression source, Conversion conversion, bool isCast, ConversionGroup? conversionGroup, TypeSymbol destination, BindingDiagnosticBag diagnostics) 2261private static void CheckParameterModifierMismatchMethodConversion(SyntaxNode syntax, MethodSymbol lambdaOrMethod, TypeSymbol targetType, bool invokedAsExtensionMethod, BindingDiagnosticBag diagnostics) 2309private static void CheckLambdaConversion(LambdaSymbol lambdaSymbol, TypeSymbol targetType, BindingDiagnosticBag diagnostics) 2397private BoundExpression CreateStackAllocConversion(SyntaxNode syntax, BoundExpression source, Conversion conversion, bool isCast, ConversionGroup? conversionGroup, TypeSymbol destination, BindingDiagnosticBag diagnostics) 2403TypeSymbol stackAllocType; 2425private BoundExpression CreateTupleLiteralConversion(SyntaxNode syntax, BoundTupleLiteral sourceTuple, Conversion conversion, bool isCast, ConversionGroup? conversionGroup, TypeSymbol destination, BindingDiagnosticBag diagnostics) 2431var destinationWithoutNullable = destination; 2501if (!TypeSymbol.Equals(sourceTuple.Type, destination, TypeCompareKind.ConsiderEverything2)) 2809internal bool MethodIsCompatibleWithDelegateOrFunctionPointer(BoundExpression? receiverOpt, bool isExtensionMethod, MethodSymbol method, TypeSymbol delegateType, Location errorLocation, BindingDiagnosticBag diagnostics) 2887var methodReturnType = method.ReturnType; 2888var delegateReturnType = delegateOrFuncPtrMethod.ReturnType; 2934static bool hasConversion(TypeKind targetKind, Conversions conversions, TypeSymbol source, TypeSymbol destination, 2993TypeSymbol delegateOrFuncPtrType, 3088TypeSymbol destination, 3189TypeSymbol destination,
Binder\Binder_Crefs.cs (7)
299TypeSymbol returnType = BindCrefParameterOrReturnType(syntax.Type, syntax, diagnostics); 303symbol.Kind != SymbolKind.Method || TypeSymbol.Equals(((MethodSymbol)symbol).ReturnType, returnType, TypeCompareKind.ConsiderEverything2), returnType); 421if (containerType.Name == memberName && (hasParameterList || containerType.Arity == 0 || !TypeSymbol.Equals(this.ContainingType, containerType.OriginalDefinition, TypeCompareKind.ConsiderEverything2))) 552private static bool ContainsNestedTypeOfUnconstructedGenericType(TypeSymbol type) 943TypeSymbol type = BindCrefParameterOrReturnType(parameter.Type, (MemberCrefSyntax)parameterListSyntax.Parent, diagnostics); 954private TypeSymbol BindCrefParameterOrReturnType(TypeSyntax typeSyntax, MemberCrefSyntax memberCrefSyntax, BindingDiagnosticBag diagnostics) 974TypeSymbol 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; 855var type = declTypeWithAnnotations.Type; 948Debug.Assert(TypeSymbol.Equals(declTypeWithAnnotations.Type, fieldType.Type, TypeCompareKind.ConsiderEverything2));
Binder\Binder_Expressions.cs (116)
199TypeSymbol resultType = expr.Type; 264internal BoundExpression BindToTypeForErrorRecovery(BoundExpression expression, TypeSymbol type = null) 292var commonType = expr.Type; 306TypeSymbol type = op.Type; 467TypeSymbol varType, 563TypeSymbol exprType = expr.Type; 843internal virtual BoundSwitchExpressionArm BindSwitchExpressionArm(SwitchExpressionArmSyntax node, TypeSymbol switchGoverningType, BindingDiagnosticBag diagnostics) 1220TypeSymbol typedReferenceType = this.Compilation.GetSpecialType(SpecialType.System_TypedReference); 1244TypeSymbol typedReferenceType = GetSpecialType(SpecialType.System_TypedReference, diagnostics, node); 1268TypeSymbol typedReferenceType = this.Compilation.GetSpecialType(SpecialType.System_TypedReference); 1269TypeSymbol typeType = this.GetWellKnownType(WellKnownType.System_Type, diagnostics, node); 1310TypeSymbol runtimeArgumentHandleType = GetSpecialType(SpecialType.System_RuntimeArgumentHandle, diagnostics, node); 1374TypeSymbol type = typeWithAnnotations.Type; 1402var type = typeWithAnnotations.Type; 1427TypeSymbol type = typeWithAnnotations.Type; 1492internal static bool CheckManagedAddr(CSharpCompilation compilation, TypeSymbol type, Location location, BindingDiagnosticBag diagnostics, bool errorForManaged = false) 1502internal static bool CheckManagedAddr(CSharpCompilation compilation, TypeSymbol type, ManagedKind managedKind, Location location, BindingDiagnosticBag diagnostics, bool errorForManaged = false) 1526internal static ConstantValue GetConstantSizeOf(TypeSymbol type) 1537TypeSymbol type = typeWithAnnotations.Type; 1933private bool IsBadLocalOrParameterCapture(Symbol symbol, TypeSymbol type, RefKind refKind) 1963TypeSymbol type; 2163return new BoundTypeExpression(node, null, (TypeSymbol)symbol, hasErrors: isError); 2191TypeSymbol typeSymbol => new BoundTypeExpression(node, alias, typeSymbol, hasErrors: isError), 2333TypeSymbol hostObjectType = Compilation.GetHostObjectTypeSymbol(); 2438var type = symbol as TypeSymbol; 2509TypeSymbol baseType = this.ContainingType is null ? null : this.ContainingType.BaseTypeNoUseSiteDiagnostics; 2541TypeSymbol targetType = targetTypeWithAnnotations.Type; 2547!TypeSymbol.Equals(targetType.GetNullableUnderlyingType(), operand.Type, TypeCompareKind.ConsiderEverything2)) 2565TypeSymbol intType = GetSpecialType(SpecialType.System_Int32, diagnostics, node); 2566TypeSymbol indexType = GetWellKnownType(WellKnownType.System_Index, diagnostics, node); 2602TypeSymbol rangeType = GetWellKnownType(WellKnownType.System_Range, diagnostics, node); 2673TypeSymbol indexType = GetWellKnownType(WellKnownType.System_Index, diagnostics, operand); 2703TypeSymbol targetType = targetTypeWithAnnotations.Type; 2724TypeSymbol targetType) 2861var targetElementType = targetElementTypesWithAnnotations[i].Type; 3133var type = declType.Type; 3231TypeSymbol fieldType = expressionVariableField.GetFieldType(this.FieldsBeingBound).Type; 3245internal static void CheckRestrictedTypeInAsyncMethod(Symbol containingSymbol, TypeSymbol type, BindingDiagnosticBag diagnostics, SyntaxNode syntax) 3685TypeSymbol handlerType, 3802TypeSymbol placeholderType; 4071TypeSymbol bestType = BestTypeInferrer.InferBestType(boundInitializerExpressions, this.Conversions, ref useSiteInfo, out _); 4098TypeSymbol bestType = BestTypeInferrer.InferBestType(boundInitializerExpressions, this.Conversions, ref useSiteInfo, out _); 4226TypeSymbol elemType = type.ElementType; 4464TypeSymbol type = GetStackAllocType(node, elementType, diagnostics, out bool hasErrors); 4547private TypeSymbol GetStackAllocType(SyntaxNode node, TypeWithAnnotations elementTypeWithAnnotations, BindingDiagnosticBag diagnostics, out bool hasErrors) 4607TypeSymbol type, 4608TypeSymbol elementType, 4787TypeSymbol constructorReturnType = constructor.ReturnType; 4912TypeSymbol constructorReturnType, 5143var type = typeWithAnnotations.Type; 5144var originalType = type; 5247var collectionType = enumeratorInfo.CollectionType; 5459private BoundExpression BindClassCreationExpression(ObjectCreationExpressionSyntax node, NamedTypeSymbol type, string typeName, BindingDiagnosticBag diagnostics, TypeSymbol initializerType = null) 5532private BoundExpression MakeBadExpressionForObjectCreation(ObjectCreationExpressionSyntax node, TypeSymbol type, AnalyzedArguments analyzedArguments, BindingDiagnosticBag diagnostics, bool wasCompilerGenerated = false) 5538private BoundExpression MakeBadExpressionForObjectCreation(SyntaxNode node, TypeSymbol type, AnalyzedArguments analyzedArguments, InitializerExpressionSyntax? initializerOpt, SyntaxNode? typeSyntax, BindingDiagnosticBag diagnostics, bool wasCompilerGenerated = false) 5558TypeSymbol type, 5590TypeSymbol type, 5612TypeSymbol initializerType, 5782var initializerType = implicitReceiver.Type; 6185TypeSymbol initializerType, 6239private bool CollectionInitializerTypeImplementsIEnumerable(TypeSymbol initializerType, CSharpSyntaxNode node, BindingDiagnosticBag diagnostics) 6277TypeSymbol initializerType, 6621TypeSymbol initializerTypeOpt = null, 6716TypeSymbol initializerTypeOpt, 6801TypeSymbol initializerTypeOpt, 6855private BoundObjectInitializerExpressionBase MakeBoundInitializerOpt(SyntaxNode typeNode, NamedTypeSymbol type, InitializerExpressionSyntax initializerSyntaxOpt, TypeSymbol initializerTypeOpt, BindingDiagnosticBag diagnostics) 6908Debug.Assert(TypeSymbol.Equals(interfaceType.ComImportCoClass, coClassType, TypeCompareKind.ConsiderEverything2)); 7308TypeSymbol type = null; 7394TypeSymbol pointedAtType; 7471var leftType = boundValue.Type; 7479if (TypeSymbol.Equals(boundType.Type, leftType, TypeCompareKind.AllIgnoreOptions)) 7506private bool IsPotentialColorColorReceiver(IdentifierNameSyntax id, TypeSymbol type) 7511TypeSymbol.Equals(BindNamespaceOrType(id, BindingDiagnosticBag.Discarded).Type, type, TypeCompareKind.AllIgnoreOptions); 7615TypeSymbol leftType = boundLeft.Type; 7830TypeSymbol leftType, 7937var leftType = boundLeft.Type; 8004private void LookupInstanceMember(LookupResult lookupResult, TypeSymbol leftType, bool leftIsBaseReference, string rightName, int rightArity, bool invoked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 8079private bool WouldUsingSystemFindExtension(TypeSymbol receiver, string methodName) 8091private bool ImplementsWinRTAsyncInterface(TypeSymbol type) 8096private bool IsWinRTAsyncInterface(TypeSymbol type) 8105TypeSymbol.Equals(namedType, Compilation.GetWellKnownType(WellKnownType.Windows_Foundation_IAsyncAction), TypeCompareKind.ConsiderEverything2) || 8106TypeSymbol.Equals(namedType, Compilation.GetWellKnownType(WellKnownType.Windows_Foundation_IAsyncActionWithProgress_T), TypeCompareKind.ConsiderEverything2) || 8107TypeSymbol.Equals(namedType, Compilation.GetWellKnownType(WellKnownType.Windows_Foundation_IAsyncOperation_T), TypeCompareKind.ConsiderEverything2) || 8108TypeSymbol.Equals(namedType, Compilation.GetWellKnownType(WellKnownType.Windows_Foundation_IAsyncOperationWithProgress_T2), TypeCompareKind.ConsiderEverything2); 8167private TypeSymbol GetNonMethodMemberType(Symbol symbolOpt) 8169TypeSymbol resultType = null; 8347TypeSymbol returnType, 8549TypeSymbol receiverType = receiver.Type; 8617TypeSymbol fieldType = fieldSymbol.GetFieldType(this.FieldsBeingBound).Type; 8700Debug.Assert(symbol is not TypeSymbol); 8748return !symbol.IsStatic && !(symbol is TypeSymbol) && 9030if (!TypeSymbol.IsInlineArrayElementFieldSupported(elementField)) 9055{ Code: (int)ErrorCode.ERR_BadIndexLHS, Arguments: [TypeSymbol type] } && type.Equals(expr.Type, TypeCompareKind.ConsiderEverything)) 9192TypeSymbol resultType; 9233if (TypeSymbol.Equals(convertedIndex.Type, compilation.GetWellKnownType(WellKnownType.System_Index), TypeCompareKind.AllIgnoreOptions)) 9284var exprType = expr.Type; 9365TypeSymbol resultType = indexOrRangeWellknownType == WellKnownType.System_Range 9461TypeSymbol type = GetWellKnownType(wellKnownType, ref useSiteInfo); 9483TypeSymbol type = GetSpecialType(specialType, attemptDiagnostics, node); 9496private BoundExpression TryImplicitConversionToArrayIndex(BoundExpression expr, TypeSymbol targetType, SyntaxNode node, BindingDiagnosticBag diagnostics) 9540TypeSymbol pointedAtType = pointerType.PointedAtType; 9908TypeSymbol.Equals(argType, Compilation.GetWellKnownType(WellKnownType.System_Index), TypeCompareKind.ConsiderEverything) ? ThreeState.True : 9909TypeSymbol.Equals(argType, Compilation.GetWellKnownType(WellKnownType.System_Range), TypeCompareKind.ConsiderEverything) ? ThreeState.False : 10168TypeSymbol receiverType, 10219TypeSymbol propertyType = GetCommonTypeOrReturnType(propertyGroup) ?? CreateErrorType(); 10245TypeSymbol returnType = null, 10266TypeSymbol returnType = null, 10291TypeSymbol returnType, 10314TypeSymbol returnType = null, 10384TypeSymbol returnType = null, 10904internal static bool ReportDelegateInvokeUseSiteDiagnostic(BindingDiagnosticBag diagnostics, TypeSymbol possibleDelegateType, 10956var receiverType = receiver.Type; 10965var accessType = access.Type; 11096var receiverType = receiver.Type; 11127var 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); 1050if (call.ReceiverOpt.Type.IsRestrictedType() && !call.Method.ContainingType.IsInterface && !TypeSymbol.Equals(call.Method.ContainingType, call.ReceiverOpt.Type, TypeCompareKind.ConsiderEverything2)) 1185var returnType = methodResult.Member.ReturnType; 1365var parameterType = parameter.Type; 1599TypeSymbol parameterType = parameter.Type; 1669TypeSymbol constantType = Compilation.GetSpecialType(defaultConstantValue.SpecialType); 1719TypeSymbol collectionType = paramsParameter.Type; 1724TypeSymbol int32Type = GetSpecialType(SpecialType.System_Int32, diagnostics, node); 1789TypeSymbol.Equals(containingMethod.ContainingType, method.ContainingType, TypeCompareKind.ConsiderEverything) && 1942var returnType = GetCommonTypeOrReturnType(methods) ?? new ExtendedErrorTypeSymbol(this.Compilation, string.Empty, arity: 0, errorInfo: null); 1943var methodContainer = (object)receiver != null && (object)receiver.Type != null 2037var parameterType = GetCorrespondingParameterType(analyzedArguments, i, parameterList); 2059var candidateType = getCorrespondingParameterType(i); 2106TypeSymbol getCorrespondingParameterType(int i) 2109TypeSymbol candidateType = null; 2112var parameterType = GetCorrespondingParameterType(analyzedArguments, i, parameterList); 2140private static TypeSymbol GetCorrespondingParameterType(AnalyzedArguments analyzedArguments, int i, ImmutableArray<ParameterSymbol> parameterList) 2172TypeSymbol returnType = new ExtendedErrorTypeSymbol(this.Compilation, string.Empty, arity: 0, errorInfo: null); 2173var methodContainer = expr.Type ?? this.ContainingType; 2184private static TypeSymbol GetCommonTypeOrReturnType<TMember>(ImmutableArray<TMember> members) 2187TypeSymbol type = null; 2190TypeSymbol returnType = members[i].GetTypeOrReturnType().Type; 2195else if (!TypeSymbol.Equals(type, returnType, TypeCompareKind.ConsiderEverything2))
Binder\Binder_Lambda.cs (1)
292var type = returnType.Type;
Binder\Binder_Lookup.cs (80)
32ConsList<TypeSymbol> basesBeingResolved, 61private Binder LookupSymbolsWithFallback(LookupResult result, string name, int arity, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, ConsList<TypeSymbol> basesBeingResolved = null, LookupOptions options = LookupOptions.Default) 82LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 116LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 130ConsList<TypeSymbol> basesBeingResolved, 148private void LookupMembersWithFallback(LookupResult result, NamespaceOrTypeSymbol nsOrType, string name, int arity, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, ConsList<TypeSymbol> basesBeingResolved = null, LookupOptions options = LookupOptions.Default) 164protected void LookupMembersInternal(LookupResult result, NamespaceOrTypeSymbol nsOrType, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 175this.LookupMembersInType(result, (TypeSymbol)nsOrType, name, arity, basesBeingResolved, options, originalBinder, diagnose, ref useSiteInfo); 180protected void LookupMembersInType(LookupResult result, TypeSymbol type, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 220private void LookupMembersInErrorType(LookupResult result, ErrorTypeSymbol errorType, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 229TypeSymbol candidateType = errorType.CandidateSymbols.First() as TypeSymbol; 255protected void LookupMembersInSubmissions(LookupResult result, TypeSymbol submissionClass, CompilationUnitSyntax declarationSyntax, bool inUsings, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, 404ConsList<TypeSymbol> basesBeingResolved, 492ConsList<TypeSymbol> basesBeingResolved, 763protected static void LookupMembersWithoutInheritance(LookupResult result, TypeSymbol type, string name, int arity, 764LookupOptions options, Binder originalBinder, TypeSymbol accessThroughType, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, ConsList<TypeSymbol> basesBeingResolved) 780TypeSymbol type, 783ConsList<TypeSymbol> basesBeingResolved, 795TypeSymbol type, 798ConsList<TypeSymbol> basesBeingResolved, 801TypeSymbol accessThroughType, 808TypeSymbol currentType = type; 976TypeSymbol.Equals(iFaceOriginal, idictSymbol, TypeCompareKind.ConsiderEverything2) || 979TypeSymbol.Equals(iFaceOriginal, iroDictSymbol, TypeCompareKind.ConsiderEverything2) || 981TypeSymbol.Equals(iFaceOriginal, iListSymbol, TypeCompareKind.ConsiderEverything2) || 982TypeSymbol.Equals(iFaceOriginal, iCollectionSymbol, TypeCompareKind.ConsiderEverything2) || 983TypeSymbol.Equals(iFaceOriginal, inccSymbol, TypeCompareKind.ConsiderEverything2) || 984TypeSymbol.Equals(iFaceOriginal, inpcSymbol, TypeCompareKind.ConsiderEverything2); 988private static Symbol GetNearestOtherSymbol(ConsList<TypeSymbol> list, TypeSymbol type) 990TypeSymbol other = type; 992for (; list != null && list != ConsList<TypeSymbol>.Empty; list = list.Tail) 994if (TypeSymbol.Equals(list.Head, type.OriginalDefinition, TypeCompareKind.ConsiderEverything2)) 996if (TypeSymbol.Equals(other, type, TypeCompareKind.ConsiderEverything2) && list.Tail != null && list.Tail != ConsList<TypeSymbol>.Empty) 1017ConsList<TypeSymbol> basesBeingResolved, 1020TypeSymbol accessThroughType, 1029((options & LookupOptions.NamespacesOrTypesOnly) == 0 || !(current.IsSingleViable && TypeSymbol.Equals(current.SingleSymbolOrDefault.ContainingType, type, TypeCompareKind.AllIgnoreOptions)))) // The nested type will shadow everything from bases 1036private static ImmutableArray<NamedTypeSymbol> GetBaseInterfaces(NamedTypeSymbol type, ConsList<TypeSymbol> basesBeingResolved, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1089static void addAllInterfaces(NamedTypeSymbol @interface, HashSet<NamedTypeSymbol> visited, ArrayBuilder<NamedTypeSymbol> result, ConsList<TypeSymbol> basesBeingResolved, ConsList<NamedTypeSymbol> cycleGuard) 1120ConsList<TypeSymbol> basesBeingResolved, 1123TypeSymbol accessThroughType, 1150private void LookupMembersInInterface(LookupResult current, NamedTypeSymbol type, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1168private void LookupMembersInTypeParameter(LookupResult current, TypeParameterSymbol typeParameter, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1187private static bool IsDerivedType(NamedTypeSymbol baseType, NamedTypeSymbol derivedType, ConsList<TypeSymbol> basesBeingResolved, CSharpCompilation compilation, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1189Debug.Assert(!TypeSymbol.Equals(baseType, derivedType, TypeCompareKind.ConsiderEverything2)); 1195if (TypeSymbol.Equals(b, baseType, TypeCompareKind.ConsiderEverything2)) return true; 1208if (TypeSymbol.Equals(b, baseType, TypeCompareKind.ConsiderEverything2)) 1224private void MergeHidingLookupResults(LookupResult resultHiding, LookupResult resultHidden, ConsList<TypeSymbol> basesBeingResolved, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1295if ((options & LookupOptions.NamespacesOrTypesOnly) != 0 && nsOrType is TypeSymbol) 1319if ((options & LookupOptions.NamespacesOrTypesOnly) != 0 && nsOrType is TypeSymbol) 1385internal SingleLookupResult CheckViability(Symbol symbol, int arity, LookupOptions options, TypeSymbol accessThroughType, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, ConsList<TypeSymbol> basesBeingResolved = null) 1412(unwrappedSymbol is not TypeSymbol && IsInstance(unwrappedSymbol) || !(unwrappedSymbol.IsAbstract || unwrappedSymbol.IsVirtual))) 1579internal bool CanAddLookupSymbolInfo(Symbol symbol, LookupOptions options, LookupSymbolsInfo info, TypeSymbol accessThroughType, AliasSymbol aliasSymbol = null) 1631private static TypeSymbol RefineAccessThroughType(LookupOptions options, TypeSymbol accessThroughType) 1667internal bool IsAccessible(Symbol symbol, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, TypeSymbol accessThroughType = null, ConsList<TypeSymbol> basesBeingResolved = null) 1686internal bool IsAccessible(Symbol symbol, TypeSymbol accessThroughType, out bool failedThroughTypeCheck, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, ConsList<TypeSymbol> basesBeingResolved = null) 1698/// Should only be called by <see cref="IsAccessible(Symbol, TypeSymbol, out bool, ref CompoundUseSiteInfo{AssemblySymbol}, ConsList{TypeSymbol})"/>, 1701internal virtual bool IsAccessibleHelper(Symbol symbol, TypeSymbol accessThroughType, out bool failedThroughTypeCheck, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, ConsList<TypeSymbol> basesBeingResolved) 1728TypeSymbol type = null; 1859this.AddMemberLookupSymbolsInfoInType(result, (TypeSymbol)nsOrType, options, originalBinder); 1863private void AddMemberLookupSymbolsInfoInType(LookupSymbolsInfo result, TypeSymbol type, LookupOptions options, Binder originalBinder) 1887protected void AddMemberLookupSymbolsInfoInSubmissions(LookupSymbolsInfo result, TypeSymbol scriptClass, bool inUsings, LookupOptions options, Binder originalBinder) 1960private static void AddMemberLookupSymbolsInfoWithoutInheritance(LookupSymbolsInfo result, TypeSymbol type, LookupOptions options, Binder originalBinder, TypeSymbol accessThroughType) 1972private void AddWinRTMembersLookupSymbolsInfo(LookupSymbolsInfo result, NamedTypeSymbol type, LookupOptions options, Binder originalBinder, TypeSymbol accessThroughType) 1987private void AddMemberLookupSymbolsInfoInClass(LookupSymbolsInfo result, TypeSymbol type, LookupOptions options, Binder originalBinder, TypeSymbol accessThroughType) 2018private void AddMemberLookupSymbolsInfoInInterface(LookupSymbolsInfo result, TypeSymbol type, LookupOptions options, Binder originalBinder, TypeSymbol accessThroughType)
Binder\Binder_Operators.cs (61)
197var leftType = left.Type; 267TypeSymbol delegateType = left.Type; 286TypeSymbol type; 347TypeSymbol type = operand.Type; 521TypeSymbol leftType = left.Type; 522TypeSymbol rightType = right.Type; 630TypeSymbol resultType = signature.ReturnType; 726TypeSymbol leftType = left.Type; 727TypeSymbol rightType = right.Type; 880bool isReadOnlySpanOfByte(TypeSymbol? type) 1055var type = left.Type; 1157bool typesAreSame = TypeSymbol.Equals(signature.LeftType, signature.RightType, TypeCompareKind.ConsiderEverything2) && TypeSymbol.Equals(signature.LeftType, signature.ReturnType, TypeCompareKind.ConsiderEverything2); 1159bool typeMatchesContainer = TypeSymbol.Equals(signature.ReturnType.StrippedType(), t, TypeCompareKind.ConsiderEverything2) || 1266private bool HasApplicableBooleanOperator(NamedTypeSymbol containingType, string name, TypeSymbol argumentType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, out MethodSymbol @operator) 1290private TypeSymbol GetBinaryOperatorErrorType(BinaryOperatorKind kind, BindingDiagnosticBag diagnostics, CSharpSyntaxNode node) 1480static bool isNuint(TypeSymbol type) 1660internal static TypeSymbol GetEnumType(BinaryOperatorKind kind, BoundExpression left, BoundExpression right) 1712TypeSymbol resultTypeSymbol, 1725TypeSymbol enumType = GetEnumType(kind, left, right); 1726TypeSymbol underlyingType = enumType.GetEnumUnderlyingType()!; 1736TypeSymbol operandType = (operandSpecialType == underlyingType.SpecialType) ? 1772TypeSymbol resultType = kind == BinaryOperatorKind.EnumSubtraction ? underlyingType : enumType; 1787TypeSymbol resultTypeSymbol, 2287var operandType = operand.Type; 2380private bool CheckConstraintLanguageVersionAndRuntimeSupportForOperator(SyntaxNode node, MethodSymbol? methodOpt, bool isUnsignedRightShift, TypeSymbol? constrainedToTypeOpt, BindingDiagnosticBag diagnostics) 2467TypeSymbol pointedAtType; 2474private static void BindPointerIndirectionExpressionInternal(CSharpSyntaxNode node, BoundExpression operand, BindingDiagnosticBag diagnostics, out TypeSymbol pointedAtType, out bool hasErrors) 2531TypeSymbol operandType = operand.Type; 2553TypeSymbol pointerType = new PointerTypeSymbol(TypeWithAnnotations.Create(operandType)); 2789var resultType = signature.ReturnType; 2846TypeSymbol resultTypeSymbol, 3190private bool IsOperatorErrors(CSharpSyntaxNode node, TypeSymbol operandType, BoundTypeExpression typeExpression, BindingDiagnosticBag diagnostics) 3192var targetType = typeExpression.Type; 3219var resultType = (TypeSymbol)GetSpecialType(SpecialType.System_Boolean, diagnostics, node); 3261var targetType = typeExpression.Type; 3320var operandType = operand.Type; 3341TypeSymbol targetType = targetTypeWithAnnotations.Type; 3351TypeSymbol operandType, 3352TypeSymbol targetType, 3386TypeSymbol operandType, 3387TypeSymbol targetType, 3693TypeSymbol targetType = targetTypeWithAnnotations.Type; 3696var resultType = targetType; 3797var operandType = operand.Type; 3848TypeSymbol operandType, 3849TypeSymbol targetType, 3910TypeSymbol operandType, 3911TypeSymbol targetType, 3941internal static ConstantValue GetAsOperatorConstantResult(TypeSymbol operandType, TypeSymbol targetType, ConversionKind conversionKind, ConstantValue operandConstantValue) 4009TypeSymbol optLeftType = leftOperand.Type; // "A" 4010TypeSymbol optRightType = rightOperand.Type; // "B" 4012TypeSymbol optLeftType0 = isLeftNullable ? // "A0" 4185TypeSymbol leftType = leftOperand.Type; 4201var underlyingLeftType = leftType.GetNullableUnderlyingType(); 4304TypeSymbol? bestType = BestTypeInferrer.InferBestTypeForConditionalOperator(trueExpr, falseExpr, this.Conversions, out bool hadMultipleCandidates, ref useSiteInfo); 4344TypeSymbol trueType = trueExpr.Type; 4345TypeSymbol falseType = falseExpr.Type; 4347TypeSymbol 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; 1020TypeSymbol 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; 1512TypeSymbol type; 1773TypeSymbol.Equals(sourceProperty.ContainingType, fromMember.ContainingType, TypeCompareKind.AllIgnoreOptions) && 1804private TypeSymbol GetAccessThroughType(BoundExpression receiver) 1825TypeSymbol destinationType, 1920internal BoundExpression GenerateConversionForAssignment(TypeSymbol targetType, BoundExpression expression, BindingDiagnosticBag diagnostics, ConversionForAssignmentFlags flags = ConversionForAssignmentFlags.None) 1923internal BoundExpression GenerateConversionForAssignment(TypeSymbol targetType, BoundExpression expression, BindingDiagnosticBag diagnostics, out Conversion conversion, ConversionForAssignmentFlags flags = ConversionForAssignmentFlags.None) 2003UnboundLambda anonymousFunction, TypeSymbol targetType) 2177var lambdaParameterType = anonymousFunction.ParameterType(i); 2185var delegateParameterType = delegateParameters[i].Type; 2232Conversion conversion, TypeSymbol sourceType, TypeSymbol targetType, ConstantValue sourceConstantValueOpt = null) 2283else if (TypeSymbol.Equals(sourceType, targetType, TypeCompareKind.ConsiderEverything2)) 2304TypeSymbol targetType) 2433var sourceType = operand.Type; 2522var targetElementType = targetElementTypes[i].Type; 2966protected virtual TypeSymbol GetCurrentReturnType(out RefKind refKind) 2973TypeSymbol returnType = symbol.ReturnType; 3008TypeSymbol retType = GetCurrentReturnType(out sigRefKind); 3100var requiredType = IsEffectivelyGenericTaskReturningAsyncMethod() 3131TypeSymbol returnType) 3180&& TypeSymbol.Equals(argument.Type, this.GetCurrentReturnType(out unusedRefKind), TypeCompareKind.ConsiderEverything2)) 3240TypeSymbol type = null; 3259TypeSymbol effectiveType = type.EffectiveType(ref useSiteInfo); 3313else if (TypeSymbol.Equals(previousType, Compilation.GetWellKnownType(WellKnownType.System_Exception), TypeCompareKind.ConsiderEverything2) && 3336Debug.Assert(local.Type.IsErrorType() || (TypeSymbol.Equals(local.Type, type, TypeCompareKind.ConsiderEverything2))); 3449var returnType = GetCurrentReturnType(out returnRefKind);
Binder\Binder_Symbols.cs (33)
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)) 375internal NamespaceOrTypeOrAliasSymbolWithAnnotations BindNamespaceOrTypeSymbol(ExpressionSyntax syntax, BindingDiagnosticBag diagnostics, ConsList<TypeSymbol> basesBeingResolved = null) 385internal NamespaceOrTypeOrAliasSymbolWithAnnotations BindNamespaceOrTypeSymbol(ExpressionSyntax syntax, BindingDiagnosticBag diagnostics, ConsList<TypeSymbol> basesBeingResolved, bool suppressUseSiteDiagnostics) 399/// <see cref="BindQualifiedName(ExpressionSyntax, SimpleNameSyntax, BindingDiagnosticBag, ConsList{TypeSymbol}, bool)"/> 408internal NamespaceOrTypeOrAliasSymbolWithAnnotations BindNamespaceOrTypeOrAliasSymbol(ExpressionSyntax syntax, BindingDiagnosticBag diagnostics, ConsList<TypeSymbol> basesBeingResolved, bool suppressUseSiteDiagnostics) 631ConsList<TypeSymbol> basesBeingResolved, 676private TypeSymbol BindTupleType(TupleTypeSyntax syntax, BindingDiagnosticBag diagnostics, ConsList<TypeSymbol> basesBeingResolved) 820ConsList<TypeSymbol> basesBeingResolved, 847ConsList<TypeSymbol> basesBeingResolved, 911if (aliasTarget is TypeSymbol type) 1084private static Symbol UnwrapAliasNoDiagnostics(Symbol symbol, ConsList<TypeSymbol> basesBeingResolved = null) 1094private NamespaceOrTypeOrAliasSymbolWithAnnotations UnwrapAlias(in NamespaceOrTypeOrAliasSymbolWithAnnotations symbol, BindingDiagnosticBag diagnostics, SyntaxNode syntax, ConsList<TypeSymbol> basesBeingResolved = null) 1105private NamespaceOrTypeOrAliasSymbolWithAnnotations UnwrapAlias(in NamespaceOrTypeOrAliasSymbolWithAnnotations symbol, out AliasSymbol alias, BindingDiagnosticBag diagnostics, SyntaxNode syntax, ConsList<TypeSymbol> basesBeingResolved = null) 1116private Symbol UnwrapAlias(Symbol symbol, BindingDiagnosticBag diagnostics, SyntaxNode syntax, ConsList<TypeSymbol> basesBeingResolved = null) 1122private Symbol UnwrapAlias(Symbol symbol, out AliasSymbol alias, BindingDiagnosticBag diagnostics, SyntaxNode syntax, ConsList<TypeSymbol> basesBeingResolved = null) 1131var type = result as TypeSymbol; 1153ConsList<TypeSymbol> basesBeingResolved, 1261ConsList<TypeSymbol> basesBeingResolved, 1337private ImmutableArray<TypeWithAnnotations> BindTypeArguments(SeparatedSyntaxList<TypeSyntax> typeArguments, BindingDiagnosticBag diagnostics, ConsList<TypeSymbol> basesBeingResolved = null) 1349private TypeWithAnnotations BindTypeArgument(TypeSyntax typeArgument, BindingDiagnosticBag diagnostics, ConsList<TypeSymbol> basesBeingResolved = null) 1523ArrayBuilder<Symbol> members, TypeSymbol receiverType, 1573ConsList<TypeSymbol> basesBeingResolved, 1605ConsList<TypeSymbol> basesBeingResolved, 2249var 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)
135var 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 (26)
526TypeSymbol getEnumeratorType = getEnumeratorMethod.ReturnType; 623TypeSymbol collectionType, 700TypeSymbol collectionExprType = collectionExpr.Type; 777TypeSymbol collectionExprType = collectionExpr.Type; 845if (!TypeSymbol.IsInlineArrayElementFieldSupported(elementField)) 919TypeSymbol collectionExprType = collectionExpr.Type; 959var unwrappedCollectionExprType = unwrappedCollectionExpr.Type; 1042private EnumeratorResult SatisfiesIEnumerableInterfaces(SyntaxNode collectionSyntax, ref ForEachEnumeratorInfo.Builder builder, BoundExpression collectionExpr, bool isAsync, BindingDiagnosticBag diagnostics, TypeSymbol unwrappedCollectionExprType) 1107TypeSymbol enumeratorType = specificGetEnumeratorMethod.ReturnType; 1192TypeSymbol enumeratorType = builder.GetEnumeratorInfo.Method.ReturnType; 1255bool implementsInterface(TypeSymbol enumeratorType, bool isAsync, BindingDiagnosticBag diagnostics) 1278private ForEachEnumeratorInfo.Builder GetDefaultEnumeratorInfo(SyntaxNode syntax, ForEachEnumeratorInfo.Builder builder, BindingDiagnosticBag diagnostics, TypeSymbol collectionExprType) 1287(TypeSymbol)DynamicTypeSymbol.Instance : 1305TypeSymbol.Equals(builder.GetEnumeratorInfo.Method.ReturnType, this.Compilation.GetSpecialType(SpecialType.System_Collections_IEnumerator), TypeCompareKind.ConsiderEverything2)); 1352private MethodArgumentInfo FindForEachPatternMethod(SyntaxNode syntax, SyntaxNode collectionSyntax, TypeSymbol patternType, string methodName, LookupResult lookupResult, bool warningsOnly, BindingDiagnosticBag diagnostics, bool isAsync) 1419private MethodArgumentInfo PerformForEachPatternOverloadResolution(SyntaxNode syntax, SyntaxNode collectionSyntax, TypeSymbol patternType, ArrayBuilder<MethodSymbol> candidateMethods, bool warningsOnly, BindingDiagnosticBag diagnostics, bool isAsync) 1597TypeSymbol enumeratorType = getEnumeratorMethod.ReturnType; 1710private void ReportEnumerableWarning(SyntaxNode collectionSyntax, BindingDiagnosticBag diagnostics, TypeSymbol enumeratorType, Symbol patternMemberCandidate) 1721internal static bool IsIEnumerable(TypeSymbol type) 1723switch (((TypeSymbol)type.OriginalDefinition).SpecialType) 1733private bool IsIAsyncEnumerable(TypeSymbol type) 1752TypeSymbol type, 1788TypeSymbol type, bool isAsync, CSharpCompilation compilation, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, 1825TypeSymbol.Equals(@interface, result, TypeCompareKind.IgnoreTupleNames)) 1838internal static bool IsIEnumerableT(TypeSymbol type, bool isAsync, CSharpCompilation compilation) 1858private 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) 104LookupResult 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 (5)
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) 345TypeSymbol throughTypeOpt, 349ConsList<TypeSymbol> basesBeingResolved = null) 417TypeSymbol throughTypeOpt, 422ConsList<TypeSymbol> basesBeingResolved = null) 460var originalThroughTypeOpt = (object)throughTypeOpt == null ? null : throughTypeOpt.OriginalDefinition as TypeSymbol; 544this TypeSymbol type, 548ConsList<TypeSymbol> basesBeingResolved = null) 564var current = type; 585var next = current.GetNextBaseTypeNoUseSiteDiagnostics(basesBeingResolved, compilation, ref visited); 592current = (TypeSymbol)next.OriginalDefinition; 635static 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) 129protected override Conversion GetInterpolatedStringConversion(BoundExpression source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 151return (TypeSymbol.Equals(destination, Compilation.GetWellKnownType(WellKnownType.System_IFormattable), TypeCompareKind.ConsiderEverything) || 152TypeSymbol.Equals(destination, Compilation.GetWellKnownType(WellKnownType.System_FormattableString), TypeCompareKind.ConsiderEverything)) 159TypeSymbol targetType, 164var elementType = elementTypeWithAnnotations.Type; 218Conversion convertElement(BoundNode element, TypeSymbol elementType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 230TypeSymbol targetType, 273private static (MethodSymbol, bool isFunctionPointer, CallingConventionInfo callingConventionInfo) GetDelegateInvokeOrFunctionPointerMethodIfAvailable(TypeSymbol type) 295public static bool ReportDelegateOrFunctionPointerMethodGroupDiagnostics(Binder binder, BoundMethodGroup expr, TypeSymbol targetType, BindingDiagnosticBag diagnostics) 484public 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) 1605var delegateType = type.TypeArgumentsWithAnnotationsNoUseSiteDiagnostics[0].Type; 1619internal bool IsAssignableFromMulticastDelegate(TypeSymbol type, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1626public static LambdaConversionResult IsAnonymousFunctionCompatibleWithType(UnboundLambda anonymousFunction, TypeSymbol type, CSharpCompilation compilation) 1643private static bool HasAnonymousFunctionConversion(BoundExpression source, TypeSymbol destination, CSharpCompilation compilation) 1656internal static CollectionExpressionTypeKind GetCollectionExpressionTypeKind(CSharpCompilation compilation, TypeSymbol destination, out TypeWithAnnotations elementType) 1700static bool implementsSpecialInterface(CSharpCompilation compilation, TypeSymbol targetType, SpecialType specialInterface) 1708internal static bool IsSpanOrListType(CSharpCompilation compilation, TypeSymbol targetType, WellKnownType spanType, [NotNullWhen(true)] out TypeWithAnnotations elementType) 1721internal Conversion ClassifyImplicitUserDefinedConversionForV6SwitchGoverningType(TypeSymbol sourceType, out TypeSymbol switchGoverningType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1753internal Conversion GetCallerLineNumberConversion(TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1758TypeSymbol expectedAttributeType = corLibrary.GetSpecialType(SpecialType.System_Int32); 1778internal bool HasCallerLineNumberConversion(TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1783internal bool HasCallerInfoStringConversion(TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1785TypeSymbol expectedAttributeType = corLibrary.GetSpecialType(SpecialType.System_String); 1790public static bool HasIdentityConversion(TypeSymbol type1, TypeSymbol type2) 1795private static bool HasIdentityConversionInternal(TypeSymbol type1, TypeSymbol type2, bool includeNullability) 1817private bool HasIdentityConversionInternal(TypeSymbol type1, TypeSymbol type2) 1882var type = typeWithAnnotations.Type; 1912public Conversion ConvertExtensionMethodThisArg(TypeSymbol parameterType, TypeSymbol thisType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, bool isMethodGroupConversion) 1922public Conversion ClassifyImplicitExtensionMethodThisArgConversion(BoundExpression sourceExpressionOpt, TypeSymbol sourceType, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, bool isMethodGroupConversion) 2034private static ConversionKind GetNumericConversion(TypeSymbol source, TypeSymbol destination) 2056private static bool HasImplicitNumericConversion(TypeSymbol source, TypeSymbol destination) 2061private static bool HasExplicitNumericConversion(TypeSymbol source, TypeSymbol destination) 2099private static bool IsNumericType(TypeSymbol type) 2123private static bool HasSpecialIntPtrConversion(TypeSymbol source, TypeSymbol target) 2159var s0 = source.StrippedType(); 2160var t0 = target.StrippedType(); 2162TypeSymbol otherType; 2205static bool isIntPtrOrUIntPtr(TypeSymbol type) => 2209private static bool HasExplicitEnumerationConversion(TypeSymbol source, TypeSymbol destination) 2238private Conversion ClassifyImplicitNullableConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2254TypeSymbol unwrappedDestination = destination.GetNullableUnderlyingType(); 2255TypeSymbol unwrappedSource = source.StrippedType(); 2284private Conversion GetImplicitTupleLiteralConversion(BoundTupleLiteral source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2302private Conversion GetExplicitTupleLiteralConversion(BoundTupleLiteral source, TypeSymbol destination, bool isChecked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, bool forCast) 2322TypeSymbol destination, 2360private Conversion ClassifyImplicitTupleConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2379private Conversion ClassifyExplicitTupleConversion(TypeSymbol source, TypeSymbol destination, bool isChecked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, bool forCast) 2399TypeSymbol source, 2400TypeSymbol destination, 2433private Conversion ClassifyExplicitNullableConversion(TypeSymbol source, TypeSymbol destination, bool isChecked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, bool forCast) 2451TypeSymbol unwrappedSource = source.StrippedType(); 2452TypeSymbol unwrappedDestination = destination.StrippedType(); 2488private bool HasCovariantArrayConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2510public bool HasIdentityOrImplicitReferenceConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2523private static bool HasImplicitDynamicConversionFromExpression(TypeSymbol expressionType, TypeSymbol destination) 2532private static bool HasExplicitDynamicConversion(TypeSymbol source, TypeSymbol destination) 2542private bool HasArrayConversionToInterface(ArrayTypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2623internal bool HasImplicitReferenceConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2686private bool HasImplicitConversionToInterface(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2720private bool HasImplicitConversionFromArray(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2761private bool HasImplicitConversionFromDelegate(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2797private bool HasImplicitFunctionTypeConversion(FunctionTypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2808internal bool IsValidFunctionTypeConversionTarget(TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2851public bool HasImplicitTypeParameterConversion(TypeParameterSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2873private bool HasImplicitReferenceTypeParameterConversion(TypeParameterSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2916private bool HasImplicitEffectiveBaseConversion(TypeParameterSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2940private bool HasImplicitEffectiveInterfaceSetConversion(TypeParameterSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2945private bool HasVarianceCompatibleInterfaceInEffectiveInterfaceSet(TypeParameterSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2965private bool HasAnyBaseInterfaceConversion(TypeSymbol derivedType, TypeSymbol baseType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2970private bool ImplementsVarianceCompatibleInterface(TypeSymbol derivedType, TypeSymbol baseType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2996internal bool ImplementsVarianceCompatibleInterface(NamedTypeSymbol derivedType, TypeSymbol baseType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2998return ImplementsVarianceCompatibleInterface((TypeSymbol)derivedType, baseType, ref useSiteInfo); 3001internal bool HasImplicitConversionToOrImplementsVarianceCompatibleInterface(TypeSymbol typeToCheck, NamedTypeSymbol targetInterfaceType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, out bool needSupportForRefStructInterfaces) 3021private bool IsRefLikeOrAllowsRefLikeTypeImplementingVarianceCompatibleInterface(TypeSymbol typeToCheck, NamedTypeSymbol targetInterfaceType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 3045if (expressionToCheck.Type is TypeSymbol typeToCheck && IsRefLikeOrAllowsRefLikeTypeImplementingVarianceCompatibleInterface(typeToCheck, targetInterfaceType, ref useSiteInfo)) 3069private bool HasInterfaceVarianceConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 3088private bool HasDelegateVarianceConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 3149if (!TypeSymbol.Equals(typeSymbol, destination.OriginalDefinition, TypeCompareKind.ConsiderEverything2)) 3172Debug.Assert(TypeSymbol.Equals(source.OriginalDefinition, destination.OriginalDefinition, TypeCompareKind.AllIgnoreOptions)); 3201TypeSymbol.Equals(destinationTypeArgument.Type, sourceTypeArgument.Type, TypeCompareKind.AllNullableIgnoreOptions) && 3250private bool HasImplicitBoxingTypeParameterConversion(TypeParameterSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 3304public bool HasBoxingConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 3365internal static bool HasImplicitPointerToVoidConversion(TypeSymbol source, TypeSymbol destination) 3376internal bool HasImplicitPointerConversion(TypeSymbol? source, TypeSymbol? destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 3433private bool HasIdentityOrReferenceConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 3456private bool HasExplicitReferenceConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 3530private bool HasExplicitReferenceTypeParameterConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 3582private bool HasUnboxingTypeParameterConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 3605if (TypeSymbol.Equals(type, source, TypeCompareKind.ConsiderEverything2)) 3633private bool HasExplicitDelegateConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 3664if (!TypeSymbol.Equals(source.OriginalDefinition, destination.OriginalDefinition, TypeCompareKind.ConsiderEverything2)) 3688var sourceArg = sourceTypeArguments[i].Type; 3689var destinationArg = destinationTypeArguments[i].Type; 3722private bool HasExplicitArrayConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 3783var specialDefinition = ((TypeSymbol)source.OriginalDefinition).SpecialType; 3791var sourceElement = ((NamedTypeSymbol)source).TypeArgumentWithDefinitionUseSiteDiagnostics(0, ref useSiteInfo).Type; 3792var destinationElement = destinationArray.ElementType; 3814private bool HasUnboxingConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 3882private static bool HasPointerToPointerConversion(TypeSymbol source, TypeSymbol destination) 3890private static bool HasPointerToIntegerConversion(TypeSymbol source, TypeSymbol destination) 3908private static bool HasIntegerToPointerConversion(TypeSymbol source, TypeSymbol destination) 3922private static bool IsIntegerTypeSupportingPointerConversions(TypeSymbol type) 3953private bool HasImplicitSpanConversion(TypeSymbol? source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 4016private bool HasExplicitSpanConversion(TypeSymbol? source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 4037private 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, 267TypeSymbol convertsFrom = op.GetParameterType(0); 268TypeSymbol convertsTo = op.ReturnType; 319TypeSymbol nullableFrom = MakeNullableType(convertsFrom); 320TypeSymbol nullableTo = convertsTo.IsValidNullableTypeArgument() ? MakeNullableType(convertsTo) : convertsTo; 365private TypeSymbol MostSpecificSourceTypeForExplicitUserDefinedConversion( 368TypeSymbol source, 403if (u.Any(static (conv, source) => TypeSymbol.Equals(conv.FromType, source, TypeCompareKind.ConsiderEverything2), source)) 412var result = MostEncompassedType(u, isValid, conv => conv.FromType, ref inLambdaUseSiteInfo); 423private TypeSymbol MostSpecificTargetTypeForExplicitUserDefinedConversion( 425TypeSymbol target, 457if (u.Any(static (conv, target) => TypeSymbol.Equals(conv.ToType, target, TypeCompareKind.ConsiderEverything2), target)) 466var result = MostEncompassingType(u, isValid, conv => conv.ToType, ref inLambdaUseSiteInfo); 475private Conversion EncompassingExplicitConversion(BoundExpression expr, TypeSymbol a, TypeSymbol b, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 498private 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, 297TypeSymbol convertsFrom = op.GetParameterType(0); 298TypeSymbol convertsTo = op.ReturnType; 345TypeSymbol nullableFrom = MakeNullableType(convertsFrom); 346TypeSymbol nullableTo = convertsTo.IsValidNullableTypeArgument() ? MakeNullableType(convertsTo) : convertsTo; 360private TypeSymbol MostSpecificSourceTypeForImplicitUserDefinedConversion(ImmutableArray<UserDefinedConversionAnalysis> u, TypeSymbol source, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 365if (u.Any(static (conv, source) => TypeSymbol.Equals(conv.FromType, source, TypeCompareKind.ConsiderEverything2), source)) 376private TypeSymbol MostSpecificTargetTypeForImplicitUserDefinedConversion(ImmutableArray<UserDefinedConversionAnalysis> u, TypeSymbol target, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 399if (u.Any(static (conv, target) => TypeSymbol.Equals(conv.ToType, target, TypeCompareKind.ConsiderEverything2), target)) 410if (!TypeSymbol.Equals(conv.FromType, conv.Operator.GetParameterType(0), TypeCompareKind.ConsiderEverything2)) 415if (!TypeSymbol.Equals(conv.ToType, conv.Operator.ReturnType, TypeCompareKind.ConsiderEverything2)) 423private static int? MostSpecificConversionOperator(TypeSymbol sx, TypeSymbol tx, ImmutableArray<UserDefinedConversionAnalysis> u) 425return MostSpecificConversionOperator(conv => TypeSymbol.Equals(conv.FromType, sx, TypeCompareKind.ConsiderEverything2) && TypeSymbol.Equals(conv.ToType, tx, TypeCompareKind.ConsiderEverything2), u); 570private bool IsEncompassedBy(BoundExpression aExpr, TypeSymbol a, TypeSymbol b, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 584private bool IsEncompassedBy(TypeSymbol a, TypeSymbol b, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 589private Conversion EncompassingImplicitConversion(BoundExpression aExpr, TypeSymbol a, TypeSymbol b, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 604private Conversion EncompassingImplicitConversion(TypeSymbol a, TypeSymbol b, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 684private TypeSymbol MostEncompassedType<T>( 686Func<T, TypeSymbol> extract, 692private TypeSymbol MostEncompassedType<T>( 695Func<T, TypeSymbol> extract, 726TypeSymbol leftType = extract(left); 727TypeSymbol rightType = extract(right); 728if (TypeSymbol.Equals(leftType, rightType, TypeCompareKind.ConsiderEverything2)) 746private TypeSymbol MostEncompassingType<T>( 748Func<T, TypeSymbol> extract, 754private TypeSymbol MostEncompassingType<T>( 757Func<T, TypeSymbol> extract, 765TypeSymbol leftType = extract(left); 766TypeSymbol rightType = extract(right); 767if (TypeSymbol.Equals(leftType, rightType, TypeCompareKind.ConsiderEverything2)) 880private NamedTypeSymbol MakeNullableType(TypeSymbol type) 889protected 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) 969TypeSymbol leftOperandType = op.GetParameterType(0); 970TypeSymbol rightOperandType = op.GetParameterType(1); 971TypeSymbol resultType = op.ReturnType; 977void addLiftedOperators(TypeSymbol constrainedToTypeOpt, BinaryOperatorKind kind, ArrayBuilder<BinaryOperatorSignature> operators) 982TypeSymbol leftOperandType = op.GetParameterType(0); 983TypeSymbol rightOperandType = op.GetParameterType(1); 984TypeSymbol resultType = op.ReturnType; 1011private static LiftingResult UserDefinedBinaryOperatorCanBeLifted(TypeSymbol left, TypeSymbol right, TypeSymbol result, BinaryOperatorKind kind) 1040if (!TypeSymbol.Equals(left, right, TypeCompareKind.ConsiderEverything2)) return LiftingResult.NotLifted; 1317TypeSymbol op1Left, op1Right, op2Left, op2Right; 1352using var uninst1 = TemporaryArray<TypeSymbol>.Empty; 1353using 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) 525TypeSymbol operandType = op.GetParameterType(0); 526TypeSymbol resultType = op.ReturnType; 532void addLiftedOperators(TypeSymbol constrainedToTypeOpt, UnaryOperatorKind kind, ArrayBuilder<UnaryOperatorSignature> operators) 552TypeSymbol operandType = op.GetParameterType(0); 553TypeSymbol 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)
493TypeSymbol.Equals(typeParameter, _methodTypeParameters[ordinal], TypeCompareKind.ConsiderEverything2) && 532private TypeSymbol GetFixedDelegateOrFunctionPointer(TypeSymbol delegateOrFunctionPointerType) 642TypeSymbol targetType = target.Type; 982private static bool DoesInputTypeContain(BoundExpression argument, TypeSymbol formalParameterType, TypeParameterSymbol typeParameter) 988var delegateOrFunctionPointerType = formalParameterType.GetDelegateOrFunctionPointerType(); 1018private bool HasUnfixedParamInInputType(BoundExpression pSource, TypeSymbol pDest) 1037private static bool DoesOutputTypeContain(BoundExpression argument, TypeSymbol formalParameterType, 1044var delegateOrFunctionPointerType = formalParameterType.GetDelegateOrFunctionPointerType(); 1069var returnType = method.ReturnType; 1078private bool HasUnfixedParamInOutputType(BoundExpression argument, TypeSymbol formalParameterType) 1118var formalParameterType = _formalParameterTypes[iArg].Type; 1410private bool MethodGroupReturnTypeInference(Binder binder, BoundExpression source, TypeSymbol target, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1425var delegateOrFunctionPointerType = target.GetDelegateOrFunctionPointerType(); 1709private bool ExactSpanInference(TypeSymbol source, TypeSymbol target, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1736private static TypeWithAnnotations GetSpanElementType(TypeSymbol type) 1742private static TypeWithAnnotations GetSpanOrSZArrayElementType(TypeSymbol type) 1849if (!TypeSymbol.Equals(namedSource.OriginalDefinition, namedTarget.OriginalDefinition, TypeCompareKind.ConsiderEverything2)) 1916Debug.Assert(TypeSymbol.Equals(source.OriginalDefinition, target.OriginalDefinition, TypeCompareKind.ConsiderEverything2)); 2048private static TypeWithAnnotations GetMatchingElementType(ArrayTypeSymbol source, TypeSymbol target, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2083private bool LowerBoundArrayInference(TypeSymbol source, TypeSymbol target, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2121private bool LowerBoundSpanInference(TypeSymbol source, TypeSymbol target, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2164private bool LowerBoundConstructedInference(TypeSymbol source, TypeSymbol target, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2191TypeSymbol.Equals(constructedSource.OriginalDefinition, constructedTarget.OriginalDefinition, TypeCompareKind.ConsiderEverything2)) 2228private bool LowerBoundClassInference(TypeSymbol source, NamedTypeSymbol target, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2263if (TypeSymbol.Equals(sourceBase.OriginalDefinition, target.OriginalDefinition, TypeCompareKind.ConsiderEverything2)) 2273private bool LowerBoundInterfaceInference(TypeSymbol source, NamedTypeSymbol target, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2358Debug.Assert(TypeSymbol.Equals(source.OriginalDefinition, target.OriginalDefinition, TypeCompareKind.ConsiderEverything2)); 2397private bool LowerBoundFunctionPointerTypeInference(TypeSymbol source, TypeSymbol target, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2569var source = sourceWithAnnotations.Type; 2570var target = targetWithAnnotations.Type; 2591TypeSymbol.Equals(constructedSource.OriginalDefinition, target.OriginalDefinition, TypeCompareKind.ConsiderEverything2)) 2625private bool UpperBoundClassInference(NamedTypeSymbol source, TypeSymbol target, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2642if (TypeSymbol.Equals(targetBase.OriginalDefinition, source.OriginalDefinition, TypeCompareKind.ConsiderEverything2)) 2654private bool UpperBoundInterfaceInference(NamedTypeSymbol source, TypeSymbol target, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2708Debug.Assert(TypeSymbol.Equals(source.OriginalDefinition, target.OriginalDefinition, TypeCompareKind.ConsiderEverything2)); 2747private bool UpperBoundFunctionPointerTypeInference(TypeSymbol source, TypeSymbol target, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2995static bool isExpressionType(TypeSymbol? type) 3011var source = sourceWithAnnotations.Type; 3012var destination = destinationWithAnnotations.Type; 3133if (TypeSymbol.Equals(currentInterface.OriginalDefinition, target.OriginalDefinition, TypeCompareKind.ConsiderEverything)) 3139else if (!TypeSymbol.Equals(matchingInterface, currentInterface, TypeCompareKind.ConsiderEverything)) 3239TypeSymbol source = argument.Type; 3284private static bool IsReallyAType(TypeSymbol? type)
Binder\Semantics\OverloadResolution\OverloadResolution.cs (71)
145TypeSymbol returnType = null, 193TypeSymbol returnType = null, 434TypeSymbol returnType, 840TypeSymbol returnType, 1313public static bool TryInferParamsCollectionIterationType(Binder binder, TypeSymbol type, out TypeWithAnnotations elementType) 1472private bool TypeArgumentsAccessible(ImmutableArray<TypeSymbol> typeArguments, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1474foreach (TypeSymbol arg in typeArguments) 1604private static bool IsLessDerivedThanAny<TMember>(int index, TypeSymbol type, ArrayBuilder<MemberResolutionResult<TMember>> results, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2167var type1 = getParameterTypeAndRefKind(i, m1.Result, m1LeastOverriddenParameters, m1.Result.ParamsElementTypeOpt, out RefKind parameter1RefKind); 2169var type2 = getParameterTypeAndRefKind(i, m2.Result, m2LeastOverriddenParameters, m2.Result.ParamsElementTypeOpt, out RefKind parameter2RefKind); 2185var type1Normalized = type1; 2186var type2Normalized = type2; 2309var type1 = getParameterTypeAndRefKind(i, m1.Result, m1LeastOverriddenParameters, m1.Result.ParamsElementTypeOpt, out _); 2311var type2 = getParameterTypeAndRefKind(i, m2.Result, m2LeastOverriddenParameters, m2.Result.ParamsElementTypeOpt, out _); 2313var type1Normalized = type1; 2314var type2Normalized = type2; 2453using (var uninst1 = TemporaryArray<TypeSymbol>.Empty) 2454using (var uninst2 = TemporaryArray<TypeSymbol>.Empty) 2541TypeSymbol t1 = m1LeastOverriddenParameters[^1].Type; 2542TypeSymbol t2 = m2LeastOverriddenParameters[^1].Type; 2558static TypeSymbol getParameterTypeAndRefKind(int i, MemberAnalysisResult result, ImmutableArray<ParameterSymbol> parameters, TypeWithAnnotations paramsElementTypeOpt, out RefKind parameter1RefKind) 2563var type = parameter.Type; 2698private static BetterResult MoreSpecificType(ref TemporaryArray<TypeSymbol> t1, ref TemporaryArray<TypeSymbol> t2, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2730private static BetterResult MoreSpecificType(TypeSymbol t1, TypeSymbol t2, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2807using var allTypeArgs1 = TemporaryArray<TypeSymbol>.Empty; 2808using var allTypeArgs2 = TemporaryArray<TypeSymbol>.Empty; 2818private BetterResult BetterConversionFromExpression(BoundExpression node, TypeSymbol t1, TypeSymbol t2, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2834TypeSymbol t1, 2837TypeSymbol t2, 2888private BetterResult BetterConversionFromExpression(BoundExpression node, TypeSymbol t1, Conversion conv1, TypeSymbol t2, Conversion conv2, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, out bool okToDowngradeToNeither) 3010TypeSymbol t1, Conversion conv1, 3011TypeSymbol t2, Conversion conv2, 3014var kind1 = conv1.GetCollectionExpressionTypeKind(out TypeSymbol elementType1, out _, out _); 3015var kind2 = conv2.GetCollectionExpressionTypeKind(out TypeSymbol elementType2, out _, out _); 3044TypeSymbol t1, CollectionExpressionTypeKind kind1, TypeSymbol elementType1, ImmutableArray<Conversion> underlyingElementConversions1, 3045TypeSymbol t2, CollectionExpressionTypeKind kind2, TypeSymbol elementType2, ImmutableArray<Conversion> underlyingElementConversions2, 3151TypeSymbol t1, CollectionExpressionTypeKind kind1, TypeSymbol elementType1, 3152TypeSymbol t2, CollectionExpressionTypeKind kind2, TypeSymbol elementType2, 3182bool hasImplicitConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) => 3186private BetterResult BetterParamsCollectionType(TypeSymbol t1, TypeSymbol t2, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 3208private static bool IsSZArrayOrArrayInterface(TypeSymbol type, out TypeSymbol elementType) 3226private bool ExpressionMatchExactly(BoundExpression node, TypeSymbol t, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 3250TypeSymbol y; 3342private bool ExpressionMatchExactly(BoundTupleLiteral tupleSource, TypeSymbol targetType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 3413TypeSymbol type1, 3414TypeSymbol type2, 3429TypeSymbol type1, 3431TypeSymbol type2, 3441TypeSymbol type1, 3443TypeSymbol type2, 3520TypeSymbol r1 = invoke1.ReturnType; 3521TypeSymbol r2 = invoke2.ReturnType; 3608private bool CanDowngradeConversionFromLambdaToNeither(BetterResult currentResult, UnboundLambda lambda, TypeSymbol type1, TypeSymbol type2, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, bool fromTypeAnalysis) 3637TypeSymbol r1 = invoke1.ReturnType; 3638TypeSymbol r2 = invoke2.ReturnType; 3732private static bool IsSignedIntegralType(TypeSymbol type) 3753private static bool IsUnsignedIntegralType(TypeSymbol type) 4562TypeSymbol parameterType, 4595var 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); 1212TypeSymbol parameterType = unwrapIfParamsCollection(badArg, parameter, isLastParameter) is TypeSymbol t ? t : parameter.Type; 1326if (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\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)
39LookupResult 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); 131LookupResult result, string name, int arity, ConsList<TypeSymbol>? basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 281internal override ImmutableArray<NamespaceOrTypeAndUsingDirective> GetUsings(ConsList<TypeSymbol>? basesBeingResolved) 311internal override ImmutableArray<NamespaceOrTypeAndUsingDirective> GetUsings(ConsList<TypeSymbol>? basesBeingResolved) 316private Imports GetImports(ConsList<TypeSymbol>? basesBeingResolved) 345internal 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 (3)
16public virtual TypeSymbol? VisitType(TypeSymbol? type) 144var type = this.VisitType(binary.Type);
BoundTree\Constructors.cs (38)
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) 357TypeSymbol type, 383TypeSymbol type, 408TypeSymbol type, 421TypeSymbol type) 434TypeSymbol? constrainedToTypeOpt, 437TypeSymbol type, 455TypeSymbol? constrainedToTypeOpt, 459TypeSymbol type, 468TypeSymbol? constrainedToTypeOpt, 472TypeSymbol type) 494TypeSymbol? constrainedToTypeOpt, 497TypeSymbol type, 520TypeSymbol? constrainedToTypeOpt, 524TypeSymbol type) 559public BoundTypeExpression(SyntaxNode syntax, AliasSymbol? aliasOpt, TypeSymbol type, bool hasErrors = false) 591TypeSymbol type, bool isRef = false, bool hasErrors = false) 599public BoundBadExpression(SyntaxNode syntax, LookupResultKind resultKind, ImmutableArray<Symbol?> symbols, ImmutableArray<BoundExpression> childBoundNodes, TypeSymbol type) 679public BoundDefaultExpression(SyntaxNode syntax, TypeSymbol type, bool hasErrors = false) 695public BoundAddressOfOperator(SyntaxNode syntax, BoundExpression operand, TypeSymbol type, bool hasErrors = false) 703public BoundDagTemp(SyntaxNode syntax, TypeSymbol type, BoundDagEvaluation? source) 722TypeSymbol type, 736TypeSymbol type) 748TypeSymbol? constrainedToTypeOpt, 750TypeSymbol type, 760TypeSymbol? constrainedToTypeOpt, 762TypeSymbol type) 773TypeSymbol? constrainedToTypeOpt, 779TypeSymbol type, 785public 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) ? 473public void GenerateAnonymousFunctionConversionError(BindingDiagnosticBag diagnostics, TypeSymbol targetType) { Data.GenerateAnonymousFunctionConversionError(diagnostics, targetType); } 479public TypeSymbol ParameterType(int index) { return ParameterTypeWithAnnotations(index).Type; } 591public virtual void GenerateAnonymousFunctionConversionError(BindingDiagnosticBag diagnostics, TypeSymbol targetType) 610internal IEnumerable<TypeSymbol> InferredReturnTypes() 1034Debug.Assert(taskLikeReturnTypeOpt is null || ((object)taskLikeReturnTypeOpt == taskLikeReturnTypeOpt.ConstructedFrom && taskLikeReturnTypeOpt.IsCustomTaskType(out var builderArgument))); 1051!TypeSymbol.Equals(other.TaskLikeReturnTypeOpt, this.TaskLikeReturnTypeOpt, TypeCompareKind.ConsiderEverything2)) 1124if (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) 472TypeSymbol? elementType = null; 632bool tryEmitAsCachedArrayFromBlob(NamedTypeSymbol spanType, BoundExpression wrappedExpression, int elementCount, ImmutableArray<byte> data, ref ArrayTypeSymbol arrayType, TypeSymbol elementType) 682bool 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) 3491private void EmitInitObj(TypeSymbol type, bool used, SyntaxNode syntaxNode) 3514TypeSymbol type = boundTypeOfOperator.SourceType.Type; 3522TypeSymbol type = boundSizeOfOperator.SourceType.Type; 3693if (!TypeSymbol.Equals(node.Type, getMethod.ReturnType, TypeCompareKind.ConsiderEverything2)) 3720if (!TypeSymbol.Equals(node.Type, getField.ReturnType, TypeCompareKind.ConsiderEverything2)) 3785var mergeTypeOfAlternative = StackMergeType(expr.Alternative); 3793else if (expr.Type.IsInterfaceType() && !TypeSymbol.Equals(expr.Type, mergeTypeOfAlternative, TypeCompareKind.ConsiderEverything2)) 3811var mergeTypeOfConsequence = StackMergeType(expr.Consequence); 3817else if (expr.Type.IsInterfaceType() && !TypeSymbol.Equals(expr.Type, mergeTypeOfConsequence, TypeCompareKind.ConsiderEverything2)) 3846var mergeTypeOfLeftValue = StackMergeType(expr.LeftOperand); 3854else if (expr.Type.IsInterfaceType() && !TypeSymbol.Equals(expr.Type, mergeTypeOfLeftValue, TypeCompareKind.ConsiderEverything2)) 3878var mergeTypeOfRightValue = StackMergeType(expr.RightOperand); 3904private TypeSymbol StackMergeType(BoundExpression expr) 3962private static bool IsVarianceCast(TypeSymbol to, TypeSymbol from) 3964if (TypeSymbol.Equals(to, from, TypeCompareKind.ConsiderEverything2)) 3982return (to.IsDelegateType() && !TypeSymbol.Equals(to, from, TypeCompareKind.ConsiderEverything2)) || 3986private void EmitStaticCast(TypeSymbol to, SyntaxNode syntax) 4006private 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) 182private void EmitElementStackAllocInitializers(TypeSymbol elementType, ImmutableArray<BoundExpression> inits, bool includeConstants) 200private void EmitPointerElementAccess(BoundExpression init, TypeSymbol elementType, int elementTypeSizeInBytes, int index) 227private 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) 1454void emitFinalDispatches(LengthBasedStringSwitchData lengthBasedSwitchInfo, LocalOrParameter keyTemp, TypeSymbol keyType, LabelSymbol fallThroughLabel, SyntaxNode syntaxNode) 1484TypeSymbol keyType) 1624private Cci.IMethodReference? GetLengthMethodRef(SyntaxNode syntaxNode, TypeSymbol keyType, bool isReadOnlySpan, bool isSpanOrReadOnlySpan) 1648private Microsoft.Cci.IMethodReference? GetIndexerRef(SyntaxNode syntaxNode, TypeSymbol keyType, bool isReadOnlySpan, bool isSpanOrReadOnlySpan) 1794TypeSymbol pointedAtType = pointerType.PointedAtType; 1900private LocalDefinition AllocateTemp(TypeSymbol type, SyntaxNode syntaxNode, LocalSlotConstraints slotConstraints = LocalSlotConstraints.None)
CodeGen\Optimizer.cs (8)
1195var receiverType = receiver.Type; 1230var receiverType = receiver.Type; 1526var type = this.VisitType(binary.Type); 1742var exceptionTypeOpt = this.VisitType(node.ExceptionTypeOpt); 2101var type = this.VisitType(binary.Type); 2145TypeSymbol type = this.VisitType(node.Type); 2280TypeSymbol? type = this.VisitType(node.Type); 2289var 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 2183if (!(TypeSymbol.Equals(namedType.ConstructedFrom, GetWellKnownType(WellKnownType.System_Threading_Tasks_Task), TypeCompareKind.ConsiderEverything2) || 2184TypeSymbol.Equals(namedType.ConstructedFrom, GetWellKnownType(WellKnownType.System_Threading_Tasks_Task_T), TypeCompareKind.ConsiderEverything2))) 2214TypeSymbol returnType = method.ReturnType; 2309TypeSymbol? cssource = source.EnsureCSharpSymbolOrNull(nameof(source)); 2310TypeSymbol? csdest = destination.EnsureCSharpSymbolOrNull(nameof(destination)); 2368internal ArrayTypeSymbol CreateArrayTypeSymbol(TypeSymbol elementType, int rank = 1, NullableAnnotation elementNullableAnnotation = NullableAnnotation.Oblivious) 2386internal PointerTypeSymbol CreatePointerTypeSymbol(TypeSymbol elementType, NullableAnnotation elementNullableAnnotation = NullableAnnotation.Oblivious) 2403TypeSymbol? throughType0 = throughType.EnsureCSharpSymbolOrNull(nameof(throughType)); 4126var elementType = typeSymbol.EnsureCSharpSymbolOrNull($"{nameof(elementTypes)}[{i}]"); 4192var type = memberTypes[i].GetSymbol(); 4210var csharpReturnType = returnType.EnsureCSharpSymbolOrNull(nameof(returnType)); 4211var csharpLeftType = leftType.EnsureCSharpSymbolOrNull(nameof(leftType)); 4212var csharpRightType = rightType.EnsureCSharpSymbolOrNull(nameof(rightType)); 4280TypeSymbol.Equals(csharpLeftType, csharpRightType, TypeCompareKind.ConsiderEverything)) 4293TypeSymbol.Equals(csharpLeftType, csharpReturnType, TypeCompareKind.ConsiderEverything)) 4314TypeSymbol.Equals(csharpLeftType, csharpRightType, TypeCompareKind.ConsiderEverything)) 4325TypeSymbol.Equals(csharpLeftType, csharpRightType, TypeCompareKind.ConsiderEverything) && 4326TypeSymbol.Equals(csharpReturnType, csharpRightType, TypeCompareKind.ConsiderEverything)) 4339TypeSymbol.Equals(csharpLeftType, csharpReturnType, TypeCompareKind.ConsiderEverything)) 4346TypeSymbol.Equals(csharpRightType, csharpReturnType, TypeCompareKind.ConsiderEverything)) 4355TypeSymbol.Equals(csharpLeftType, csharpRightType, TypeCompareKind.ConsiderEverything)) 4379TypeSymbol.Equals(csharpLeftType, csharpReturnType, TypeCompareKind.ConsiderEverything)) 4388TypeSymbol.Equals(csharpRightType, csharpReturnType, TypeCompareKind.ConsiderEverything)) 4397TypeSymbol.Equals(csharpLeftType, csharpReturnType, TypeCompareKind.ConsiderEverything)) 4406TypeSymbol.Equals(csharpLeftType, csharpRightType, TypeCompareKind.ConsiderEverything)) 4423bool isAllowedPointerArithmeticIntegralType(TypeSymbol type) 4426bool isReadOnlySpanOfByteType(TypeSymbol type) 4435var csharpReturnType = returnType.EnsureCSharpSymbolOrNull(nameof(returnType)); 4436var csharpOperandType = operandType.EnsureCSharpSymbolOrNull(nameof(operandType)); 4489TypeSymbol.Equals(csharpOperandType, csharpReturnType, TypeCompareKind.ConsiderEverything)) 4497TypeSymbol.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 (26)
964var declarationTypeSymbol = declarationType.GetSymbol(); 1591TypeSymbol containingType = binder.ContainingType; 1592TypeSymbol baseType = null; 1667TypeSymbol containingType = (TypeSymbol)container; 2046TypeSymbol type = null; 2086TypeSymbol convertedType; 2265static (TypeSymbol, NullabilityInfo) getTypeAndNullability(BoundExpression expr) => (expr.Type, expr.TopLevelNullability); 2316TypeSymbol type = unwrapped as TypeSymbol; 2353TypeSymbol type = UnwrapAlias(symbol) as TypeSymbol; 2833TypeSymbol cdestination = destination.EnsureCSharpSymbolOrNull(nameof(destination)); 2879internal abstract Conversion ClassifyConversionForCast(ExpressionSyntax expression, TypeSymbol destination); 2895internal Conversion ClassifyConversionForCast(int position, ExpressionSyntax expression, TypeSymbol destination) 3730private static ParameterSymbol GetThisParameter(TypeSymbol typeOfThis, NamedTypeSymbol containingType, Symbol containingMember, out LookupResultKind resultKind) 3832TypeSymbol opType = increment.Operand.Type.StrippedType(); 3884private static Symbol GetIntrinsicOperatorSymbol(BinaryOperatorKind op, bool isDynamic, TypeSymbol leftType, TypeSymbol rightType, TypeSymbol returnType, bool isChecked) 3988TypeSymbol.Equals((TypeSymbol)unwrappedSymbols[0], boundAttribute.Type.GetNonErrorGuess(), TypeCompareKind.ConsiderEverything2)); 4085TypeSymbol type = boundNode.Type; 4667TypeSymbol receiverType, 4706TypeSymbol receiverType, 4750TypeSymbol extensionThisType = 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 (4)
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)
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)
1100diagnostics.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)
240var returnType = entryPoint.ReturnType; 571TypeSymbol discarded = fieldSymbol.FixedImplementationType(compilationState.ModuleBuilderOpt); 2360if (ctorCall != null && !ctorCall.HasAnyErrors && ctorCall.Method != method && TypeSymbol.Equals(ctorCall.Method.ContainingType, method.ContainingType, TypeCompareKind.ConsiderEverything2))
Declarations\DeclarationTreeBuilder.cs (1)
220name: 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)
149var otherElementType = (TypeSymbol?)Visit(symbol.ElementType); 295var newType = (TypeSymbol?)v.Visit(t.Type); 375var otherPointedAtType = (TypeSymbol?)Visit(symbol.PointedAtType); 390var otherReturnType = (TypeSymbol?)Visit(sig.ReturnType); 409var otherType = (TypeSymbol?)Visit(param.Type); 526var otherType = type.WithTypeAndModifiers((TypeSymbol?)this.Visit(type.Type), this.VisitCustomModifiers(type.CustomModifiers)); 747private bool AreTypesEqual(TypeSymbol type, TypeSymbol other) 822public bool Equals(TypeSymbol source, TypeSymbol other) 829var visitedSource = (TypeSymbol?)_matcher.Visit(source); 830var visitedOther = (_deepTranslator != null) ? (TypeSymbol)_deepTranslator.Visit(other) : other; 861var translatedElementType = (TypeSymbol)this.Visit(symbol.ElementType); 883var translatedTypeArguments = type.GetAllTypeArguments(ref discardedUseSiteInfo).SelectAsArray((t, v) => t.WithTypeAndModifiers((TypeSymbol)v.Visit(t.Type), 904var translatedPointedAtType = (TypeSymbol)this.Visit(symbol.PointedAtType); 912var translatedReturnType = (TypeSymbol)Visit(sig.ReturnType); 926var translatedParamType = (TypeSymbol)Visit(param.Type);
Emitter\EditAndContinue\PEDeltaAssemblyBuilder.cs (3)
78internal override Cci.ITypeReference EncTranslateLocalVariableType(TypeSymbol type, DiagnosticBag diagnostics) 82var 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)
365TypeSymbol 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)
68if (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)
1456private static bool TypeIsImmutable(TypeSymbol t)
FlowAnalysis\DefiniteAssignment.cs (9)
244Debug.Assert(member is TypeSymbol type && 474TypeSymbol 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; 2583if (refKind != RefKind.None && ((object)method == null || method.IsExtern) && arg.Type is TypeSymbol type) 2630private void MarkFieldsUsed(TypeSymbol type)
FlowAnalysis\DefiniteAssignment.LocalFunctions.cs (1)
105var type = id.Symbol.GetTypeOrReturnType().Type;
FlowAnalysis\EmptyStructTypeCache.cs (8)
69public override bool IsEmptyStructType(TypeSymbol type) 78public virtual bool IsEmptyStructType(TypeSymbol type) 88private bool IsEmptyStructType(TypeSymbol type, ConsList<NamedTypeSymbol> typesWithMembersOfThisType) 123public static bool IsTrackableStructType(TypeSymbol type) 147var actualFieldType = field.Type; 162public IEnumerable<FieldSymbol> GetStructInstanceFields(TypeSymbol type) 215private bool ShouldIgnoreStructField(Symbol member, TypeSymbol memberType) 228private 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 (168)
126public VisitResult(TypeSymbol? type, NullableAnnotation annotation, NullableFlowState state) 130Debug.Assert(TypeSymbol.Equals(RValueType.Type, LValueType.Type, TypeCompareKind.ConsiderEverything)); 216private readonly ImmutableDictionary<BoundExpression, (NullabilityInfo Info, TypeSymbol? Type)>.Builder? _analyzedNullabilityMapOpt; 460ImmutableDictionary<BoundExpression, (NullabilityInfo, TypeSymbol?)>.Builder? analyzedNullabilityMapOpt, 928static ImmutableArray<Symbol> getAllTypeAndRequiredMembers(TypeSymbol containingType) 1497ImmutableDictionary<BoundExpression, (NullabilityInfo, TypeSymbol?)> analyzedNullabilitiesMap; 1502private static (SnapshotManager?, ImmutableDictionary<BoundExpression, (NullabilityInfo, TypeSymbol?)>) AnalyzeWithSemanticInfo( 1512var analyzedNullabilities = ImmutableDictionary.CreateBuilder<BoundExpression, (NullabilityInfo, TypeSymbol?)>(EqualityComparer<BoundExpression>.Default, NullabilityInfoTypeComparer.Instance); 1569var analyzedNullabilities = ImmutableDictionary.CreateBuilder<BoundExpression, (NullabilityInfo, TypeSymbol?)>(EqualityComparer<BoundExpression>.Default, NullabilityInfoTypeComparer.Instance); 1608private static BoundNode Rewrite(ImmutableDictionary<BoundExpression, (NullabilityInfo, TypeSymbol?)> updatedNullabilities, SnapshotManager? snapshotManager, BoundNode node, ref ImmutableDictionary<Symbol, Symbol>? remappedSymbols) 1730ImmutableDictionary<BoundExpression, (NullabilityInfo, TypeSymbol?)>.Builder? analyzedNullabilityMapOpt, 2004TypeSymbol slotType = NominalSlotType(result); 2005TypeSymbol? nodeType = node.Type; 2041var operandType = operand.Type; 2042var convertedType = conv.Type; 2059TypeSymbol.Equals(conv.Type, conv.Operand.Type, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes): 2228private static object GetTypeAsDiagnosticArgument(TypeSymbol? typeOpt) 2586private void InheritNullableStateOfTrackableStruct(TypeSymbol targetType, int targetSlot, int valueSlot, bool isDefaultValue, int skipSlot = -1) 2611TypeSymbol possibleBase = possibleMember.ContainingType; 2612TypeSymbol possibleDerived = NominalSlotType(slot); 2676private TypeSymbol NominalSlotType(int slot) 2708private void InheritDefaultState(TypeSymbol targetType, int targetSlot) 2713var actualType = _variables[targetSlot].Symbol.GetTypeOrReturnType().Type; 3562private static bool AreCloseEnough(TypeSymbol? typeA, TypeSymbol? typeB) 3578static bool canIgnoreAnyType(TypeSymbol type) 3582static bool canIgnoreType(TypeSymbol type) 3628private static bool TypeAllowsConditionalState(TypeSymbol? type) 3634private void UnsplitIfNeeded(TypeSymbol? type) 3768var strippedTargetCollectionType = targetCollectionType.Type.StrippedType(); 3769Debug.Assert(TypeSymbol.Equals(strippedTargetCollectionType, node.Type, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes)); 3808(CollectionExpressionTypeKind, TypeWithAnnotations) getCollectionDetails(BoundCollectionExpression node, TypeSymbol collectionType) 3867var type = node.Type; 3868(int slot, NullableFlowState resultState, Func<TypeSymbol, MethodSymbol?, int>? initialStateInferenceCompletion) = inferInitialObjectState(node, type, constructor, arguments, argumentResults, isTargetTyped); 3870Action<int, TypeSymbol>? initializerCompletion = null; 3883TypeSymbol? type, 3886Func<TypeSymbol, MethodSymbol?, int>? initialStateInferenceCompletion, 3887Action<int, TypeSymbol>? initializerCompletion, 3915Func<TypeSymbol, MethodSymbol?, int> initialStateInferenceCompletion, 3916Action<int, TypeSymbol>? initializerCompletion, 3924Debug.Assert(TypeSymbol.Equals(resultTypeWithAnnotations.Type, node.Type, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes)); 3926var type = resultTypeWithAnnotations.Type; 3939static MethodSymbol? getConstructor(BoundObjectCreationExpressionBase node, TypeSymbol type) 3951(int slot, NullableFlowState resultState, Func<TypeSymbol, MethodSymbol?, int>? completion) inferInitialObjectState( 3952BoundExpression node, TypeSymbol type, MethodSymbol? constructor, 4021Func<TypeSymbol, MethodSymbol?, int> inferInitialObjectStateAsContinuation( 4026return (TypeSymbol type, MethodSymbol? constructor) => 4040private Action<int, TypeSymbol>? VisitObjectCreationInitializer(int containingSlot, TypeSymbol containingType, BoundObjectInitializerExpressionBase node, bool delayCompletionForType) 4043Action<int, TypeSymbol>? completion = null; 4090private Action<int, TypeSymbol>? VisitObjectElementInitializer(int containingSlot, TypeSymbol containingType, BoundAssignmentOperator node, bool delayCompletionForType) 4109Action<int, TypeSymbol>? visitMemberInitializer(int containingSlot, TypeSymbol containingType, BoundAssignmentOperator node, bool delayCompletionForType) 4148Action<int, TypeSymbol>? setAnalyzedNullability( 4170Action<int, TypeSymbol>? setAnalyzedNullabilityAsContinuation( 4176return (int containingSlot, TypeSymbol containingType) => 4190static Symbol? getTargetMember(TypeSymbol containingType, BoundObjectInitializerMember objectInitializer) 4196Debug.Assert(TypeSymbol.Equals(objectInitializer.Type, symbol.GetTypeOrReturnType().Type, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes)); 4208Action<int, Symbol>? visitNestedInitializer(int containingSlot, TypeSymbol containingType, Symbol symbol, BoundObjectInitializerExpressionBase initializer, bool delayCompletionForType) 4213Action<int, TypeSymbol>? nestedCompletion = VisitObjectCreationInitializer(slot, symbol.GetTypeOrReturnType().Type, initializer, delayCompletionForType); 4219Symbol symbol, BoundObjectInitializerExpressionBase initializer, int slot, Action<int, TypeSymbol>? nestedCompletion, 4240Action<int, Symbol>? completeNestedInitializerAnalysisAsContinuation(BoundObjectInitializerExpressionBase initializer, Action<int, TypeSymbol>? nestedCompletion) 4301private Action<int, TypeSymbol>? VisitCollectionElementInitializer(BoundCollectionElementInitializer node, TypeSymbol containingType, bool delayCompletionForType) 4327Debug.Assert(TypeSymbol.Equals(containingType, receiverResult.RValueType.Type, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes)); 4328Debug.Assert(TypeSymbol.Equals(containingType, receiverResult.LValueType.Type, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes)); 4334Action<int, TypeSymbol>? setUpdatedSymbol( 4336TypeSymbol containingType, 4361Action<int, TypeSymbol>? setUpdatedSymbolAsContinuation( 4366return (int containingSlot, TypeSymbol containingType) => 4376static MethodSymbol addMethodAsMemberOfContainingType(BoundCollectionElementInitializer node, TypeSymbol containingType, ref ImmutableArray<VisitResult> argumentResults) 4385Debug.Assert(TypeSymbol.Equals(containingType, receiverResult.RValueType.Type, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes)); 4386Debug.Assert(TypeSymbol.Equals(containingType, receiverResult.LValueType.Type, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes)); 4423protected override bool IsEmptyStructType(TypeSymbol type) 4559var arrayType = VisitArrayInitialization(node.Type, initialization, node.HasErrors); 4564private TypeSymbol VisitArrayInitialization(TypeSymbol type, BoundArrayInitialization initialization, bool hasErrors) 4581var resultType = type; 4614TypeSymbol? bestType = null; 4669static TypeSymbol setSpanElementType(NamedTypeSymbol namedType, TypeWithAnnotations elementType) 4732TypeSymbol? bestType = BestTypeInferrer.InferBestType(placeholders, walker._conversions, ref discardedUseSiteInfo, out inferredFromFunctionType); 4799TypeSymbol.Equals(node.Indices[0].Type, compilation.GetWellKnownType(WellKnownType.System_Range), TypeCompareKind.ConsiderEverything2)) 4816var expressionType = VisitRvalueWithState(node.Expression).Type; 4835private TypeWithState InferResultNullability(BinaryOperatorKind operatorKind, MethodSymbol? methodOpt, TypeSymbol resultType, TypeWithState leftType, TypeWithState rightType) 5075TypeSymbol returnType, 5093TypeSymbol methodContainer = method.ContainingType; 5097TypeSymbol asMemberOfType = getTypeIfContainingType(methodContainer, leftUnderlyingType.Type, leftOperand) ?? 5189TypeSymbol? getTypeIfContainingType(TypeSymbol baseType, TypeSymbol? derivedType, BoundExpression operand) 5348var receiverType = conditional.Receiver.Type!; 5394private static bool PossiblyNullableType([NotNullWhen(true)] TypeSymbol? operandType) => operandType?.CanContainNull() == true; 5450private void LearnFromNullTest(int slot, TypeSymbol? expressionType, ref LocalState state, bool markDependentSlotsNotNull) 5470private void MarkDependentSlotsNotNull(int slot, TypeSymbol expressionType, ref LocalState state, int depth = 2) 5492static IEnumerable<Symbol> getMembers(TypeSymbol type) 5510static NamedTypeSymbol effectiveBase(TypeSymbol type) => type switch 5516static ImmutableArray<NamedTypeSymbol> inheritedInterfaces(TypeSymbol type) => type switch 5562TypeSymbol.Equals(targetType.Type.GetNullableUnderlyingType(), node.Type, TypeCompareKind.AllIgnoreOptions)); 5572Debug.Assert(TypeSymbol.Equals(targetType.Type, rightResult.Type, TypeCompareKind.AllIgnoreOptions)); 5615var leftResultType = leftResult.Type; 5616var rightResultType = rightResult.Type; 5632(TypeSymbol ResultType, NullableFlowState LeftState) getLeftResultType(TypeSymbol leftType, TypeSymbol rightType) 5650(TypeSymbol ResultType, NullableFlowState LeftState) getResultStateWithRightType(TypeSymbol leftType, TypeSymbol rightType) 5836TypeSymbol accessType = accessTypeWithAnnotations.Type; 5837var oldType = node.Type; 5838var resultType = 5902TypeSymbol? refResultType = node.Type?.SetUnknownNullabilityForReferenceTypes(); 5938TypeSymbol? resultType; 6163var rvalueType = _currentConditionalReceiverVisitResult.RValueType.Type; 6356static bool isWellKnownEqualityMethodOrImplementation(CSharpCompilation compilation, MethodSymbol method, TypeSymbol? receiverType, WellKnownMember wellKnownMember) 6376for (var baseType = receiverType; baseType is object && method is object; baseType = baseType.BaseTypeNoUseSiteDiagnostics) 6549var type = receiverType.Type; 7170void applyMemberPostConditions(int receiverSlot, TypeSymbol type, ImmutableArray<string> members, ref LocalState state) 7183void markMembersAsNotNull(int receiverSlot, TypeSymbol type, string memberName, ref LocalState state) 7367var argumentResultType = resultType.Type; 7455static bool hasNoNonNullableCounterpart(TypeSymbol? type) 8079private Conversion GenerateConversionForConditionalOperator(BoundExpression sourceExpression, TypeSymbol? sourceType, TypeSymbol destinationType, bool reportMismatch, bool isChecked) 8090private Conversion GenerateConversion(Conversions conversions, BoundExpression? sourceExpression, TypeSymbol? sourceType, TypeSymbol destinationType, bool fromExplicitCast, bool extensionMethodThisArgument, bool isChecked) 8168private static Symbol AsMemberOfType(TypeSymbol? type, Symbol symbol) 8381private static bool AreNullableAndUnderlyingTypes([NotNullWhen(true)] TypeSymbol? nullableTypeOpt, [NotNullWhen(true)] TypeSymbol? underlyingTypeOpt, out TypeWithAnnotations underlyingTypeWithAnnotations) 8507private void TrackNullableStateOfNullableValue(int containingSlot, TypeSymbol containingType, BoundExpression? value, TypeWithState valueType, int valueSlot) 8524TypeSymbol targetType, 8525TypeSymbol operandType, 8633private void ReportNullabilityMismatchWithTargetDelegate(Location location, TypeSymbol targetType, MethodSymbol targetInvokeMethod, MethodSymbol sourceInvokeMethod, bool invokedAsExtensionMethod) 8651void reportBadDelegateReturn(BindingDiagnosticBag bag, MethodSymbol targetInvokeMethod, MethodSymbol sourceInvokeMethod, bool topLevel, (TypeSymbol targetType, Location location) arg) 8658void reportBadDelegateParameter(BindingDiagnosticBag bag, MethodSymbol sourceInvokeMethod, MethodSymbol targetInvokeMethod, ParameterSymbol parameter, bool topLevel, (TypeSymbol targetType, Location location) arg) 8836TypeSymbol targetType = targetTypeWithNullability.Type; 8860static (MethodSymbol invokeSignature, ImmutableArray<ParameterSymbol>) getDelegateOrFunctionPointerInfo(TypeSymbol targetType) 9130static TypeWithState calculateResultType(TypeWithAnnotations targetTypeWithNullability, bool fromExplicitCast, NullableFlowState resultState, bool isSuppressed, TypeSymbol targetType) 9154var type = operandType.Type; 9185var type = operandType.Type; 9346TypeSymbol targetType = targetTypeWithNullability.Type; 9517TypeSymbol type = typeNeedsLifting ? MakeNullableOf(returnType) : returnType.Type; 9526var type = typeWithState.Type; 9542private TypeSymbol MakeNullableOf(TypeWithAnnotations underlying) 9651Debug.Assert(TypeSymbol.Equals(resultTypeWithAnnotations.Type, node.Type, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes)); 9729TypeSymbol argType = arg.Type; 9748TypeSymbol argType = arg.Type; 10609private void ReportNullabilityMismatchInRefArgument(BoundExpression argument, TypeSymbol argumentType, ParameterSymbol parameter, TypeSymbol parameterType) 10621private void ReportNullabilityMismatchInArgument(SyntaxNode argument, TypeSymbol argumentType, ParameterSymbol parameter, TypeSymbol parameterType, bool forOutput) 10626private void ReportNullabilityMismatchInArgument(Location argumentLocation, TypeSymbol argumentType, ParameterSymbol? parameterOpt, TypeSymbol parameterType, bool forOutput) 10688var receiverType = VisitRvalueWithState(receiverOpt).Type; 10823private int GetNullableOfTValueSlot(TypeSymbol containingType, int containingSlot, out Symbol? valueProperty, bool forceSlotEvenIfEmpty = false) 10826Debug.Assert(TypeSymbol.Equals(NominalSlotType(containingSlot), containingType, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes)); 10889var resultType = resultTypeWithState.Type; 10995TypeSymbol? getEnumeratorType; 11486TypeSymbol type = node.Type; 11539var type = node.Type; 11796var resultTypeSymbol = resultType.Type; 11816private bool ReportPossibleNullReceiverIfNeeded(TypeSymbol type, NullableFlowState state, bool checkNullableValueType, SyntaxNode syntax, out bool reportedDiagnostic) 11857private static bool IsNullabilityMismatch(TypeSymbol type1, TypeSymbol type2) 11944var type = VisitArrayInitialization(node.Type, initialization, node.HasErrors); 12651private sealed class NullabilityInfoTypeComparer : IEqualityComparer<(NullabilityInfo info, TypeSymbol? type)> 12655public bool Equals((NullabilityInfo info, TypeSymbol? type) x, (NullabilityInfo info, TypeSymbol? type) y) 12661public 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)
427protected BoundExpression(BoundKind kind, SyntaxNode syntax, TypeSymbol? type, bool hasErrors) 433protected BoundExpression(BoundKind kind, SyntaxNode syntax, TypeSymbol? type) 439public TypeSymbol? Type { get; } 444protected BoundValuePlaceholderBase(BoundKind kind, SyntaxNode syntax, TypeSymbol? type, bool hasErrors) 449protected BoundValuePlaceholderBase(BoundKind kind, SyntaxNode syntax, TypeSymbol? type) 458protected BoundEarlyValuePlaceholderBase(BoundKind kind, SyntaxNode syntax, TypeSymbol? type, bool hasErrors) 463protected BoundEarlyValuePlaceholderBase(BoundKind kind, SyntaxNode syntax, TypeSymbol? type) 472public BoundValuePlaceholder(SyntaxNode syntax, TypeSymbol? type, bool hasErrors) 477public BoundValuePlaceholder(SyntaxNode syntax, TypeSymbol? type) 486public BoundValuePlaceholder Update(TypeSymbol? type) 488if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 500public BoundCapturedReceiverPlaceholder(SyntaxNode syntax, BoundExpression receiver, SafeContext localScopeDepth, TypeSymbol? type, bool hasErrors = false) 516public BoundCapturedReceiverPlaceholder Update(BoundExpression receiver, SafeContext localScopeDepth, TypeSymbol? type) 518if (receiver != this.Receiver || localScopeDepth != this.LocalScopeDepth || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 530public BoundDeconstructValuePlaceholder(SyntaxNode syntax, Symbol? variableSymbol, bool isDiscardExpression, TypeSymbol type, bool hasErrors) 540public BoundDeconstructValuePlaceholder(SyntaxNode syntax, Symbol? variableSymbol, bool isDiscardExpression, TypeSymbol type) 550public new TypeSymbol Type => base.Type!; 557public BoundDeconstructValuePlaceholder Update(Symbol? variableSymbol, bool isDiscardExpression, TypeSymbol type) 559if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(variableSymbol, this.VariableSymbol) || isDiscardExpression != this.IsDiscardExpression || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 571public BoundTupleOperandPlaceholder(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 579public BoundTupleOperandPlaceholder(SyntaxNode syntax, TypeSymbol type) 587public new TypeSymbol Type => base.Type!; 592public BoundTupleOperandPlaceholder Update(TypeSymbol type) 594if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 606public BoundAwaitableValuePlaceholder(SyntaxNode syntax, TypeSymbol? type, bool hasErrors) 611public BoundAwaitableValuePlaceholder(SyntaxNode syntax, TypeSymbol? type) 616public new TypeSymbol? Type => base.Type; 621public BoundAwaitableValuePlaceholder Update(TypeSymbol? type) 623if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 635public BoundDisposableValuePlaceholder(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 643public BoundDisposableValuePlaceholder(SyntaxNode syntax, TypeSymbol type) 651public new TypeSymbol Type => base.Type!; 656public BoundDisposableValuePlaceholder Update(TypeSymbol type) 658if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 670public BoundObjectOrCollectionValuePlaceholder(SyntaxNode syntax, bool isNewInstance, TypeSymbol type, bool hasErrors) 679public BoundObjectOrCollectionValuePlaceholder(SyntaxNode syntax, bool isNewInstance, TypeSymbol type) 688public new TypeSymbol Type => base.Type!; 694public BoundObjectOrCollectionValuePlaceholder Update(bool isNewInstance, TypeSymbol type) 696if (isNewInstance != this.IsNewInstance || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 708public BoundImplicitIndexerValuePlaceholder(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 716public BoundImplicitIndexerValuePlaceholder(SyntaxNode syntax, TypeSymbol type) 724public new TypeSymbol Type => base.Type!; 729public BoundImplicitIndexerValuePlaceholder Update(TypeSymbol type) 731if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 743public BoundImplicitIndexerReceiverPlaceholder(SyntaxNode syntax, bool isEquivalentToThisReference, TypeSymbol type, bool hasErrors) 752public BoundImplicitIndexerReceiverPlaceholder(SyntaxNode syntax, bool isEquivalentToThisReference, TypeSymbol type) 761public new TypeSymbol Type => base.Type!; 767public BoundImplicitIndexerReceiverPlaceholder Update(bool isEquivalentToThisReference, TypeSymbol type) 769if (isEquivalentToThisReference != this.IsEquivalentToThisReference || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 781public BoundListPatternReceiverPlaceholder(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 789public BoundListPatternReceiverPlaceholder(SyntaxNode syntax, TypeSymbol type) 797public new TypeSymbol Type => base.Type!; 802public BoundListPatternReceiverPlaceholder Update(TypeSymbol type) 804if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 816public BoundListPatternIndexPlaceholder(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 824public BoundListPatternIndexPlaceholder(SyntaxNode syntax, TypeSymbol type) 832public new TypeSymbol Type => base.Type!; 837public BoundListPatternIndexPlaceholder Update(TypeSymbol type) 839if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 851public BoundSlicePatternReceiverPlaceholder(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 859public BoundSlicePatternReceiverPlaceholder(SyntaxNode syntax, TypeSymbol type) 867public new TypeSymbol Type => base.Type!; 872public BoundSlicePatternReceiverPlaceholder Update(TypeSymbol type) 874if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 886public BoundSlicePatternRangePlaceholder(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 894public BoundSlicePatternRangePlaceholder(SyntaxNode syntax, TypeSymbol type) 902public new TypeSymbol Type => base.Type!; 907public BoundSlicePatternRangePlaceholder Update(TypeSymbol type) 909if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 921public BoundDup(SyntaxNode syntax, RefKind refKind, TypeSymbol? type, bool hasErrors) 927public BoundDup(SyntaxNode syntax, RefKind refKind, TypeSymbol? type) 938public BoundDup Update(RefKind refKind, TypeSymbol? type) 940if (refKind != this.RefKind || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 952public BoundPassByCopy(SyntaxNode syntax, BoundExpression expression, TypeSymbol? type, bool hasErrors = false) 966public BoundPassByCopy Update(BoundExpression expression, TypeSymbol? type) 968if (expression != this.Expression || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 980public BoundBadExpression(SyntaxNode syntax, LookupResultKind resultKind, ImmutableArray<Symbol?> symbols, ImmutableArray<BoundExpression> childBoundNodes, TypeSymbol? type, bool hasErrors = false) 999public BoundBadExpression Update(LookupResultKind resultKind, ImmutableArray<Symbol?> symbols, ImmutableArray<BoundExpression> childBoundNodes, TypeSymbol? type) 1001if (resultKind != this.ResultKind || symbols != this.Symbols || childBoundNodes != this.ChildBoundNodes || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1069public BoundTypeExpression(SyntaxNode syntax, AliasSymbol? aliasOpt, BoundTypeExpression? boundContainingTypeOpt, ImmutableArray<BoundExpression> boundDimensionsOpt, TypeWithAnnotations typeWithAnnotations, TypeSymbol type, bool hasErrors = false) 1084public new TypeSymbol Type => base.Type!; 1090public BoundTypeExpression Update(AliasSymbol? aliasOpt, BoundTypeExpression? boundContainingTypeOpt, ImmutableArray<BoundExpression> boundDimensionsOpt, TypeWithAnnotations typeWithAnnotations, TypeSymbol type) 1092if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(aliasOpt, this.AliasOpt) || boundContainingTypeOpt != this.BoundContainingTypeOpt || boundDimensionsOpt != this.BoundDimensionsOpt || typeWithAnnotations != this.TypeWithAnnotations || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1104public BoundTypeOrValueExpression(SyntaxNode syntax, BoundTypeOrValueData data, TypeSymbol type, bool hasErrors) 1113public BoundTypeOrValueExpression(SyntaxNode syntax, BoundTypeOrValueData data, TypeSymbol type) 1122public new TypeSymbol Type => base.Type!; 1128public BoundTypeOrValueExpression Update(BoundTypeOrValueData data, TypeSymbol type) 1130if (data != this.Data || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1162public new TypeSymbol? Type => base.Type; 1183public BoundUnaryOperator(SyntaxNode syntax, UnaryOperatorKind operatorKind, BoundExpression operand, ConstantValue? constantValueOpt, MethodSymbol? methodOpt, TypeSymbol? constrainedToTypeOpt, LookupResultKind resultKind, ImmutableArray<MethodSymbol> originalUserDefinedOperatorsOpt, TypeSymbol type, bool hasErrors = false) 1199public new TypeSymbol Type => base.Type!; 1204public TypeSymbol? ConstrainedToTypeOpt { get; } 1211public BoundUnaryOperator Update(UnaryOperatorKind operatorKind, BoundExpression operand, ConstantValue? constantValueOpt, MethodSymbol? methodOpt, TypeSymbol? constrainedToTypeOpt, LookupResultKind resultKind, ImmutableArray<MethodSymbol> originalUserDefinedOperatorsOpt, TypeSymbol type) 1213if (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)) 1225public 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) 1244public new TypeSymbol Type => base.Type!; 1248public TypeSymbol? ConstrainedToTypeOpt { get; } 1259public 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) 1261if (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)) 1273public BoundAddressOfOperator(SyntaxNode syntax, BoundExpression operand, bool isManaged, TypeSymbol type, bool hasErrors = false) 1284public new TypeSymbol Type => base.Type!; 1291public BoundAddressOfOperator Update(BoundExpression operand, bool isManaged, TypeSymbol type) 1293if (operand != this.Operand || isManaged != this.IsManaged || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1315public new TypeSymbol? Type => base.Type; 1334public BoundFunctionPointerLoad(SyntaxNode syntax, MethodSymbol targetMethod, TypeSymbol? constrainedToTypeOpt, TypeSymbol type, bool hasErrors) 1345public BoundFunctionPointerLoad(SyntaxNode syntax, MethodSymbol targetMethod, TypeSymbol? constrainedToTypeOpt, TypeSymbol type) 1357public TypeSymbol? ConstrainedToTypeOpt { get; } 1358public new TypeSymbol Type => base.Type!; 1363public BoundFunctionPointerLoad Update(MethodSymbol targetMethod, TypeSymbol? constrainedToTypeOpt, TypeSymbol type) 1365if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(targetMethod, this.TargetMethod) || !TypeSymbol.Equals(constrainedToTypeOpt, this.ConstrainedToTypeOpt, TypeCompareKind.ConsiderEverything) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1377public BoundPointerIndirectionOperator(SyntaxNode syntax, BoundExpression operand, bool refersToLocation, TypeSymbol type, bool hasErrors = false) 1388public new TypeSymbol Type => base.Type!; 1395public BoundPointerIndirectionOperator Update(BoundExpression operand, bool refersToLocation, TypeSymbol type) 1397if (operand != this.Operand || refersToLocation != this.RefersToLocation || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1409public BoundPointerElementAccess(SyntaxNode syntax, BoundExpression expression, BoundExpression index, bool @checked, bool refersToLocation, TypeSymbol type, bool hasErrors = false) 1423public new TypeSymbol Type => base.Type!; 1432public BoundPointerElementAccess Update(BoundExpression expression, BoundExpression index, bool @checked, bool refersToLocation, TypeSymbol type) 1434if (expression != this.Expression || index != this.Index || @checked != this.Checked || refersToLocation != this.RefersToLocation || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1446public BoundFunctionPointerInvocation(SyntaxNode syntax, BoundExpression invokedExpression, ImmutableArray<BoundExpression> arguments, ImmutableArray<RefKind> argumentRefKindsOpt, LookupResultKind resultKind, TypeSymbol type, bool hasErrors = false) 1460public new TypeSymbol Type => base.Type!; 1469public BoundFunctionPointerInvocation Update(BoundExpression invokedExpression, ImmutableArray<BoundExpression> arguments, ImmutableArray<RefKind> argumentRefKindsOpt, LookupResultKind resultKind, TypeSymbol type) 1471if (invokedExpression != this.InvokedExpression || arguments != this.Arguments || argumentRefKindsOpt != this.ArgumentRefKindsOpt || resultKind != this.ResultKind || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1483public BoundRefTypeOperator(SyntaxNode syntax, BoundExpression operand, MethodSymbol? getTypeFromHandle, TypeSymbol type, bool hasErrors = false) 1494public new TypeSymbol Type => base.Type!; 1501public BoundRefTypeOperator Update(BoundExpression operand, MethodSymbol? getTypeFromHandle, TypeSymbol type) 1503if (operand != this.Operand || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(getTypeFromHandle, this.GetTypeFromHandle) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1515public BoundMakeRefOperator(SyntaxNode syntax, BoundExpression operand, TypeSymbol type, bool hasErrors = false) 1525public new TypeSymbol Type => base.Type!; 1531public BoundMakeRefOperator Update(BoundExpression operand, TypeSymbol type) 1533if (operand != this.Operand || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1545public BoundRefValueOperator(SyntaxNode syntax, NullableAnnotation nullableAnnotation, BoundExpression operand, TypeSymbol type, bool hasErrors = false) 1556public new TypeSymbol Type => base.Type!; 1563public BoundRefValueOperator Update(NullableAnnotation nullableAnnotation, BoundExpression operand, TypeSymbol type) 1565if (nullableAnnotation != this.NullableAnnotation || operand != this.Operand || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1577public BoundFromEndIndexExpression(SyntaxNode syntax, BoundExpression operand, MethodSymbol? methodOpt, TypeSymbol type, bool hasErrors = false) 1588public new TypeSymbol Type => base.Type!; 1595public BoundFromEndIndexExpression Update(BoundExpression operand, MethodSymbol? methodOpt, TypeSymbol type) 1597if (operand != this.Operand || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(methodOpt, this.MethodOpt) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1609public BoundRangeExpression(SyntaxNode syntax, BoundExpression? leftOperandOpt, BoundExpression? rightOperandOpt, MethodSymbol? methodOpt, TypeSymbol type, bool hasErrors = false) 1620public new TypeSymbol Type => base.Type!; 1628public BoundRangeExpression Update(BoundExpression? leftOperandOpt, BoundExpression? rightOperandOpt, MethodSymbol? methodOpt, TypeSymbol type) 1630if (leftOperandOpt != this.LeftOperandOpt || rightOperandOpt != this.RightOperandOpt || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(methodOpt, this.MethodOpt) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1642protected BoundBinaryOperatorBase(BoundKind kind, SyntaxNode syntax, BoundExpression left, BoundExpression right, TypeSymbol type, bool hasErrors = false) 1654public new TypeSymbol Type => base.Type!; 1661public BoundBinaryOperator(SyntaxNode syntax, BinaryOperatorKind operatorKind, BoundBinaryOperator.UncommonData? data, LookupResultKind resultKind, BoundExpression left, BoundExpression right, TypeSymbol type, bool hasErrors = false) 1681public BoundBinaryOperator Update(BinaryOperatorKind operatorKind, BoundBinaryOperator.UncommonData? data, LookupResultKind resultKind, BoundExpression left, BoundExpression right, TypeSymbol type) 1683if (operatorKind != this.OperatorKind || data != this.Data || resultKind != this.ResultKind || left != this.Left || right != this.Right || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1695public BoundTupleBinaryOperator(SyntaxNode syntax, BoundExpression left, BoundExpression right, BinaryOperatorKind operatorKind, TupleBinaryOperatorInfo.Multiple operators, TypeSymbol type, bool hasErrors = false) 1710public new TypeSymbol Type => base.Type!; 1719public BoundTupleBinaryOperator Update(BoundExpression left, BoundExpression right, BinaryOperatorKind operatorKind, TupleBinaryOperatorInfo.Multiple operators, TypeSymbol type) 1721if (left != this.Left || right != this.Right || operatorKind != this.OperatorKind || operators != this.Operators || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1733public BoundUserDefinedConditionalLogicalOperator(SyntaxNode syntax, BinaryOperatorKind operatorKind, MethodSymbol logicalOperator, MethodSymbol trueOperator, MethodSymbol falseOperator, TypeSymbol? constrainedToTypeOpt, LookupResultKind resultKind, ImmutableArray<MethodSymbol> originalUserDefinedOperatorsOpt, BoundExpression left, BoundExpression right, TypeSymbol type, bool hasErrors = false) 1757public TypeSymbol? ConstrainedToTypeOpt { get; } 1764public BoundUserDefinedConditionalLogicalOperator Update(BinaryOperatorKind operatorKind, MethodSymbol logicalOperator, MethodSymbol trueOperator, MethodSymbol falseOperator, TypeSymbol? constrainedToTypeOpt, LookupResultKind resultKind, ImmutableArray<MethodSymbol> originalUserDefinedOperatorsOpt, BoundExpression left, BoundExpression right, TypeSymbol type) 1766if (operatorKind != this.OperatorKind || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(logicalOperator, this.LogicalOperator) || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(trueOperator, this.TrueOperator) || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(falseOperator, this.FalseOperator) || !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)) 1778public 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) 1797public new TypeSymbol Type => base.Type!; 1811public BoundCompoundAssignmentOperator Update(BinaryOperatorSignature @operator, BoundExpression left, BoundExpression right, BoundValuePlaceholder? leftPlaceholder, BoundExpression? leftConversion, BoundValuePlaceholder? finalPlaceholder, BoundExpression? finalConversion, LookupResultKind resultKind, ImmutableArray<MethodSymbol> originalUserDefinedOperatorsOpt, TypeSymbol type) 1813if (@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)) 1825public BoundAssignmentOperator(SyntaxNode syntax, BoundExpression left, BoundExpression right, bool isRef, TypeSymbol type, bool hasErrors = false) 1837public new TypeSymbol Type => base.Type!; 1845public BoundAssignmentOperator Update(BoundExpression left, BoundExpression right, bool isRef, TypeSymbol type) 1847if (left != this.Left || right != this.Right || isRef != this.IsRef || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1859public BoundDeconstructionAssignmentOperator(SyntaxNode syntax, BoundTupleExpression left, BoundConversion right, bool isUsed, TypeSymbol type, bool hasErrors = false) 1872public new TypeSymbol Type => base.Type!; 1880public BoundDeconstructionAssignmentOperator Update(BoundTupleExpression left, BoundConversion right, bool isUsed, TypeSymbol type) 1882if (left != this.Left || right != this.Right || isUsed != this.IsUsed || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1894public BoundNullCoalescingOperator(SyntaxNode syntax, BoundExpression leftOperand, BoundExpression rightOperand, BoundValuePlaceholder? leftPlaceholder, BoundExpression? leftConversion, BoundNullCoalescingOperatorResultKind operatorResultKind, bool @checked, TypeSymbol type, bool hasErrors = false) 1910public new TypeSymbol Type => base.Type!; 1921public BoundNullCoalescingOperator Update(BoundExpression leftOperand, BoundExpression rightOperand, BoundValuePlaceholder? leftPlaceholder, BoundExpression? leftConversion, BoundNullCoalescingOperatorResultKind operatorResultKind, bool @checked, TypeSymbol type) 1923if (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)) 1935public BoundNullCoalescingAssignmentOperator(SyntaxNode syntax, BoundExpression leftOperand, BoundExpression rightOperand, TypeSymbol? type, bool hasErrors = false) 1952public BoundNullCoalescingAssignmentOperator Update(BoundExpression leftOperand, BoundExpression rightOperand, TypeSymbol? type) 1954if (leftOperand != this.LeftOperand || rightOperand != this.RightOperand || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1981public new TypeSymbol? Type => base.Type; 2005public BoundConditionalOperator(SyntaxNode syntax, bool isRef, BoundExpression condition, BoundExpression consequence, BoundExpression alternative, ConstantValue? constantValueOpt, TypeSymbol? naturalTypeOpt, bool wasTargetTyped, TypeSymbol type, bool hasErrors = false) 2023public new TypeSymbol Type => base.Type!; 2029public TypeSymbol? NaturalTypeOpt { get; } 2035public BoundConditionalOperator Update(bool isRef, BoundExpression condition, BoundExpression consequence, BoundExpression alternative, ConstantValue? constantValueOpt, TypeSymbol? naturalTypeOpt, bool wasTargetTyped, TypeSymbol type) 2037if (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)) 2049public BoundArrayAccess(SyntaxNode syntax, BoundExpression expression, ImmutableArray<BoundExpression> indices, TypeSymbol type, bool hasErrors = false) 2061public new TypeSymbol Type => base.Type!; 2068public BoundArrayAccess Update(BoundExpression expression, ImmutableArray<BoundExpression> indices, TypeSymbol type) 2070if (expression != this.Expression || indices != this.Indices || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2091public new TypeSymbol? Type => base.Type; 2111public BoundArrayLength(SyntaxNode syntax, BoundExpression expression, TypeSymbol type, bool hasErrors = false) 2121public new TypeSymbol Type => base.Type!; 2127public BoundArrayLength Update(BoundExpression expression, TypeSymbol type) 2129if (expression != this.Expression || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2174public BoundAwaitExpression(SyntaxNode syntax, BoundExpression expression, BoundAwaitableInfo awaitableInfo, BoundAwaitExpressionDebugInfo debugInfo, TypeSymbol type, bool hasErrors = false) 2187public new TypeSymbol Type => base.Type!; 2195public BoundAwaitExpression Update(BoundExpression expression, BoundAwaitableInfo awaitableInfo, BoundAwaitExpressionDebugInfo debugInfo, TypeSymbol type) 2197if (expression != this.Expression || awaitableInfo != this.AwaitableInfo || debugInfo != this.DebugInfo || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2209protected BoundTypeOf(BoundKind kind, SyntaxNode syntax, MethodSymbol? getTypeFromHandle, TypeSymbol type, bool hasErrors) 2218protected BoundTypeOf(BoundKind kind, SyntaxNode syntax, MethodSymbol? getTypeFromHandle, TypeSymbol type) 2227public new TypeSymbol Type => base.Type!; 2233public BoundTypeOfOperator(SyntaxNode syntax, BoundTypeExpression sourceType, MethodSymbol? getTypeFromHandle, TypeSymbol type, bool hasErrors = false) 2248public BoundTypeOfOperator Update(BoundTypeExpression sourceType, MethodSymbol? getTypeFromHandle, TypeSymbol type) 2250if (sourceType != this.SourceType || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(getTypeFromHandle, this.GetTypeFromHandle) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2294public BoundMethodDefIndex(SyntaxNode syntax, MethodSymbol method, TypeSymbol type, bool hasErrors) 2304public BoundMethodDefIndex(SyntaxNode syntax, MethodSymbol method, TypeSymbol type) 2314public new TypeSymbol Type => base.Type!; 2320public BoundMethodDefIndex Update(MethodSymbol method, TypeSymbol type) 2322if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(method, this.Method) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2334public BoundLocalId(SyntaxNode syntax, LocalSymbol local, FieldSymbol? hoistedField, TypeSymbol type, bool hasErrors) 2345public BoundLocalId(SyntaxNode syntax, LocalSymbol local, FieldSymbol? hoistedField, TypeSymbol type) 2356public new TypeSymbol Type => base.Type!; 2363public BoundLocalId Update(LocalSymbol local, FieldSymbol? hoistedField, TypeSymbol type) 2365if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(local, this.Local) || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(hoistedField, this.HoistedField) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2377public BoundParameterId(SyntaxNode syntax, ParameterSymbol parameter, FieldSymbol? hoistedField, TypeSymbol type, bool hasErrors) 2388public BoundParameterId(SyntaxNode syntax, ParameterSymbol parameter, FieldSymbol? hoistedField, TypeSymbol type) 2399public new TypeSymbol Type => base.Type!; 2406public BoundParameterId Update(ParameterSymbol parameter, FieldSymbol? hoistedField, TypeSymbol type) 2408if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(parameter, this.Parameter) || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(hoistedField, this.HoistedField) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2420public BoundStateMachineInstanceId(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 2428public BoundStateMachineInstanceId(SyntaxNode syntax, TypeSymbol type) 2436public new TypeSymbol Type => base.Type!; 2441public BoundStateMachineInstanceId Update(TypeSymbol type) 2443if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2455public BoundMaximumMethodDefIndex(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 2463public BoundMaximumMethodDefIndex(SyntaxNode syntax, TypeSymbol type) 2471public new TypeSymbol Type => base.Type!; 2476public BoundMaximumMethodDefIndex Update(TypeSymbol type) 2478if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2490public BoundInstrumentationPayloadRoot(SyntaxNode syntax, int analysisKind, TypeSymbol type, bool hasErrors) 2499public BoundInstrumentationPayloadRoot(SyntaxNode syntax, int analysisKind, TypeSymbol type) 2509public new TypeSymbol Type => base.Type!; 2514public BoundInstrumentationPayloadRoot Update(int analysisKind, TypeSymbol type) 2516if (analysisKind != this.AnalysisKind || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2528public BoundThrowIfModuleCancellationRequested(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 2536public BoundThrowIfModuleCancellationRequested(SyntaxNode syntax, TypeSymbol type) 2544public new TypeSymbol Type => base.Type!; 2549public BoundThrowIfModuleCancellationRequested Update(TypeSymbol type) 2551if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2563public ModuleCancellationTokenExpression(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 2571public ModuleCancellationTokenExpression(SyntaxNode syntax, TypeSymbol type) 2579public new TypeSymbol Type => base.Type!; 2584public ModuleCancellationTokenExpression Update(TypeSymbol type) 2586if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2598public BoundModuleVersionId(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 2606public BoundModuleVersionId(SyntaxNode syntax, TypeSymbol type) 2614public new TypeSymbol Type => base.Type!; 2619public BoundModuleVersionId Update(TypeSymbol type) 2621if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2633public BoundModuleVersionIdString(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 2641public BoundModuleVersionIdString(SyntaxNode syntax, TypeSymbol type) 2649public new TypeSymbol Type => base.Type!; 2654public BoundModuleVersionIdString Update(TypeSymbol type) 2656if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2668public BoundSourceDocumentIndex(SyntaxNode syntax, Cci.DebugSourceDocument document, TypeSymbol type, bool hasErrors) 2678public BoundSourceDocumentIndex(SyntaxNode syntax, Cci.DebugSourceDocument document, TypeSymbol type) 2688public new TypeSymbol Type => base.Type!; 2694public BoundSourceDocumentIndex Update(Cci.DebugSourceDocument document, TypeSymbol type) 2696if (document != this.Document || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2708public BoundMethodInfo(SyntaxNode syntax, MethodSymbol method, MethodSymbol? getMethodFromHandle, TypeSymbol type, bool hasErrors) 2719public BoundMethodInfo(SyntaxNode syntax, MethodSymbol method, MethodSymbol? getMethodFromHandle, TypeSymbol type) 2730public new TypeSymbol Type => base.Type!; 2737public BoundMethodInfo Update(MethodSymbol method, MethodSymbol? getMethodFromHandle, TypeSymbol type) 2739if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(method, this.Method) || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(getMethodFromHandle, this.GetMethodFromHandle) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2751public BoundFieldInfo(SyntaxNode syntax, FieldSymbol field, MethodSymbol? getFieldFromHandle, TypeSymbol type, bool hasErrors) 2762public BoundFieldInfo(SyntaxNode syntax, FieldSymbol field, MethodSymbol? getFieldFromHandle, TypeSymbol type) 2773public new TypeSymbol Type => base.Type!; 2780public BoundFieldInfo Update(FieldSymbol field, MethodSymbol? getFieldFromHandle, TypeSymbol type) 2782if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(field, this.Field) || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(getFieldFromHandle, this.GetFieldFromHandle) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2804public new TypeSymbol? Type => base.Type; 2817public BoundDefaultExpression(SyntaxNode syntax, BoundTypeExpression? targetType, ConstantValue? constantValueOpt, TypeSymbol type, bool hasErrors = false) 2827public new TypeSymbol Type => base.Type!; 2834public BoundDefaultExpression Update(BoundTypeExpression? targetType, ConstantValue? constantValueOpt, TypeSymbol type) 2836if (targetType != this.TargetType || constantValueOpt != this.ConstantValueOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2848public BoundIsOperator(SyntaxNode syntax, BoundExpression operand, BoundTypeExpression targetType, ConversionKind conversionKind, TypeSymbol type, bool hasErrors = false) 2861public new TypeSymbol Type => base.Type!; 2869public BoundIsOperator Update(BoundExpression operand, BoundTypeExpression targetType, ConversionKind conversionKind, TypeSymbol type) 2871if (operand != this.Operand || targetType != this.TargetType || conversionKind != this.ConversionKind || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2883public BoundAsOperator(SyntaxNode syntax, BoundExpression operand, BoundTypeExpression targetType, BoundValuePlaceholder? operandPlaceholder, BoundExpression? operandConversion, TypeSymbol type, bool hasErrors = false) 2897public new TypeSymbol Type => base.Type!; 2906public BoundAsOperator Update(BoundExpression operand, BoundTypeExpression targetType, BoundValuePlaceholder? operandPlaceholder, BoundExpression? operandConversion, TypeSymbol type) 2908if (operand != this.Operand || targetType != this.TargetType || operandPlaceholder != this.OperandPlaceholder || operandConversion != this.OperandConversion || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2920public BoundSizeOfOperator(SyntaxNode syntax, BoundTypeExpression sourceType, ConstantValue? constantValueOpt, TypeSymbol type, bool hasErrors = false) 2931public new TypeSymbol Type => base.Type!; 2938public BoundSizeOfOperator Update(BoundTypeExpression sourceType, ConstantValue? constantValueOpt, TypeSymbol type) 2940if (sourceType != this.SourceType || constantValueOpt != this.ConstantValueOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2952public BoundConversion(SyntaxNode syntax, BoundExpression operand, Conversion conversion, bool isBaseConversion, bool @checked, bool explicitCastInCode, ConstantValue? constantValueOpt, ConversionGroup? conversionGroupOpt, ImmutableArray<MethodSymbol> originalUserDefinedConversionsOpt, TypeSymbol type, bool hasErrors = false) 2969public new TypeSymbol Type => base.Type!; 2982public BoundConversion Update(BoundExpression operand, Conversion conversion, bool isBaseConversion, bool @checked, bool explicitCastInCode, ConstantValue? constantValueOpt, ConversionGroup? conversionGroupOpt, ImmutableArray<MethodSymbol> originalUserDefinedConversionsOpt, TypeSymbol type) 2984if (operand != this.Operand || conversion != this.Conversion || isBaseConversion != this.IsBaseConversion || @checked != this.Checked || explicitCastInCode != this.ExplicitCastInCode || constantValueOpt != this.ConstantValueOpt || conversionGroupOpt != this.ConversionGroupOpt || originalUserDefinedConversionsOpt != this.OriginalUserDefinedConversionsOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2996public BoundReadOnlySpanFromArray(SyntaxNode syntax, BoundExpression operand, MethodSymbol conversionMethod, TypeSymbol type, bool hasErrors = false) 3008public new TypeSymbol Type => base.Type!; 3015public BoundReadOnlySpanFromArray Update(BoundExpression operand, MethodSymbol conversionMethod, TypeSymbol type) 3017if (operand != this.Operand || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(conversionMethod, this.ConversionMethod) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 3029public BoundArgList(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 3037public BoundArgList(SyntaxNode syntax, TypeSymbol type) 3045public new TypeSymbol Type => base.Type!; 3050public BoundArgList Update(TypeSymbol type) 3052if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 3064public BoundArgListOperator(SyntaxNode syntax, ImmutableArray<BoundExpression> arguments, ImmutableArray<RefKind> argumentRefKindsOpt, TypeSymbol? type, bool hasErrors = false) 3074public new TypeSymbol? Type => base.Type; 3081public BoundArgListOperator Update(ImmutableArray<BoundExpression> arguments, ImmutableArray<RefKind> argumentRefKindsOpt, TypeSymbol? type) 3083if (arguments != this.Arguments || argumentRefKindsOpt != this.ArgumentRefKindsOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 3095public BoundFixedLocalCollectionInitializer(SyntaxNode syntax, TypeSymbol elementPointerType, BoundValuePlaceholder? elementPointerPlaceholder, BoundExpression? elementPointerConversion, BoundExpression expression, MethodSymbol? getPinnableOpt, TypeSymbol type, bool hasErrors = false) 3110public new TypeSymbol Type => base.Type!; 3111public TypeSymbol ElementPointerType { get; } 3120public BoundFixedLocalCollectionInitializer Update(TypeSymbol elementPointerType, BoundValuePlaceholder? elementPointerPlaceholder, BoundExpression? elementPointerConversion, BoundExpression expression, MethodSymbol? getPinnableOpt, TypeSymbol type) 3122if (!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)) 4260public BoundCatchBlock(SyntaxNode syntax, ImmutableArray<LocalSymbol> locals, BoundExpression? exceptionSourceOpt, TypeSymbol? exceptionTypeOpt, BoundStatementList? exceptionFilterPrologueOpt, BoundExpression? exceptionFilterOpt, BoundBlock body, bool isSynthesizedAsyncCatchAll, bool hasErrors = false) 4278public TypeSymbol? ExceptionTypeOpt { get; } 4287public BoundCatchBlock Update(ImmutableArray<LocalSymbol> locals, BoundExpression? exceptionSourceOpt, TypeSymbol? exceptionTypeOpt, BoundStatementList? exceptionFilterPrologueOpt, BoundExpression? exceptionFilterOpt, BoundBlock body, bool isSynthesizedAsyncCatchAll) 4289if (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) 4301public BoundLiteral(SyntaxNode syntax, ConstantValue? constantValueOpt, TypeSymbol? type, bool hasErrors) 4307public BoundLiteral(SyntaxNode syntax, ConstantValue? constantValueOpt, TypeSymbol? type) 4318public BoundLiteral Update(ConstantValue? constantValueOpt, TypeSymbol? type) 4320if (constantValueOpt != this.ConstantValueOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 4332public BoundUtf8String(SyntaxNode syntax, string value, TypeSymbol type, bool hasErrors) 4342public BoundUtf8String(SyntaxNode syntax, string value, TypeSymbol type) 4352public new TypeSymbol Type => base.Type!; 4358public BoundUtf8String Update(string value, TypeSymbol type) 4360if (value != this.Value || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 4372public BoundThisReference(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 4380public BoundThisReference(SyntaxNode syntax, TypeSymbol type) 4388public new TypeSymbol Type => base.Type!; 4393public BoundThisReference Update(TypeSymbol type) 4395if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 4407public BoundPreviousSubmissionReference(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 4415public BoundPreviousSubmissionReference(SyntaxNode syntax, TypeSymbol type) 4423public new TypeSymbol Type => base.Type!; 4428public BoundPreviousSubmissionReference Update(TypeSymbol type) 4430if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 4442public BoundHostObjectMemberReference(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 4450public BoundHostObjectMemberReference(SyntaxNode syntax, TypeSymbol type) 4458public new TypeSymbol Type => base.Type!; 4463public BoundHostObjectMemberReference Update(TypeSymbol type) 4465if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 4477public BoundBaseReference(SyntaxNode syntax, TypeSymbol? type, bool hasErrors) 4482public BoundBaseReference(SyntaxNode syntax, TypeSymbol? type) 4487public new TypeSymbol? Type => base.Type; 4492public BoundBaseReference Update(TypeSymbol? type) 4494if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 4506public BoundLocal(SyntaxNode syntax, LocalSymbol localSymbol, BoundLocalDeclarationKind declarationKind, ConstantValue? constantValueOpt, bool isNullableUnknown, TypeSymbol type, bool hasErrors) 4519public BoundLocal(SyntaxNode syntax, LocalSymbol localSymbol, BoundLocalDeclarationKind declarationKind, ConstantValue? constantValueOpt, bool isNullableUnknown, TypeSymbol type) 4532public new TypeSymbol Type => base.Type!; 4541public BoundLocal Update(LocalSymbol localSymbol, BoundLocalDeclarationKind declarationKind, ConstantValue? constantValueOpt, bool isNullableUnknown, TypeSymbol type) 4543if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(localSymbol, this.LocalSymbol) || declarationKind != this.DeclarationKind || constantValueOpt != this.ConstantValueOpt || isNullableUnknown != this.IsNullableUnknown || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 4555public BoundPseudoVariable(SyntaxNode syntax, LocalSymbol localSymbol, PseudoVariableExpressions emitExpressions, TypeSymbol type, bool hasErrors) 4567public BoundPseudoVariable(SyntaxNode syntax, LocalSymbol localSymbol, PseudoVariableExpressions emitExpressions, TypeSymbol type) 4579public new TypeSymbol Type => base.Type!; 4586public BoundPseudoVariable Update(LocalSymbol localSymbol, PseudoVariableExpressions emitExpressions, TypeSymbol type) 4588if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(localSymbol, this.LocalSymbol) || emitExpressions != this.EmitExpressions || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 4600public BoundRangeVariable(SyntaxNode syntax, RangeVariableSymbol rangeVariableSymbol, BoundExpression value, TypeSymbol type, bool hasErrors = false) 4612public new TypeSymbol Type => base.Type!; 4619public BoundRangeVariable Update(RangeVariableSymbol rangeVariableSymbol, BoundExpression value, TypeSymbol type) 4621if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(rangeVariableSymbol, this.RangeVariableSymbol) || value != this.Value || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 4633public BoundParameter(SyntaxNode syntax, ParameterSymbol parameterSymbol, TypeSymbol type, bool hasErrors) 4643public BoundParameter(SyntaxNode syntax, ParameterSymbol parameterSymbol, TypeSymbol type) 4653public new TypeSymbol Type => base.Type!; 4659public BoundParameter Update(ParameterSymbol parameterSymbol, TypeSymbol type) 4661if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(parameterSymbol, this.ParameterSymbol) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 4773public BoundLabel(SyntaxNode syntax, LabelSymbol label, TypeSymbol? type, bool hasErrors) 4782public BoundLabel(SyntaxNode syntax, LabelSymbol label, TypeSymbol? type) 4796public BoundLabel Update(LabelSymbol label, TypeSymbol? type) 4798if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(label, this.Label) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 4880protected BoundSwitchExpression(BoundKind kind, SyntaxNode syntax, BoundExpression expression, ImmutableArray<BoundSwitchExpressionArm> switchArms, BoundDecisionDag reachabilityDecisionDag, LabelSymbol? defaultLabel, bool reportedNotExhaustive, TypeSymbol? type, bool hasErrors = false) 4943public BoundUnconvertedSwitchExpression(SyntaxNode syntax, BoundExpression expression, ImmutableArray<BoundSwitchExpressionArm> switchArms, BoundDecisionDag reachabilityDecisionDag, LabelSymbol? defaultLabel, bool reportedNotExhaustive, TypeSymbol? type, bool hasErrors = false) 4957public BoundUnconvertedSwitchExpression Update(BoundExpression expression, ImmutableArray<BoundSwitchExpressionArm> switchArms, BoundDecisionDag reachabilityDecisionDag, LabelSymbol? defaultLabel, bool reportedNotExhaustive, TypeSymbol? type) 4959if (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)) 4971public BoundConvertedSwitchExpression(SyntaxNode syntax, TypeSymbol? naturalTypeOpt, bool wasTargetTyped, BoundExpression expression, ImmutableArray<BoundSwitchExpressionArm> switchArms, BoundDecisionDag reachabilityDecisionDag, LabelSymbol? defaultLabel, bool reportedNotExhaustive, TypeSymbol type, bool hasErrors = false) 4984public new TypeSymbol Type => base.Type!; 4985public TypeSymbol? NaturalTypeOpt { get; } 4991public BoundConvertedSwitchExpression Update(TypeSymbol? naturalTypeOpt, bool wasTargetTyped, BoundExpression expression, ImmutableArray<BoundSwitchExpressionArm> switchArms, BoundDecisionDag reachabilityDecisionDag, LabelSymbol? defaultLabel, bool reportedNotExhaustive, TypeSymbol type) 4993if (!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)) 5198public BoundDagTemp(SyntaxNode syntax, TypeSymbol type, BoundDagEvaluation? source, int index, bool hasErrors = false) 5209public TypeSymbol Type { get; } 5216public BoundDagTemp Update(TypeSymbol type, BoundDagEvaluation? source, int index) 5218if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything) || source != this.Source || index != this.Index) 5230public BoundDagTypeTest(SyntaxNode syntax, TypeSymbol type, BoundDagTemp input, bool hasErrors = false) 5240public TypeSymbol Type { get; } 5245public BoundDagTypeTest Update(TypeSymbol type, BoundDagTemp input) 5247if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything) || input != this.Input) 5414public BoundDagTypeEvaluation(SyntaxNode syntax, TypeSymbol type, BoundDagTemp input, bool hasErrors = false) 5424public TypeSymbol Type { get; } 5429public BoundDagTypeEvaluation Update(TypeSymbol type, BoundDagTemp input) 5431if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything) || input != this.Input) 5534public BoundDagIndexerEvaluation(SyntaxNode syntax, TypeSymbol indexerType, BoundDagTemp lengthTemp, int index, BoundExpression indexerAccess, BoundListPatternReceiverPlaceholder receiverPlaceholder, BoundListPatternIndexPlaceholder argumentPlaceholder, BoundDagTemp input, bool hasErrors = false) 5557public TypeSymbol IndexerType { get; } 5567public BoundDagIndexerEvaluation Update(TypeSymbol indexerType, BoundDagTemp lengthTemp, int index, BoundExpression indexerAccess, BoundListPatternReceiverPlaceholder receiverPlaceholder, BoundListPatternIndexPlaceholder argumentPlaceholder, BoundDagTemp input) 5569if (!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) 5581public BoundDagSliceEvaluation(SyntaxNode syntax, TypeSymbol sliceType, BoundDagTemp lengthTemp, int startIndex, int endIndex, BoundExpression indexerAccess, BoundSlicePatternReceiverPlaceholder receiverPlaceholder, BoundSlicePatternRangePlaceholder argumentPlaceholder, BoundDagTemp input, bool hasErrors = false) 5605public TypeSymbol SliceType { get; } 5616public BoundDagSliceEvaluation Update(TypeSymbol sliceType, BoundDagTemp lengthTemp, int startIndex, int endIndex, BoundExpression indexerAccess, BoundSlicePatternReceiverPlaceholder receiverPlaceholder, BoundSlicePatternRangePlaceholder argumentPlaceholder, BoundDagTemp input) 5618if (!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) 5731public new TypeSymbol? Type => base.Type; 5738public BoundSequencePointExpression(SyntaxNode syntax, BoundExpression expression, TypeSymbol? type, bool hasErrors = false) 5752public BoundSequencePointExpression Update(BoundExpression expression, TypeSymbol? type) 5754if (expression != this.Expression || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 5766public BoundSequence(SyntaxNode syntax, ImmutableArray<LocalSymbol> locals, ImmutableArray<BoundExpression> sideEffects, BoundExpression value, TypeSymbol type, bool hasErrors = false) 5780public new TypeSymbol Type => base.Type!; 5788public BoundSequence Update(ImmutableArray<LocalSymbol> locals, ImmutableArray<BoundExpression> sideEffects, BoundExpression value, TypeSymbol type) 5790if (locals != this.Locals || sideEffects != this.SideEffects || value != this.Value || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 5802public BoundSpillSequence(SyntaxNode syntax, ImmutableArray<LocalSymbol> locals, ImmutableArray<BoundStatement> sideEffects, BoundExpression value, TypeSymbol type, bool hasErrors = false) 5816public new TypeSymbol Type => base.Type!; 5824public BoundSpillSequence Update(ImmutableArray<LocalSymbol> locals, ImmutableArray<BoundStatement> sideEffects, BoundExpression value, TypeSymbol type) 5826if (locals != this.Locals || sideEffects != this.SideEffects || value != this.Value || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 5838public BoundDynamicMemberAccess(SyntaxNode syntax, BoundExpression receiver, ImmutableArray<TypeWithAnnotations> typeArgumentsOpt, string name, bool invoked, bool indexed, TypeSymbol type, bool hasErrors = false) 5853public new TypeSymbol Type => base.Type!; 5863public BoundDynamicMemberAccess Update(BoundExpression receiver, ImmutableArray<TypeWithAnnotations> typeArgumentsOpt, string name, bool invoked, bool indexed, TypeSymbol type) 5865if (receiver != this.Receiver || typeArgumentsOpt != this.TypeArgumentsOpt || name != this.Name || invoked != this.Invoked || indexed != this.Indexed || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 5877protected BoundDynamicInvocableBase(BoundKind kind, SyntaxNode syntax, BoundExpression expression, ImmutableArray<BoundExpression> arguments, TypeSymbol? type, bool hasErrors = false) 5894public BoundDynamicInvocation(SyntaxNode syntax, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, ImmutableArray<MethodSymbol> applicableMethods, BoundExpression expression, ImmutableArray<BoundExpression> arguments, TypeSymbol type, bool hasErrors = false) 5908public new TypeSymbol Type => base.Type!; 5916public BoundDynamicInvocation Update(ImmutableArray<string?> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, ImmutableArray<MethodSymbol> applicableMethods, BoundExpression expression, ImmutableArray<BoundExpression> arguments, TypeSymbol type) 5918if (argumentNamesOpt != this.ArgumentNamesOpt || argumentRefKindsOpt != this.ArgumentRefKindsOpt || applicableMethods != this.ApplicableMethods || expression != this.Expression || arguments != this.Arguments || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 5930public BoundConditionalAccess(SyntaxNode syntax, BoundExpression receiver, BoundExpression accessExpression, TypeSymbol type, bool hasErrors = false) 5942public new TypeSymbol Type => base.Type!; 5949public BoundConditionalAccess Update(BoundExpression receiver, BoundExpression accessExpression, TypeSymbol type) 5951if (receiver != this.Receiver || accessExpression != this.AccessExpression || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 5963public BoundLoweredConditionalAccess(SyntaxNode syntax, BoundExpression receiver, MethodSymbol? hasValueMethodOpt, BoundExpression whenNotNull, BoundExpression? whenNullOpt, int id, bool forceCopyOfNullableValueType, TypeSymbol type, bool hasErrors = false) 5979public new TypeSymbol Type => base.Type!; 5990public BoundLoweredConditionalAccess Update(BoundExpression receiver, MethodSymbol? hasValueMethodOpt, BoundExpression whenNotNull, BoundExpression? whenNullOpt, int id, bool forceCopyOfNullableValueType, TypeSymbol type) 5992if (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)) 6004public BoundConditionalReceiver(SyntaxNode syntax, int id, TypeSymbol type, bool hasErrors) 6013public BoundConditionalReceiver(SyntaxNode syntax, int id, TypeSymbol type) 6022public new TypeSymbol Type => base.Type!; 6028public BoundConditionalReceiver Update(int id, TypeSymbol type) 6030if (id != this.Id || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 6042public BoundComplexConditionalReceiver(SyntaxNode syntax, BoundExpression valueTypeReceiver, BoundExpression referenceTypeReceiver, TypeSymbol type, bool hasErrors = false) 6054public new TypeSymbol Type => base.Type!; 6061public BoundComplexConditionalReceiver Update(BoundExpression valueTypeReceiver, BoundExpression referenceTypeReceiver, TypeSymbol type) 6063if (valueTypeReceiver != this.ValueTypeReceiver || referenceTypeReceiver != this.ReferenceTypeReceiver || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 6144public 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) 6167public new TypeSymbol Type => base.Type!; 6185public 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) 6187if (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)) 6199public BoundEventAssignmentOperator(SyntaxNode syntax, EventSymbol @event, bool isAddition, bool isDynamic, BoundExpression? receiverOpt, BoundExpression argument, TypeSymbol type, bool hasErrors = false) 6214public new TypeSymbol Type => base.Type!; 6224public BoundEventAssignmentOperator Update(EventSymbol @event, bool isAddition, bool isDynamic, BoundExpression? receiverOpt, BoundExpression argument, TypeSymbol type) 6226if (!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)) 6238public 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) 6256public new TypeSymbol Type => base.Type!; 6269public BoundAttribute Update(MethodSymbol? constructor, ImmutableArray<BoundExpression> constructorArguments, ImmutableArray<string?> constructorArgumentNamesOpt, ImmutableArray<int> constructorArgumentsToParamsOpt, bool constructorExpanded, BitVector constructorDefaultArguments, ImmutableArray<BoundAssignmentOperator> namedArguments, LookupResultKind resultKind, TypeSymbol type) 6271if (!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)) 6297public new TypeSymbol? Type => base.Type; 6321protected BoundObjectCreationExpressionBase(BoundKind kind, SyntaxNode syntax, TypeSymbol type, bool hasErrors) 6329protected BoundObjectCreationExpressionBase(BoundKind kind, SyntaxNode syntax, TypeSymbol type) 6337public new TypeSymbol Type => base.Type!; 6342public 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) 6379public 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) 6381if (!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)) 6393protected BoundCollectionExpressionBase(BoundKind kind, SyntaxNode syntax, ImmutableArray<BoundNode> elements, TypeSymbol? type, bool hasErrors = false) 6415public new TypeSymbol? Type => base.Type; 6434public 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) 6452public new TypeSymbol Type => base.Type!; 6465public BoundCollectionExpression Update(CollectionExpressionTypeKind collectionTypeKind, BoundObjectOrCollectionValuePlaceholder? placeholder, BoundExpression? collectionCreation, MethodSymbol? collectionBuilderMethod, BoundValuePlaceholder? collectionBuilderInvocationPlaceholder, BoundExpression? collectionBuilderInvocationConversion, bool wasTargetTyped, BoundUnconvertedCollectionExpression unconvertedCollectionExpression, ImmutableArray<BoundNode> elements, TypeSymbol type) 6467if (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)) 6479public BoundCollectionExpressionSpreadExpressionPlaceholder(SyntaxNode syntax, TypeSymbol? type, bool hasErrors) 6484public BoundCollectionExpressionSpreadExpressionPlaceholder(SyntaxNode syntax, TypeSymbol? type) 6493public BoundCollectionExpressionSpreadExpressionPlaceholder Update(TypeSymbol? type) 6495if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 6547protected BoundTupleExpression(BoundKind kind, SyntaxNode syntax, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<bool> inferredNamesOpt, TypeSymbol? type, bool hasErrors = false) 6565public BoundTupleLiteral(SyntaxNode syntax, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<bool> inferredNamesOpt, TypeSymbol? type, bool hasErrors = false) 6573public new TypeSymbol? Type => base.Type; 6578public BoundTupleLiteral Update(ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<bool> inferredNamesOpt, TypeSymbol? type) 6580if (arguments != this.Arguments || argumentNamesOpt != this.ArgumentNamesOpt || inferredNamesOpt != this.InferredNamesOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 6592public BoundConvertedTupleLiteral(SyntaxNode syntax, BoundTupleLiteral? sourceTuple, bool wasTargetTyped, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<bool> inferredNamesOpt, TypeSymbol? type, bool hasErrors = false) 6608public BoundConvertedTupleLiteral Update(BoundTupleLiteral? sourceTuple, bool wasTargetTyped, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<bool> inferredNamesOpt, TypeSymbol? type) 6610if (sourceTuple != this.SourceTuple || wasTargetTyped != this.WasTargetTyped || arguments != this.Arguments || argumentNamesOpt != this.ArgumentNamesOpt || inferredNamesOpt != this.InferredNamesOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 6622public 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) 6651public BoundDynamicObjectCreationExpression Update(string name, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, BoundObjectInitializerExpressionBase? initializerExpressionOpt, ImmutableArray<MethodSymbol> applicableMethods, bool wasTargetTyped, TypeSymbol type) 6653if (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)) 6665public BoundNoPiaObjectCreationExpression(SyntaxNode syntax, string? guidString, BoundObjectInitializerExpressionBase? initializerExpressionOpt, bool wasTargetTyped, TypeSymbol type, bool hasErrors = false) 6683public BoundNoPiaObjectCreationExpression Update(string? guidString, BoundObjectInitializerExpressionBase? initializerExpressionOpt, bool wasTargetTyped, TypeSymbol type) 6685if (guidString != this.GuidString || initializerExpressionOpt != this.InitializerExpressionOpt || wasTargetTyped != this.WasTargetTyped || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 6697protected BoundObjectInitializerExpressionBase(BoundKind kind, SyntaxNode syntax, BoundObjectOrCollectionValuePlaceholder placeholder, ImmutableArray<BoundExpression> initializers, TypeSymbol type, bool hasErrors = false) 6709public new TypeSymbol Type => base.Type!; 6716public BoundObjectInitializerExpression(SyntaxNode syntax, BoundObjectOrCollectionValuePlaceholder placeholder, ImmutableArray<BoundExpression> initializers, TypeSymbol type, bool hasErrors = false) 6730public BoundObjectInitializerExpression Update(BoundObjectOrCollectionValuePlaceholder placeholder, ImmutableArray<BoundExpression> initializers, TypeSymbol type) 6732if (placeholder != this.Placeholder || initializers != this.Initializers || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 6744public 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) 6764public new TypeSymbol Type => base.Type!; 6774public TypeSymbol ReceiverType { get; } 6779public 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) 6781if (!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)) 6793public BoundDynamicObjectInitializerMember(SyntaxNode syntax, string memberName, TypeSymbol receiverType, TypeSymbol type, bool hasErrors) 6805public BoundDynamicObjectInitializerMember(SyntaxNode syntax, string memberName, TypeSymbol receiverType, TypeSymbol type) 6817public new TypeSymbol Type => base.Type!; 6819public TypeSymbol ReceiverType { get; } 6824public BoundDynamicObjectInitializerMember Update(string memberName, TypeSymbol receiverType, TypeSymbol type) 6826if (memberName != this.MemberName || !TypeSymbol.Equals(receiverType, this.ReceiverType, TypeCompareKind.ConsiderEverything) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 6838public BoundCollectionInitializerExpression(SyntaxNode syntax, BoundObjectOrCollectionValuePlaceholder placeholder, ImmutableArray<BoundExpression> initializers, TypeSymbol type, bool hasErrors = false) 6852public BoundCollectionInitializerExpression Update(BoundObjectOrCollectionValuePlaceholder placeholder, ImmutableArray<BoundExpression> initializers, TypeSymbol type) 6854if (placeholder != this.Placeholder || initializers != this.Initializers || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 6866public 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) 6884public new TypeSymbol Type => base.Type!; 6897public BoundCollectionElementInitializer Update(MethodSymbol addMethod, ImmutableArray<BoundExpression> arguments, BoundExpression? implicitReceiverOpt, bool expanded, ImmutableArray<int> argsToParamsOpt, BitVector defaultArguments, bool invokedAsExtensionMethod, LookupResultKind resultKind, TypeSymbol type) 6899if (!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)) 6911public BoundDynamicCollectionElementInitializer(SyntaxNode syntax, ImmutableArray<MethodSymbol> applicableMethods, BoundExpression expression, ImmutableArray<BoundExpression> arguments, TypeSymbol type, bool hasErrors = false) 6923public new TypeSymbol Type => base.Type!; 6929public BoundDynamicCollectionElementInitializer Update(ImmutableArray<MethodSymbol> applicableMethods, BoundExpression expression, ImmutableArray<BoundExpression> arguments, TypeSymbol type) 6931if (applicableMethods != this.ApplicableMethods || expression != this.Expression || arguments != this.Arguments || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 6943public BoundImplicitReceiver(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 6951public BoundImplicitReceiver(SyntaxNode syntax, TypeSymbol type) 6959public new TypeSymbol Type => base.Type!; 6964public BoundImplicitReceiver Update(TypeSymbol type) 6966if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 6978public BoundAnonymousObjectCreationExpression(SyntaxNode syntax, MethodSymbol constructor, ImmutableArray<BoundExpression> arguments, ImmutableArray<BoundAnonymousPropertyDeclaration> declarations, TypeSymbol type, bool hasErrors = false) 6992public new TypeSymbol Type => base.Type!; 7000public BoundAnonymousObjectCreationExpression Update(MethodSymbol constructor, ImmutableArray<BoundExpression> arguments, ImmutableArray<BoundAnonymousPropertyDeclaration> declarations, TypeSymbol type) 7002if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(constructor, this.Constructor) || arguments != this.Arguments || declarations != this.Declarations || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7014public BoundAnonymousPropertyDeclaration(SyntaxNode syntax, PropertySymbol property, TypeSymbol type, bool hasErrors) 7024public BoundAnonymousPropertyDeclaration(SyntaxNode syntax, PropertySymbol property, TypeSymbol type) 7034public new TypeSymbol Type => base.Type!; 7040public BoundAnonymousPropertyDeclaration Update(PropertySymbol property, TypeSymbol type) 7042if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(property, this.Property) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7054public BoundNewT(SyntaxNode syntax, BoundObjectInitializerExpressionBase? initializerExpressionOpt, bool wasTargetTyped, TypeSymbol type, bool hasErrors = false) 7070public BoundNewT Update(BoundObjectInitializerExpressionBase? initializerExpressionOpt, bool wasTargetTyped, TypeSymbol type) 7072if (initializerExpressionOpt != this.InitializerExpressionOpt || wasTargetTyped != this.WasTargetTyped || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7084public BoundDelegateCreationExpression(SyntaxNode syntax, BoundExpression argument, MethodSymbol? methodOpt, bool isExtensionMethod, bool wasTargetTyped, TypeSymbol type, bool hasErrors = false) 7097public new TypeSymbol Type => base.Type!; 7106public BoundDelegateCreationExpression Update(BoundExpression argument, MethodSymbol? methodOpt, bool isExtensionMethod, bool wasTargetTyped, TypeSymbol type) 7108if (argument != this.Argument || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(methodOpt, this.MethodOpt) || isExtensionMethod != this.IsExtensionMethod || wasTargetTyped != this.WasTargetTyped || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7120public BoundArrayCreation(SyntaxNode syntax, ImmutableArray<BoundExpression> bounds, BoundArrayInitialization? initializerOpt, TypeSymbol type, bool hasErrors = false) 7131public new TypeSymbol Type => base.Type!; 7138public BoundArrayCreation Update(ImmutableArray<BoundExpression> bounds, BoundArrayInitialization? initializerOpt, TypeSymbol type) 7140if (bounds != this.Bounds || initializerOpt != this.InitializerOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7162public new TypeSymbol? Type => base.Type; 7183protected BoundStackAllocArrayCreationBase(BoundKind kind, SyntaxNode syntax, TypeSymbol elementType, BoundExpression count, BoundArrayInitialization? initializerOpt, TypeSymbol? type, bool hasErrors = false) 7195public TypeSymbol ElementType { get; } 7202public BoundStackAllocArrayCreation(SyntaxNode syntax, TypeSymbol elementType, BoundExpression count, BoundArrayInitialization? initializerOpt, TypeSymbol? type, bool hasErrors = false) 7215public BoundStackAllocArrayCreation Update(TypeSymbol elementType, BoundExpression count, BoundArrayInitialization? initializerOpt, TypeSymbol? type) 7217if (!TypeSymbol.Equals(elementType, this.ElementType, TypeCompareKind.ConsiderEverything) || count != this.Count || initializerOpt != this.InitializerOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7229public BoundConvertedStackAllocExpression(SyntaxNode syntax, TypeSymbol elementType, BoundExpression count, BoundArrayInitialization? initializerOpt, TypeSymbol type, bool hasErrors = false) 7239public new TypeSymbol Type => base.Type!; 7244public BoundConvertedStackAllocExpression Update(TypeSymbol elementType, BoundExpression count, BoundArrayInitialization? initializerOpt, TypeSymbol type) 7246if (!TypeSymbol.Equals(elementType, this.ElementType, TypeCompareKind.ConsiderEverything) || count != this.Count || initializerOpt != this.InitializerOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7258public BoundFieldAccess(SyntaxNode syntax, BoundExpression? receiverOpt, FieldSymbol fieldSymbol, ConstantValue? constantValueOpt, LookupResultKind resultKind, bool isByValue, bool isDeclaration, TypeSymbol type, bool hasErrors = false) 7273public new TypeSymbol Type => base.Type!; 7284public BoundFieldAccess Update(BoundExpression? receiverOpt, FieldSymbol fieldSymbol, ConstantValue? constantValueOpt, LookupResultKind resultKind, bool isByValue, bool isDeclaration, TypeSymbol type) 7286if (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)) 7298public BoundHoistedFieldAccess(SyntaxNode syntax, FieldSymbol fieldSymbol, TypeSymbol type, bool hasErrors) 7308public BoundHoistedFieldAccess(SyntaxNode syntax, FieldSymbol fieldSymbol, TypeSymbol type) 7318public new TypeSymbol Type => base.Type!; 7324public BoundHoistedFieldAccess Update(FieldSymbol fieldSymbol, TypeSymbol type) 7326if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(fieldSymbol, this.FieldSymbol) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7338public BoundPropertyAccess(SyntaxNode syntax, BoundExpression? receiverOpt, ThreeState initialBindingReceiverIsSubjectToCloning, PropertySymbol propertySymbol, AccessorKind autoPropertyAccessorKind, LookupResultKind resultKind, TypeSymbol type, bool hasErrors = false) 7352public new TypeSymbol Type => base.Type!; 7362public BoundPropertyAccess Update(BoundExpression? receiverOpt, ThreeState initialBindingReceiverIsSubjectToCloning, PropertySymbol propertySymbol, AccessorKind autoPropertyAccessorKind, LookupResultKind resultKind, TypeSymbol type) 7364if (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)) 7376public BoundEventAccess(SyntaxNode syntax, BoundExpression? receiverOpt, EventSymbol eventSymbol, bool isUsableAsField, LookupResultKind resultKind, TypeSymbol type, bool hasErrors = false) 7389public new TypeSymbol Type => base.Type!; 7398public BoundEventAccess Update(BoundExpression? receiverOpt, EventSymbol eventSymbol, bool isUsableAsField, LookupResultKind resultKind, TypeSymbol type) 7400if (receiverOpt != this.ReceiverOpt || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(eventSymbol, this.EventSymbol) || isUsableAsField != this.IsUsableAsField || resultKind != this.ResultKind || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7412public 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) 7433public new TypeSymbol Type => base.Type!; 7449public 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) 7451if (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)) 7463public BoundImplicitIndexerAccess(SyntaxNode syntax, BoundExpression receiver, BoundExpression argument, BoundExpression lengthOrCountAccess, BoundImplicitIndexerReceiverPlaceholder receiverPlaceholder, BoundExpression indexerOrSliceAccess, ImmutableArray<BoundImplicitIndexerValuePlaceholder> argumentPlaceholders, TypeSymbol type, bool hasErrors = false) 7487public new TypeSymbol Type => base.Type!; 7498public BoundImplicitIndexerAccess Update(BoundExpression receiver, BoundExpression argument, BoundExpression lengthOrCountAccess, BoundImplicitIndexerReceiverPlaceholder receiverPlaceholder, BoundExpression indexerOrSliceAccess, ImmutableArray<BoundImplicitIndexerValuePlaceholder> argumentPlaceholders, TypeSymbol type) 7500if (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)) 7512public BoundInlineArrayAccess(SyntaxNode syntax, BoundExpression expression, BoundExpression argument, bool isValue, WellKnownMember getItemOrSliceHelper, TypeSymbol type, bool hasErrors = false) 7530public new TypeSymbol Type => base.Type!; 7539public BoundInlineArrayAccess Update(BoundExpression expression, BoundExpression argument, bool isValue, WellKnownMember getItemOrSliceHelper, TypeSymbol type) 7541if (expression != this.Expression || argument != this.Argument || isValue != this.IsValue || getItemOrSliceHelper != this.GetItemOrSliceHelper || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7553public BoundDynamicIndexerAccess(SyntaxNode syntax, BoundExpression receiver, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, ImmutableArray<PropertySymbol> applicableIndexers, TypeSymbol type, bool hasErrors = false) 7569public new TypeSymbol Type => base.Type!; 7579public BoundDynamicIndexerAccess Update(BoundExpression receiver, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, ImmutableArray<PropertySymbol> applicableIndexers, TypeSymbol type) 7581if (receiver != this.Receiver || arguments != this.Arguments || argumentNamesOpt != this.ArgumentNamesOpt || argumentRefKindsOpt != this.ArgumentRefKindsOpt || applicableIndexers != this.ApplicableIndexers || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7593public BoundLambda(SyntaxNode syntax, UnboundLambda unboundLambda, LambdaSymbol symbol, BoundBlock body, ReadOnlyBindingDiagnostic<AssemblySymbol> diagnostics, Binder binder, TypeSymbol? type, bool hasErrors = false) 7611public new TypeSymbol? Type => base.Type; 7619public BoundLambda Update(UnboundLambda unboundLambda, LambdaSymbol symbol, BoundBlock body, ReadOnlyBindingDiagnostic<AssemblySymbol> diagnostics, Binder binder, TypeSymbol? type) 7621if (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)) 7655public new TypeSymbol? Type => base.Type; 7677public BoundQueryClause(SyntaxNode syntax, BoundExpression value, RangeVariableSymbol? definedSymbol, BoundExpression? operation, BoundExpression? cast, Binder binder, BoundExpression? unoptimizedForm, TypeSymbol type, bool hasErrors = false) 7693public new TypeSymbol Type => base.Type!; 7704public BoundQueryClause Update(BoundExpression value, RangeVariableSymbol? definedSymbol, BoundExpression? operation, BoundExpression? cast, Binder binder, BoundExpression? unoptimizedForm, TypeSymbol type) 7706if (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)) 7744public BoundNameOfOperator(SyntaxNode syntax, BoundExpression argument, ConstantValue constantValueOpt, TypeSymbol type, bool hasErrors = false) 7756public new TypeSymbol Type => base.Type!; 7763public BoundNameOfOperator Update(BoundExpression argument, ConstantValue constantValueOpt, TypeSymbol type) 7765if (argument != this.Argument || constantValueOpt != this.ConstantValueOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7777protected BoundInterpolatedStringBase(BoundKind kind, SyntaxNode syntax, ImmutableArray<BoundExpression> parts, ConstantValue? constantValueOpt, TypeSymbol? type, bool hasErrors = false) 7793public BoundUnconvertedInterpolatedString(SyntaxNode syntax, ImmutableArray<BoundExpression> parts, ConstantValue? constantValueOpt, TypeSymbol? type, bool hasErrors = false) 7805public BoundUnconvertedInterpolatedString Update(ImmutableArray<BoundExpression> parts, ConstantValue? constantValueOpt, TypeSymbol? type) 7807if (parts != this.Parts || constantValueOpt != this.ConstantValueOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7819public BoundInterpolatedString(SyntaxNode syntax, InterpolatedStringHandlerData? interpolationData, ImmutableArray<BoundExpression> parts, ConstantValue? constantValueOpt, TypeSymbol? type, bool hasErrors = false) 7833public BoundInterpolatedString Update(InterpolatedStringHandlerData? interpolationData, ImmutableArray<BoundExpression> parts, ConstantValue? constantValueOpt, TypeSymbol? type) 7835if (!interpolationData.Equals(this.InterpolationData) || parts != this.Parts || constantValueOpt != this.ConstantValueOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7847public BoundInterpolatedStringHandlerPlaceholder(SyntaxNode syntax, TypeSymbol? type, bool hasErrors) 7852public BoundInterpolatedStringHandlerPlaceholder(SyntaxNode syntax, TypeSymbol? type) 7861public BoundInterpolatedStringHandlerPlaceholder Update(TypeSymbol? type) 7863if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7875public BoundInterpolatedStringArgumentPlaceholder(SyntaxNode syntax, int argumentIndex, TypeSymbol type, bool hasErrors) 7884public BoundInterpolatedStringArgumentPlaceholder(SyntaxNode syntax, int argumentIndex, TypeSymbol type) 7893public new TypeSymbol Type => base.Type!; 7899public BoundInterpolatedStringArgumentPlaceholder Update(int argumentIndex, TypeSymbol type) 7901if (argumentIndex != this.ArgumentIndex || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7925public new TypeSymbol? Type => base.Type; 7948public BoundIsPatternExpression(SyntaxNode syntax, BoundExpression expression, BoundPattern pattern, bool isNegated, BoundDecisionDag reachabilityDecisionDag, LabelSymbol whenTrueLabel, LabelSymbol whenFalseLabel, TypeSymbol? type, bool hasErrors = false) 7976public BoundIsPatternExpression Update(BoundExpression expression, BoundPattern pattern, bool isNegated, BoundDecisionDag reachabilityDecisionDag, LabelSymbol whenTrueLabel, LabelSymbol whenFalseLabel, TypeSymbol? type) 7978if (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)) 7990protected BoundPattern(BoundKind kind, SyntaxNode syntax, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors) 8001protected BoundPattern(BoundKind kind, SyntaxNode syntax, TypeSymbol inputType, TypeSymbol narrowedType) 8012public TypeSymbol InputType { get; } 8013public TypeSymbol NarrowedType { get; } 8018public BoundConstantPattern(SyntaxNode syntax, BoundExpression value, ConstantValue constantValue, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors = false) 8037public BoundConstantPattern Update(BoundExpression value, ConstantValue constantValue, TypeSymbol inputType, TypeSymbol narrowedType) 8039if (value != this.Value || constantValue != this.ConstantValue || !TypeSymbol.Equals(inputType, this.InputType, TypeCompareKind.ConsiderEverything) || !TypeSymbol.Equals(narrowedType, this.NarrowedType, TypeCompareKind.ConsiderEverything)) 8051public BoundDiscardPattern(SyntaxNode syntax, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors) 8060public BoundDiscardPattern(SyntaxNode syntax, TypeSymbol inputType, TypeSymbol narrowedType) 8073public BoundDiscardPattern Update(TypeSymbol inputType, TypeSymbol narrowedType) 8075if (!TypeSymbol.Equals(inputType, this.InputType, TypeCompareKind.ConsiderEverything) || !TypeSymbol.Equals(narrowedType, this.NarrowedType, TypeCompareKind.ConsiderEverything)) 8087protected BoundObjectPattern(BoundKind kind, SyntaxNode syntax, Symbol? variable, BoundExpression? variableAccess, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors = false) 8104public BoundDeclarationPattern(SyntaxNode syntax, BoundTypeExpression declaredType, bool isVar, Symbol? variable, BoundExpression? variableAccess, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors = false) 8122public BoundDeclarationPattern Update(BoundTypeExpression declaredType, bool isVar, Symbol? variable, BoundExpression? variableAccess, TypeSymbol inputType, TypeSymbol narrowedType) 8124if (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)) 8136public 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) 8159public BoundRecursivePattern Update(BoundTypeExpression? declaredType, MethodSymbol? deconstructMethod, ImmutableArray<BoundPositionalSubpattern> deconstruction, ImmutableArray<BoundPropertySubpattern> properties, bool isExplicitNotNullTest, Symbol? variable, BoundExpression? variableAccess, TypeSymbol inputType, TypeSymbol narrowedType) 8161if (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)) 8173public 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) 8203public BoundListPattern Update(ImmutableArray<BoundPattern> subpatterns, bool hasSlice, BoundExpression? lengthAccess, BoundExpression? indexerAccess, BoundListPatternReceiverPlaceholder? receiverPlaceholder, BoundListPatternIndexPlaceholder? argumentPlaceholder, Symbol? variable, BoundExpression? variableAccess, TypeSymbol inputType, TypeSymbol narrowedType) 8205if (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)) 8217public BoundSlicePattern(SyntaxNode syntax, BoundPattern? pattern, BoundExpression? indexerAccess, BoundSlicePatternReceiverPlaceholder? receiverPlaceholder, BoundSlicePatternRangePlaceholder? argumentPlaceholder, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors = false) 8242public BoundSlicePattern Update(BoundPattern? pattern, BoundExpression? indexerAccess, BoundSlicePatternReceiverPlaceholder? receiverPlaceholder, BoundSlicePatternRangePlaceholder? argumentPlaceholder, TypeSymbol inputType, TypeSymbol narrowedType) 8244if (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)) 8256public BoundITuplePattern(SyntaxNode syntax, MethodSymbol getLengthMethod, MethodSymbol getItemMethod, ImmutableArray<BoundPositionalSubpattern> subpatterns, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors = false) 8278public BoundITuplePattern Update(MethodSymbol getLengthMethod, MethodSymbol getItemMethod, ImmutableArray<BoundPositionalSubpattern> subpatterns, TypeSymbol inputType, TypeSymbol narrowedType) 8280if (!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)) 8364public BoundPropertySubpatternMember(SyntaxNode syntax, BoundPropertySubpatternMember? receiver, Symbol? symbol, TypeSymbol type, bool hasErrors = false) 8377public TypeSymbol Type { get; } 8382public BoundPropertySubpatternMember Update(BoundPropertySubpatternMember? receiver, Symbol? symbol, TypeSymbol type) 8384if (receiver != this.Receiver || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(symbol, this.Symbol) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 8396public BoundTypePattern(SyntaxNode syntax, BoundTypeExpression declaredType, bool isExplicitNotNullTest, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors = false) 8414public BoundTypePattern Update(BoundTypeExpression declaredType, bool isExplicitNotNullTest, TypeSymbol inputType, TypeSymbol narrowedType) 8416if (declaredType != this.DeclaredType || isExplicitNotNullTest != this.IsExplicitNotNullTest || !TypeSymbol.Equals(inputType, this.InputType, TypeCompareKind.ConsiderEverything) || !TypeSymbol.Equals(narrowedType, this.NarrowedType, TypeCompareKind.ConsiderEverything)) 8428public BoundBinaryPattern(SyntaxNode syntax, bool disjunction, BoundPattern left, BoundPattern right, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors = false) 8449public BoundBinaryPattern Update(bool disjunction, BoundPattern left, BoundPattern right, TypeSymbol inputType, TypeSymbol narrowedType) 8451if (disjunction != this.Disjunction || left != this.Left || right != this.Right || !TypeSymbol.Equals(inputType, this.InputType, TypeCompareKind.ConsiderEverything) || !TypeSymbol.Equals(narrowedType, this.NarrowedType, TypeCompareKind.ConsiderEverything)) 8463public BoundNegatedPattern(SyntaxNode syntax, BoundPattern negated, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors = false) 8479public BoundNegatedPattern Update(BoundPattern negated, TypeSymbol inputType, TypeSymbol narrowedType) 8481if (negated != this.Negated || !TypeSymbol.Equals(inputType, this.InputType, TypeCompareKind.ConsiderEverything) || !TypeSymbol.Equals(narrowedType, this.NarrowedType, TypeCompareKind.ConsiderEverything)) 8493public BoundRelationalPattern(SyntaxNode syntax, BinaryOperatorKind relation, BoundExpression value, ConstantValue constantValue, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors = false) 8514public BoundRelationalPattern Update(BinaryOperatorKind relation, BoundExpression value, ConstantValue constantValue, TypeSymbol inputType, TypeSymbol narrowedType) 8516if (relation != this.Relation || value != this.Value || constantValue != this.ConstantValue || !TypeSymbol.Equals(inputType, this.InputType, TypeCompareKind.ConsiderEverything) || !TypeSymbol.Equals(narrowedType, this.NarrowedType, TypeCompareKind.ConsiderEverything)) 8528public BoundDiscardExpression(SyntaxNode syntax, NullableAnnotation nullableAnnotation, bool isInferred, TypeSymbol? type, bool hasErrors) 8535public BoundDiscardExpression(SyntaxNode syntax, NullableAnnotation nullableAnnotation, bool isInferred, TypeSymbol? type) 8542public new TypeSymbol? Type => base.Type; 8549public BoundDiscardExpression Update(NullableAnnotation nullableAnnotation, bool isInferred, TypeSymbol? type) 8551if (nullableAnnotation != this.NullableAnnotation || isInferred != this.IsInferred || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 8563public BoundThrowExpression(SyntaxNode syntax, BoundExpression expression, TypeSymbol? type, bool hasErrors = false) 8577public BoundThrowExpression Update(BoundExpression expression, TypeSymbol? type) 8579if (expression != this.Expression || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 8601public new TypeSymbol? Type => base.Type; 8674public new TypeSymbol? Type => base.Type; 8761public BoundExpressionWithNullability(SyntaxNode syntax, BoundExpression expression, NullableAnnotation nullableAnnotation, TypeSymbol? type, bool hasErrors = false) 8772public new TypeSymbol? Type => base.Type; 8778public BoundExpressionWithNullability Update(BoundExpression expression, NullableAnnotation nullableAnnotation, TypeSymbol? type) 8780if (expression != this.Expression || nullableAnnotation != this.NullableAnnotation || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 8792public BoundWithExpression(SyntaxNode syntax, BoundExpression receiver, MethodSymbol? cloneMethod, BoundObjectInitializerExpressionBase initializerExpression, TypeSymbol type, bool hasErrors = false) 8805public new TypeSymbol Type => base.Type!; 8813public BoundWithExpression Update(BoundExpression receiver, MethodSymbol? cloneMethod, BoundObjectInitializerExpressionBase initializerExpression, TypeSymbol type) 8815if (receiver != this.Receiver || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(cloneMethod, this.CloneMethod) || initializerExpression != this.InitializerExpression || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 10822TypeSymbol? type = this.VisitType(node.Type); 10828TypeSymbol? type = this.VisitType(node.Type); 10833TypeSymbol? type = this.VisitType(node.Type); 10838TypeSymbol? type = this.VisitType(node.Type); 10843TypeSymbol? type = this.VisitType(node.Type); 10848TypeSymbol? type = this.VisitType(node.Type); 10853TypeSymbol? type = this.VisitType(node.Type); 10858TypeSymbol? type = this.VisitType(node.Type); 10863TypeSymbol? type = this.VisitType(node.Type); 10868TypeSymbol? type = this.VisitType(node.Type); 10873TypeSymbol? type = this.VisitType(node.Type); 10878TypeSymbol? type = this.VisitType(node.Type); 10883TypeSymbol? type = this.VisitType(node.Type); 10888TypeSymbol? type = this.VisitType(node.Type); 10894TypeSymbol? type = this.VisitType(node.Type); 10900TypeSymbol? type = this.VisitType(node.Type); 10917TypeSymbol? type = this.VisitType(node.Type); 10922TypeSymbol? type = this.VisitType(node.Type); 10927TypeSymbol? type = this.VisitType(node.Type); 10933TypeSymbol? constrainedToTypeOpt = this.VisitType(node.ConstrainedToTypeOpt); 10934TypeSymbol? type = this.VisitType(node.Type); 10944TypeSymbol? constrainedToTypeOpt = this.VisitType(node.ConstrainedToTypeOpt); 10945TypeSymbol? type = this.VisitType(node.Type); 10951TypeSymbol? type = this.VisitType(node.Type); 10957TypeSymbol? type = this.VisitType(node.Type); 10962TypeSymbol? constrainedToTypeOpt = this.VisitType(node.ConstrainedToTypeOpt); 10963TypeSymbol? type = this.VisitType(node.Type); 10969TypeSymbol? type = this.VisitType(node.Type); 10976TypeSymbol? type = this.VisitType(node.Type); 10983TypeSymbol? type = this.VisitType(node.Type); 10989TypeSymbol? type = this.VisitType(node.Type); 10995TypeSymbol? type = this.VisitType(node.Type); 11001TypeSymbol? type = this.VisitType(node.Type); 11007TypeSymbol? type = this.VisitType(node.Type); 11014TypeSymbol? type = this.VisitType(node.Type); 11021TypeSymbol? type = this.VisitType(node.Type); 11028TypeSymbol? type = this.VisitType(node.Type); 11035TypeSymbol? constrainedToTypeOpt = this.VisitType(node.ConstrainedToTypeOpt); 11036TypeSymbol? type = this.VisitType(node.Type); 11047TypeSymbol? type = this.VisitType(node.Type); 11054TypeSymbol? type = this.VisitType(node.Type); 11061TypeSymbol? type = this.VisitType(node.Type); 11070TypeSymbol? type = this.VisitType(node.Type); 11077TypeSymbol? type = this.VisitType(node.Type); 11085TypeSymbol? type = this.VisitType(node.Type); 11093TypeSymbol? naturalTypeOpt = this.VisitType(node.NaturalTypeOpt); 11094TypeSymbol? type = this.VisitType(node.Type); 11101TypeSymbol? type = this.VisitType(node.Type); 11107TypeSymbol? type = this.VisitType(node.Type); 11113TypeSymbol? type = this.VisitType(node.Type); 11126TypeSymbol? type = this.VisitType(node.Type); 11132TypeSymbol? type = this.VisitType(node.Type); 11143TypeSymbol? type = this.VisitType(node.Type); 11148TypeSymbol? type = this.VisitType(node.Type); 11153TypeSymbol? type = this.VisitType(node.Type); 11158TypeSymbol? type = this.VisitType(node.Type); 11163TypeSymbol? type = this.VisitType(node.Type); 11168TypeSymbol? type = this.VisitType(node.Type); 11173TypeSymbol? type = this.VisitType(node.Type); 11178TypeSymbol? type = this.VisitType(node.Type); 11183TypeSymbol? type = this.VisitType(node.Type); 11188TypeSymbol? type = this.VisitType(node.Type); 11193TypeSymbol? type = this.VisitType(node.Type); 11198TypeSymbol? type = this.VisitType(node.Type); 11203TypeSymbol? type = this.VisitType(node.Type); 11208TypeSymbol? type = this.VisitType(node.Type); 11214TypeSymbol? type = this.VisitType(node.Type); 11221TypeSymbol? type = this.VisitType(node.Type); 11230TypeSymbol? type = this.VisitType(node.Type); 11236TypeSymbol? type = this.VisitType(node.Type); 11242TypeSymbol? type = this.VisitType(node.Type); 11248TypeSymbol? type = this.VisitType(node.Type); 11253TypeSymbol? type = this.VisitType(node.Type); 11259TypeSymbol? type = this.VisitType(node.Type); 11267TypeSymbol? elementPointerType = this.VisitType(node.ElementPointerType); 11268TypeSymbol? type = this.VisitType(node.Type); 11439TypeSymbol? exceptionTypeOpt = this.VisitType(node.ExceptionTypeOpt); 11444TypeSymbol? type = this.VisitType(node.Type); 11449TypeSymbol? type = this.VisitType(node.Type); 11454TypeSymbol? type = this.VisitType(node.Type); 11459TypeSymbol? type = this.VisitType(node.Type); 11464TypeSymbol? type = this.VisitType(node.Type); 11469TypeSymbol? type = this.VisitType(node.Type); 11474TypeSymbol? type = this.VisitType(node.Type); 11479TypeSymbol? type = this.VisitType(node.Type); 11485TypeSymbol? type = this.VisitType(node.Type); 11490TypeSymbol? type = this.VisitType(node.Type); 11507TypeSymbol? type = this.VisitType(node.Type); 11532TypeSymbol? type = this.VisitType(node.Type); 11540TypeSymbol? naturalTypeOpt = this.VisitType(node.NaturalTypeOpt); 11541TypeSymbol? type = this.VisitType(node.Type); 11573TypeSymbol? type = this.VisitType(node.Type); 11579TypeSymbol? type = this.VisitType(node.Type); 11610TypeSymbol? type = this.VisitType(node.Type); 11635TypeSymbol? indexerType = this.VisitType(node.IndexerType); 11645TypeSymbol? sliceType = this.VisitType(node.SliceType); 11669TypeSymbol? type = this.VisitType(node.Type); 11676TypeSymbol? type = this.VisitType(node.Type); 11683TypeSymbol? type = this.VisitType(node.Type); 11689TypeSymbol? type = this.VisitType(node.Type); 11696TypeSymbol? type = this.VisitType(node.Type); 11703TypeSymbol? type = this.VisitType(node.Type); 11711TypeSymbol? type = this.VisitType(node.Type); 11716TypeSymbol? type = this.VisitType(node.Type); 11723TypeSymbol? type = this.VisitType(node.Type); 11729TypeSymbol? type = this.VisitType(node.Type); 11735TypeSymbol? type = this.VisitType(node.Type); 11742TypeSymbol? type = this.VisitType(node.Type); 11749TypeSymbol? type = this.VisitType(node.Type); 11756TypeSymbol? type = this.VisitType(node.Type); 11762TypeSymbol? type = this.VisitType(node.Type); 11769TypeSymbol? type = this.VisitType(node.Type); 11775TypeSymbol? type = this.VisitType(node.Type); 11786TypeSymbol? type = this.VisitType(node.Type); 11791TypeSymbol? type = this.VisitType(node.Type); 11807TypeSymbol? type = this.VisitType(node.Type); 11814TypeSymbol? type = this.VisitType(node.Type); 11821TypeSymbol? type = this.VisitType(node.Type); 11827TypeSymbol? type = this.VisitType(node.Type); 11834TypeSymbol? type = this.VisitType(node.Type); 11840TypeSymbol? receiverType = this.VisitType(node.ReceiverType); 11841TypeSymbol? type = this.VisitType(node.Type); 11846TypeSymbol? receiverType = this.VisitType(node.ReceiverType); 11847TypeSymbol? type = this.VisitType(node.Type); 11854TypeSymbol? type = this.VisitType(node.Type); 11861TypeSymbol? type = this.VisitType(node.Type); 11868TypeSymbol? type = this.VisitType(node.Type); 11873TypeSymbol? type = this.VisitType(node.Type); 11880TypeSymbol? type = this.VisitType(node.Type); 11885TypeSymbol? type = this.VisitType(node.Type); 11891TypeSymbol? type = this.VisitType(node.Type); 11897TypeSymbol? type = this.VisitType(node.Type); 11904TypeSymbol? type = this.VisitType(node.Type); 11910TypeSymbol? type = this.VisitType(node.Type); 11917TypeSymbol? elementType = this.VisitType(node.ElementType); 11918TypeSymbol? type = this.VisitType(node.Type); 11925TypeSymbol? elementType = this.VisitType(node.ElementType); 11926TypeSymbol? type = this.VisitType(node.Type); 11932TypeSymbol? type = this.VisitType(node.Type); 11937TypeSymbol? type = this.VisitType(node.Type); 11943TypeSymbol? type = this.VisitType(node.Type); 11949TypeSymbol? type = this.VisitType(node.Type); 11956TypeSymbol? type = this.VisitType(node.Type); 11967TypeSymbol? type = this.VisitType(node.Type); 11974TypeSymbol? type = this.VisitType(node.Type); 11981TypeSymbol? type = this.VisitType(node.Type); 11988TypeSymbol? type = this.VisitType(node.Type); 11993TypeSymbol? type = this.VisitType(node.Type); 12002TypeSymbol? type = this.VisitType(node.Type); 12013TypeSymbol? type = this.VisitType(node.Type); 12019TypeSymbol? type = this.VisitType(node.Type); 12025TypeSymbol? type = this.VisitType(node.Type); 12030TypeSymbol? type = this.VisitType(node.Type); 12035TypeSymbol? type = this.VisitType(node.Type); 12043TypeSymbol? type = this.VisitType(node.Type); 12051TypeSymbol? type = this.VisitType(node.Type); 12057TypeSymbol? inputType = this.VisitType(node.InputType); 12058TypeSymbol? narrowedType = this.VisitType(node.NarrowedType); 12063TypeSymbol? inputType = this.VisitType(node.InputType); 12064TypeSymbol? narrowedType = this.VisitType(node.NarrowedType); 12071TypeSymbol? inputType = this.VisitType(node.InputType); 12072TypeSymbol? narrowedType = this.VisitType(node.NarrowedType); 12081TypeSymbol? inputType = this.VisitType(node.InputType); 12082TypeSymbol? narrowedType = this.VisitType(node.NarrowedType); 12093TypeSymbol? inputType = this.VisitType(node.InputType); 12094TypeSymbol? narrowedType = this.VisitType(node.NarrowedType); 12103TypeSymbol? inputType = this.VisitType(node.InputType); 12104TypeSymbol? narrowedType = this.VisitType(node.NarrowedType); 12110TypeSymbol? inputType = this.VisitType(node.InputType); 12111TypeSymbol? narrowedType = this.VisitType(node.NarrowedType); 12128TypeSymbol? type = this.VisitType(node.Type); 12134TypeSymbol? inputType = this.VisitType(node.InputType); 12135TypeSymbol? narrowedType = this.VisitType(node.NarrowedType); 12142TypeSymbol? inputType = this.VisitType(node.InputType); 12143TypeSymbol? narrowedType = this.VisitType(node.NarrowedType); 12149TypeSymbol? inputType = this.VisitType(node.InputType); 12150TypeSymbol? narrowedType = this.VisitType(node.NarrowedType); 12156TypeSymbol? inputType = this.VisitType(node.InputType); 12157TypeSymbol? narrowedType = this.VisitType(node.NarrowedType); 12162TypeSymbol? type = this.VisitType(node.Type); 12168TypeSymbol? type = this.VisitType(node.Type); 12174TypeSymbol? type = this.VisitType(node.Type); 12180TypeSymbol? type = this.VisitType(node.Type); 12185TypeSymbol? type = this.VisitType(node.Type); 12204TypeSymbol? type = this.VisitType(node.Type); 12211TypeSymbol? type = this.VisitType(node.Type); 12218private readonly ImmutableDictionary<BoundExpression, (NullabilityInfo Info, TypeSymbol? Type)> _updatedNullabilities; 12222public NullabilityRewriter(ImmutableDictionary<BoundExpression, (NullabilityInfo Info, TypeSymbol? Type)> updatedNullabilities, NullableWalker.SnapshotManager? snapshotManager, ImmutableDictionary<Symbol, Symbol>.Builder remappedSymbols) 12255if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12270if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12287if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12301if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12313if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12325if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12337if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12349if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12361if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12373if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12385if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12397if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12409if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12421if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12436if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12454if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12472if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12486if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12498if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12511TypeSymbol? constrainedToTypeOpt = GetUpdatedSymbol(node, node.ConstrainedToTypeOpt); 12516if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12531TypeSymbol? constrainedToTypeOpt = GetUpdatedSymbol(node, node.ConstrainedToTypeOpt); 12540if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12557if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12574if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12589TypeSymbol? constrainedToTypeOpt = GetUpdatedSymbol(node, node.ConstrainedToTypeOpt); 12592if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12609if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12627if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12645if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12663if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12680if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12697if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12715if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12734if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12752if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12775if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12793if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12811if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12831if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12849if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12868if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12882TypeSymbol? naturalTypeOpt = GetUpdatedSymbol(node, node.NaturalTypeOpt); 12888if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12906if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12923if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12940if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12967if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12985if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13002if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13020if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13038if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13052if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13064if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13076if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13088if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13100if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13112if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13124if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13136if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13152if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13170if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13184if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13199if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13217if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13237if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13254if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13272if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13290if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13304if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13319if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13333TypeSymbol elementPointerType = GetUpdatedSymbol(node, node.ElementPointerType); 13340if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13465TypeSymbol? exceptionTypeOpt = GetUpdatedSymbol(node, node.ExceptionTypeOpt); 13475if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13487if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13499if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13511if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13523if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13535if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13550if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13567if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13585if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13602if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13616if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13642if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13656TypeSymbol? naturalTypeOpt = GetUpdatedSymbol(node, node.NaturalTypeOpt); 13662if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13704TypeSymbol indexerType = GetUpdatedSymbol(node, node.IndexerType); 13715TypeSymbol sliceType = GetUpdatedSymbol(node, node.SliceType); 13737if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13756if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13775if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13792if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13811if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13829if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13849if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13863if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13879if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13899if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13917if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13937if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13956if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13975if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13992if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14012if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14029if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14052if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14066if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14081if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14099if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14118if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14135if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14153if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14168TypeSymbol receiverType = GetUpdatedSymbol(node, node.ReceiverType); 14172if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14186TypeSymbol receiverType = GetUpdatedSymbol(node, node.ReceiverType); 14189if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14207if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14226if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14245if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14259if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14276if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14293if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14310if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14328if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14346if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14363if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14377TypeSymbol elementType = GetUpdatedSymbol(node, node.ElementType); 14382if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14396TypeSymbol elementType = GetUpdatedSymbol(node, node.ElementType); 14401if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14419if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14436if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14454if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14472if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14492if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14510if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14529if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14548if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14565if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14586if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14603if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14620if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14637if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14651if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14663if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14680if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14699if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14713TypeSymbol inputType = GetUpdatedSymbol(node, node.InputType); 14714TypeSymbol narrowedType = GetUpdatedSymbol(node, node.NarrowedType); 14721TypeSymbol inputType = GetUpdatedSymbol(node, node.InputType); 14722TypeSymbol narrowedType = GetUpdatedSymbol(node, node.NarrowedType); 14729TypeSymbol inputType = GetUpdatedSymbol(node, node.InputType); 14730TypeSymbol narrowedType = GetUpdatedSymbol(node, node.NarrowedType); 14740TypeSymbol inputType = GetUpdatedSymbol(node, node.InputType); 14741TypeSymbol narrowedType = GetUpdatedSymbol(node, node.NarrowedType); 14752TypeSymbol inputType = GetUpdatedSymbol(node, node.InputType); 14753TypeSymbol narrowedType = GetUpdatedSymbol(node, node.NarrowedType); 14765TypeSymbol inputType = GetUpdatedSymbol(node, node.InputType); 14766TypeSymbol narrowedType = GetUpdatedSymbol(node, node.NarrowedType); 14778TypeSymbol inputType = GetUpdatedSymbol(node, node.InputType); 14779TypeSymbol narrowedType = GetUpdatedSymbol(node, node.NarrowedType); 14800TypeSymbol inputType = GetUpdatedSymbol(node, node.InputType); 14801TypeSymbol narrowedType = GetUpdatedSymbol(node, node.NarrowedType); 14808TypeSymbol inputType = GetUpdatedSymbol(node, node.InputType); 14809TypeSymbol narrowedType = GetUpdatedSymbol(node, node.NarrowedType); 14817TypeSymbol inputType = GetUpdatedSymbol(node, node.InputType); 14818TypeSymbol narrowedType = GetUpdatedSymbol(node, node.NarrowedType); 14825TypeSymbol inputType = GetUpdatedSymbol(node, node.InputType); 14826TypeSymbol narrowedType = GetUpdatedSymbol(node, node.NarrowedType); 14833if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14848if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14866if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14884if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14901if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14927if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14946if (_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; 95_awaiterFields = new Dictionary<TypeSymbol, FieldSymbol>(Symbols.SymbolEqualityComparer.IgnoringDynamicTupleNamesAndNullability); 103private FieldSymbol GetAwaiterField(TypeSymbol awaiterType) 362TypeSymbol type = VisitType(node.Type); 466TypeSymbol awaiterFieldType = awaiterTemp.Type.IsVerifierReference() 486(TypeSymbol.Equals(awaiterField.Type, awaiterTemp.Type, TypeCompareKind.ConsiderEverything2)) 518TypeSymbol.Equals(awaiterTemp.Type, awaiterField.Type, TypeCompareKind.ConsiderEverything2) 612private 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; 431TypeSymbol 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\ClosureConversion\ClosureConversion.Analysis.Tree.cs (1)
682TypeSymbol type;
Lowering\ClosureConversion\ClosureConversion.cs (14)
242Debug.Assert(thisParameter is null || TypeSymbol.Equals(thisParameter.Type, thisType, TypeCompareKind.ConsiderEverything2)); 580Debug.Assert(TypeSymbol.Equals(result.Type, frameType, TypeCompareKind.ConsiderEverything2)); 597if ((object)_currentFrameThis != null && TypeSymbol.Equals(_currentFrameThis.Type, frameClass, TypeCompareKind.ConsiderEverything2)) 610if (TypeSymbol.Equals(potentialParameter.Type.OriginalDefinition, frameClass, TypeCompareKind.ConsiderEverything2)) 677Debug.Assert(TypeSymbol.Equals(frameType, constructor.ContainingType, TypeCompareKind.ConsiderEverything2)); 849return (!_currentMethod.IsStatic && TypeSymbol.Equals(_currentMethod.ContainingType, _topLevelMethod.ContainingType, TypeCompareKind.ConsiderEverything2)) 856TypeSymbol type = VisitType(node.Type); 994while (!TypeSymbol.Equals(oldTypeArg.Type, newTypeArg.Type, TypeCompareKind.ConsiderEverything)); 1075var type = VisitType(node.Type); 1145var newType = this.VisitType(node.Type); 1275var exceptionTypeOpt = this.VisitType(node.ExceptionTypeOpt); 1625var newType = VisitType(node.Type); 1655TypeSymbol type = this.VisitType(node.Type); 1694var 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)
47TypeSymbol type = GetCapturedVariableFieldType(frame, captured); 97private static TypeSymbol GetCapturedVariableFieldType(SynthesizedContainer frame, Symbol variable)
Lowering\ClosureConversion\SynthesizedClosureMethod.cs (2)
216protected override ImmutableArray<TypeSymbol> ExtraSynthesizedRefParameters 217=> ImmutableArray<TypeSymbol>.CastUp(_structEnvironments);
Lowering\DiagnosticsPass_ExpressionTrees.cs (2)
377expr.Type is TypeSymbol type && 871private 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\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 (14)
18private readonly Dictionary<(TypeSymbol?, TypeSymbol, MethodSymbol), FieldSymbol> _delegateFields = new(CLRSignatureComparer.Instance); 21internal DelegateCacheContainer(TypeSymbol containingType, int generationOrdinal) 57var delegateType = boundDelegateCreation.Type; 62var constrainedToTypeOpt = ((targetMethod.IsAbstract || targetMethod.IsVirtual) && boundDelegateCreation.Argument is BoundTypeExpression typeExpression) ? typeExpression.Type : null; 69var fieldType = TypeParameters.IsEmpty ? delegateType : TypeMap.SubstituteType(delegateType).Type; 87private sealed class CLRSignatureComparer : IEqualityComparer<(TypeSymbol? constrainedToTypeOpt, TypeSymbol delegateType, MethodSymbol targetMethod)> 91public bool Equals((TypeSymbol? constrainedToTypeOpt, TypeSymbol delegateType, MethodSymbol targetMethod) x, (TypeSymbol? constrainedToTypeOpt, TypeSymbol delegateType, MethodSymbol targetMethod) y) 100public int GetHashCode((TypeSymbol? constrainedToTypeOpt, TypeSymbol delegateType, MethodSymbol targetMethod) conversion)
Lowering\LocalRewriter\DelegateCacheRewriter.cs (3)
171var delegateType = boundDelegateCreation.Type; 207private static void FindTypeParameters(TypeSymbol type, HashSet<TypeParameterSymbol> result) 220private 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)
198TypeSymbol inputType = input.Type; 207TypeSymbol type = t.Type; 244TypeSymbol type = e.Property.GetMethod.ReturnType; 373TypeSymbol objectType = _factory.SpecialType(SpecialType.System_Object); 394TypeSymbol comparisonType = input.Type.EnumUnderlyingTypeOrSelf(); 411TypeSymbol comparisonType = input.Type.EnumUnderlyingTypeOrSelf(); 489var 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 (60)
73var type = node.Type; 179TypeSymbol type, 181TypeSymbol? constrainedToTypeOpt, 195TypeSymbol type, 197TypeSymbol? constrainedToTypeOpt, 537private BoundExpression RewriteLiftedBinaryOperator(SyntaxNode syntax, BinaryOperatorKind operatorKind, BoundExpression loweredLeft, BoundExpression loweredRight, TypeSymbol type, MethodSymbol? method, TypeSymbol? constrainedToTypeOpt) 601TypeSymbol? constrainedToTypeOpt, 602TypeSymbol type, 725private BoundExpression MakeTruthTestForDynamicLogicalOperator(SyntaxNode syntax, BoundExpression loweredLeft, TypeSymbol boolean, MethodSymbol? leftTruthOperator, TypeSymbol? constrainedToTypeOpt, bool negative) 772TypeSymbol type, 774TypeSymbol? constrainedToTypeOpt) 785Debug.Assert(TypeSymbol.Equals(method.ReturnType, type, TypeCompareKind.ConsiderEverything2)); 801TypeSymbol? constrainedToTypeOpt) 812TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean); 997TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean); 1131TypeSymbol? constrainedToTypeOpt) 1224TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean); 1298TypeSymbol type, 1300TypeSymbol? constrainedToTypeOpt) 1338TypeSymbol type, 1340TypeSymbol? constrainedToTypeOpt) 1363TypeSymbol type) 1407TypeSymbol type, 1409TypeSymbol? constrainedToTypeOpt) 1457TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean); 1509TypeSymbol type, 1511TypeSymbol? constrainedToTypeOpt) 1614Debug.Assert(TypeSymbol.Equals(seq.Type, conditional.Type, TypeCompareKind.ConsiderEverything2)); 1615Debug.Assert(TypeSymbol.Equals(conditional.Type, conditional.Consequence.Type, TypeCompareKind.ConsiderEverything2)); 1616Debug.Assert(TypeSymbol.Equals(conditional.Type, conditional.Alternative.Type, TypeCompareKind.ConsiderEverything2)); 1642TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean); 1834TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean); 1894private MethodSymbol UnsafeGetNullableMethod(SyntaxNode syntax, TypeSymbol nullableType, SpecialMember member) 1904internal static MethodSymbol UnsafeGetNullableMethod(SyntaxNode syntax, TypeSymbol nullableType, SpecialMember member, CSharpCompilation compilation, BindingDiagnosticBag diagnostics) 1911private bool TryGetNullableMethod(SyntaxNode syntax, TypeSymbol nullableType, SpecialMember member, out MethodSymbol result, bool isOptional = false) 1928TypeSymbol returnType) 1995private BoundExpression RewriteStringEquality(BoundBinaryOperator? oldNode, SyntaxNode syntax, BinaryOperatorKind operatorKind, BoundExpression loweredLeft, BoundExpression loweredRight, TypeSymbol type, SpecialMember member) 2008private BoundExpression RewriteDelegateOperation(SyntaxNode syntax, BinaryOperatorKind operatorKind, BoundExpression loweredLeft, BoundExpression loweredRight, TypeSymbol type, SpecialMember member) 2074TypeSymbol? exprType = rewrittenExpr.Type; 2083TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean); 2097TypeSymbol objectType = _compilation.GetSpecialType(SpecialType.System_Object); 2132TypeSymbol type, 2138TypeSymbol rightType = loweredRight.Type; 2194TypeSymbol type) 2205TypeSymbol leftType = loweredLeft.Type; 2210TypeSymbol rightType = loweredRight.Type; 2254TypeSymbol returnType, 2375TypeSymbol multiplicationResultType; 2376TypeSymbol convertedMultiplicationResultType; 2381TypeSymbol nativeIntType = _factory.SpecialType(SpecialType.System_IntPtr); 2395TypeSymbol longType = _factory.SpecialType(SpecialType.System_Int64); 2396TypeSymbol nativeIntType = _factory.SpecialType(SpecialType.System_IntPtr); 2408TypeSymbol longType = _factory.SpecialType(SpecialType.System_Int64); 2409TypeSymbol nativeIntType = _factory.SpecialType(SpecialType.System_IntPtr); 2420TypeSymbol ulongType = _factory.SpecialType(SpecialType.System_UInt64); 2421TypeSymbol nativeUIntType = _factory.SpecialType(SpecialType.System_UIntPtr); 2441return TypeSymbol.Equals(convertedMultiplicationResultType, multiplicationResultType, TypeCompareKind.ConsiderEverything2) 2450TypeSymbol returnType)
Lowering\LocalRewriter\LocalRewriter_Call.cs (3)
49Debug.Assert(node.ApplicableMethods.All(m => !m.RequiresInstanceReceiver && TypeSymbol.Equals(m.ContainingType, firstContainer, TypeCompareKind.ConsiderEverything2))); 934var receiverType = receiverTemp.Type; 1418private 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 (7)
24Debug.Assert(TypeSymbol.Equals(node.Right.Type, node.Operator.RightType, TypeCompareKind.ConsiderEverything2)); 156Debug.Assert(TypeSymbol.Equals(transformedLHS.Type, node.Left.Type, TypeCompareKind.AllIgnoreOptions)); 412if (TypeSymbol.Equals( 760private static bool IsInvariantArray(TypeSymbol? type) 833var type = expression.Type; 849var type = expression.Type; 946private 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; 227var type = rewrittenNode.Type; 270TypeSymbol rewrittenType) 305TypeSymbol rewrittenType) 620var sourceType = rewrittenOperand.Type; 740private void EnsureParamCollectionAttributeExists(SyntaxNode node, TypeSymbol delegateType) 753private static bool NeedsCheckedConversionInExpressionTree(TypeSymbol? source, TypeSymbol target, bool explicitCastInCode) 762SpecialType GetUnderlyingSpecialType(TypeSymbol type) => 787private BoundExpression MakeConversionNode(BoundExpression rewrittenOperand, TypeSymbol rewrittenType, bool @checked, bool acceptFailingConversion = false, bool markAsChecked = false) 807TypeSymbol rewrittenType, 840TypeSymbol rewrittenType, 874if (!TypeSymbol.Equals(rewrittenOperand.Type, conversion.BestUserDefinedConversionAnalysis.FromType, TypeCompareKind.ConsiderEverything2)) 884if (!TypeSymbol.Equals(rewrittenOperand.Type, conversion.Method.GetParameterType(0), TypeCompareKind.ConsiderEverything2)) 893TypeSymbol userDefinedConversionRewrittenType = conversion.Method.ReturnType; 913if (!TypeSymbol.Equals(userDefined.Type, conversion.BestUserDefinedConversionAnalysis.ToType, TypeCompareKind.ConsiderEverything2)) 922if (!TypeSymbol.Equals(userDefined.Type, rewrittenType, TypeCompareKind.ConsiderEverything2)) 1039TypeSymbol rewrittenType) 1048TypeSymbol? rewrittenOperandType = rewrittenOperand.Type; 1095TypeSymbol rewrittenType) 1099TypeSymbol rewrittenOperandType = rewrittenOperand.Type; 1104TypeSymbol typeFrom = rewrittenOperandType.StrippedType(); 1105TypeSymbol typeTo = rewrittenType.StrippedType(); 1106if (!TypeSymbol.Equals(typeFrom, typeTo, TypeCompareKind.ConsiderEverything2) && (typeFrom.SpecialType == SpecialType.System_Decimal || typeTo.SpecialType == SpecialType.System_Decimal)) 1109TypeSymbol typeFromUnderlying = typeFrom; 1110TypeSymbol typeToUnderlying = typeTo; 1146TypeSymbol type) 1207TypeSymbol type) 1240TypeSymbol type) 1280TypeSymbol type) 1311Debug.Assert(TypeSymbol.Equals(seq.Type, conditional.Type, TypeCompareKind.ConsiderEverything2)); 1312Debug.Assert(TypeSymbol.Equals(conditional.Type, conditional.Consequence.Type, TypeCompareKind.ConsiderEverything2)); 1313Debug.Assert(TypeSymbol.Equals(conditional.Type, conditional.Alternative.Type, TypeCompareKind.ConsiderEverything2)); 1342TypeSymbol rewrittenType) 1348var parameterType = conversion.Method.GetParameterType(0); 1375Debug.Assert(TypeSymbol.Equals(result.Type, rewrittenType, TypeCompareKind.ConsiderEverything2)); 1379private BoundExpression MakeLiftedUserDefinedConversionConsequence(BoundCall call, TypeSymbol resultType) 1383Debug.Assert(resultType.IsNullableType() && TypeSymbol.Equals(resultType.GetNullableUnderlyingType(), call.Method.ReturnType, TypeCompareKind.ConsiderEverything2)); 1396TypeSymbol rewrittenType) 1486TypeSymbol rewrittenType) 1493TypeSymbol source = rewrittenOperand.Type; 1494TypeSymbol target = rewrittenType; 1535public static SpecialMember GetIntPtrConversionMethod(TypeSymbol source, TypeSymbol target) 1540TypeSymbol t0 = target.StrippedType(); 1541TypeSymbol s0 = source.StrippedType(); 1651private static SpecialMember DecimalConversionMethod(TypeSymbol typeFrom, TypeSymbol typeTo) 1695private BoundExpression RewriteDecimalConversion(SyntaxNode syntax, BoundExpression operand, TypeSymbol fromType, TypeSymbol toType, bool @checked, bool isImplicit, ConstantValue? constantValueOpt) 1723static TypeSymbol get64BitType(CSharpCompilation compilation, bool signed) => compilation.GetSpecialType(signed ? SpecialType.System_Int64 : SpecialType.System_UInt64); 1726private BoundExpression RewriteDecimalConversionCore(SyntaxNode syntax, BoundExpression operand, TypeSymbol fromType, TypeSymbol toType, bool isImplicit, ConstantValue? constantValueOpt) 1744Debug.Assert(TypeSymbol.Equals(method.ReturnType, toType, TypeCompareKind.ConsiderEverything2)); 1752private Conversion TryMakeConversion(SyntaxNode syntax, Conversion conversion, TypeSymbol fromType, TypeSymbol toType, bool @checked) 1853private Conversion TryMakeConversion(SyntaxNode syntax, TypeSymbol fromType, TypeSymbol toType, bool @checked) 1864private 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; 441TypeSymbol localType = localSymbol.Type; 443TypeSymbol? initializerType = initializerExpr.Type; 510TypeSymbol localType = localSymbol.Type; 512TypeSymbol? 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; 311TypeSymbol enumeratorType, 477TypeSymbol awaitExpressionType = disposeAwaitableInfoOpt.GetResult?.ReturnType ?? _compilation.DynamicType; 495private BoundExpression ConvertReceiverForInvocation(CSharpSyntaxNode syntax, BoundExpression receiver, MethodSymbol method, Conversion receiverConversion, TypeSymbol convertedReceiverType) 612TypeSymbol intType = _compilation.GetSpecialType(SpecialType.System_Int32); 613TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean); 784TypeSymbol inlineArrayType = boundArrayVar.Type; 913TypeSymbol intType = _compilation.GetSpecialType(SpecialType.System_Int32); 914TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean); 1063TypeSymbol intType = _compilation.GetSpecialType(SpecialType.System_Int32); 1064TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean); 1232private static BoundLocal MakeBoundLocal(CSharpSyntaxNode syntax, LocalSymbol local, TypeSymbol type) 1252private 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)
187var rewrittenType = VisitType(initializer.Type); 367Debug.Assert(assignment.Type.IsDynamic() || TypeSymbol.Equals(rewrittenAccess.Type, assignment.Type, TypeCompareKind.AllIgnoreOptions)); 421Debug.Assert(TypeSymbol.Equals(rangeArgument.Type, _compilation.GetWellKnownType(WellKnownType.System_Range), TypeCompareKind.ConsiderEverything)); 439Debug.Assert(TypeSymbol.Equals(rewrittenAccess.Type, assignment.Type, TypeCompareKind.AllIgnoreOptions)); 472Debug.Assert(TypeSymbol.Equals(rewrittenAccess.Type, assignment.Type, TypeCompareKind.AllIgnoreOptions)); 484if (TypeSymbol.Equals(implicitIndexer.Argument.Type, _compilation.GetWellKnownType(WellKnownType.System_Index), TypeCompareKind.ConsiderEverything)) 506Debug.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_StringConcat.cs (2)
37private BoundExpression RewriteStringConcatenation(SyntaxNode syntax, BinaryOperatorKind operatorKind, BoundExpression loweredLeft, BoundExpression loweredRight, TypeSymbol type) 593private BoundExpression RewriteStringConcatInExpressionLambda(SyntaxNode syntax, BinaryOperatorKind operatorKind, BoundExpression loweredLeft, BoundExpression loweredRight, TypeSymbol type)
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 (23)
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) 439TypeSymbol? operandType = transformedLHS.Type; //type of the variable being incremented 441Debug.Assert(TypeSymbol.Equals(operandType, node.Type, TypeCompareKind.ConsiderEverything2)); 640TypeSymbol type = node.MethodOpt.GetParameterType(0); 644Debug.Assert(TypeSymbol.Equals(node.MethodOpt.GetParameterType(0), node.MethodOpt.ReturnType, TypeCompareKind.ConsiderEverything2)); 730TypeSymbol unaryOperandType = GetUnaryOperatorType(node); 739(TypeSymbol binaryOperandType, ConstantValue constantOne) = GetConstantOneForIncrement(_compilation, binaryOperatorKind); 897private TypeSymbol GetUnaryOperatorType(BoundIncrementOperator node) 1018TypeSymbol? underlyingType = node.Type; 1084private 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 (14)
105var newType = VisitType(local.Type); 106if (TypeSymbol.Equals(newType, local.Type, TypeCompareKind.ConsiderEverything2)) 169var newType = this.VisitType(node.Type); 210public sealed override TypeSymbol? VisitType(TypeSymbol? type) 234var rewrittenType = this.VisitType(node.Type); 512TypeSymbol rewrittenType = VisitType(node.Type); 555TypeSymbol type = this.VisitType(node.Type); 565if (!TypeSymbol.Equals(rewritten.Type, node.Type, TypeCompareKind.ConsiderEverything2) && (object)node.Constructor != null) 597TypeSymbol type = this.VisitType(node.Type); 611TypeSymbol type = this.VisitType(node.Type); 698TypeSymbol type = this.VisitType(node.Type); 699TypeSymbol receiverType = this.VisitType(node.ReceiverType); 721TypeSymbol type = this.VisitType(node.Type);
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); 557var type = TypeMap.SubstituteType(local.Type).Type; 559Debug.Assert(TypeSymbol.Equals(type, replacement.Type, TypeCompareKind.ConsiderEverything2)); 678TypeSymbol fieldType = expr.Type;
Lowering\StateMachineRewriter\StateMachineFieldSymbol.cs (2)
36public StateMachineFieldSymbol(NamedTypeSymbol stateMachineType, TypeSymbol type, string name, SynthesizedLocalKind synthesizedKind, int slotIndex, bool isPublic) 41public 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)
119protected virtual ImmutableArray<TypeSymbol> ExtraSynthesizedRefParameters 121get { return default(ImmutableArray<TypeSymbol>); } 152foreach (var extra in extraSynthed)
Lowering\SynthesizedSubmissionFields.cs (1)
63var hostObjectTypeSymbol = _compilation.GetHostObjectTypeSymbol();
Lowering\SyntheticBoundNodeFactory.cs (50)
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 StateMachineField(TypeSymbol type, string name, SynthesizedLocalKind synthesizedKind, int slotIndex) 194public StateMachineFieldSymbol StateMachineField(TypeSymbol type, string name, LocalSlotDebugInfo slotDebugInfo, int slotIndex) 231public BoundBadExpression BadExpression(TypeSymbol type) 582TypeSymbol type, 604TypeSymbol type, 624public ParameterSymbol SynthesizedParameter(TypeSymbol type, string name, MethodSymbol? container = null, int ordinal = 0) 629public BoundBinaryOperator Binary(BinaryOperatorKind kind, TypeSymbol type, BoundExpression left, BoundExpression right) 634public BoundAsOperator As(BoundExpression operand, TypeSymbol type) 639public BoundIsOperator Is(BoundExpression operand, TypeSymbol type) 726public BoundLiteral Literal(ConstantValue value, TypeSymbol type) 785public BoundExpression StaticCall(TypeSymbol receiver, MethodSymbol method, params BoundExpression[] args) 806public BoundExpression StaticCall(WellKnownMember method, ImmutableArray<TypeSymbol> typeArgs, params BoundExpression[] args) 894public BoundExpression Conditional(BoundExpression condition, BoundExpression consequence, BoundExpression alternative, TypeSymbol type, bool isRef = false) 902Debug.Assert(TypeSymbol.Equals(valueTypeReceiver.Type, referenceTypeReceiver.Type, TypeCompareKind.ConsiderEverything2)); 1017public BoundSequence Sequence(BoundExpression[] sideEffects, BoundExpression result, TypeSymbol? type = null) 1020var resultType = type ?? result.Type; 1212public BoundExpression ThrowExpression(BoundExpression thrown, TypeSymbol type) 1217public BoundExpression Null(TypeSymbol type) 1229public static BoundExpression Null(TypeSymbol type, SyntaxNode syntax) 1238public BoundTypeExpression Type(TypeSymbol type) 1243public BoundExpression Typeof(WellKnownType type, TypeSymbol systemType) 1248public BoundExpression Typeof(TypeSymbol type, TypeSymbol systemType) 1264Debug.Assert(TypeSymbol.Equals(systemType, getTypeFromHandle.ReturnType, TypeCompareKind.AllIgnoreOptions)); 1274public BoundExpression Typeof(TypeWithAnnotations type, TypeSymbol systemType) 1279public ImmutableArray<BoundExpression> TypeOfs(ImmutableArray<TypeWithAnnotations> typeArguments, TypeSymbol systemType) 1290public BoundExpression Sizeof(TypeSymbol type) 1364public BoundExpression InstrumentationPayloadRoot(int analysisKind, TypeSymbol payloadType) 1395public BoundExpression MethodInfo(MethodSymbol method, TypeSymbol systemReflectionMethodInfo) 1430private MethodSymbol GetMethodFromHandleMethod(NamedTypeSymbol methodContainer, TypeSymbol systemReflectionMethodOrConstructorInfo) 1462public BoundExpression Convert(TypeSymbol type, BoundExpression arg, bool allowBoxingByRefLikeTypeParametersToObject = false) 1466if (TypeSymbol.Equals(type, arg.Type, TypeCompareKind.ConsiderEverything2)) 1492public BoundExpression Convert(TypeSymbol type, BoundExpression arg, Conversion conversion, bool isChecked = false) 1496if (conversion.Method is { } && !TypeSymbol.Equals(conversion.Method.Parameters[0].Type, arg.Type, TypeCompareKind.ConsiderEverything2)) 1519public BoundExpression ArrayOrEmpty(TypeSymbol elementType, BoundExpression[] elements) 1531public BoundExpression ArrayOrEmpty(TypeSymbol elementType, ImmutableArray<BoundExpression> elements) 1546public BoundExpression Array(TypeSymbol elementType, ImmutableArray<BoundExpression> elements) 1555public BoundExpression Array(TypeSymbol elementType, BoundExpression length) 1565internal BoundExpression Default(TypeSymbol type) 1570internal static BoundExpression Default(TypeSymbol type, SyntaxNode syntax) 1610internal BoundExpression NullOrDefault(TypeSymbol typeSymbol) 1615internal static BoundExpression NullOrDefault(TypeSymbol typeSymbol, SyntaxNode syntax) 1676var type = argument.Type; 1746TypeSymbol exprType = rewrittenExpr.Type; 1755TypeSymbol boolType = Compilation.GetSpecialType(CodeAnalysis.SpecialType.System_Boolean); 1769TypeSymbol objectType = SpecialType(CodeAnalysis.SpecialType.System_Object); 1808TypeSymbol 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)
152internal sealed override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol> basesBeingResolved) 256internal sealed override NamedTypeSymbol GetDeclaredBaseType(ConsList<TypeSymbol> basesBeingResolved) 261internal sealed override ImmutableArray<NamedTypeSymbol> GetDeclaredInterfaces(ConsList<TypeSymbol> basesBeingResolved) 273internal abstract override bool Equals(TypeSymbol t2, TypeCompareKind comparison); 296internal sealed override bool HasCollectionBuilderAttribute(out TypeSymbol? builderType, out string? methodName) 303internal 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)
33TypeSymbol objectType, 34TypeSymbol intPtrType, 35TypeSymbol? voidReturnTypeOpt, 51static SynthesizedDelegateInvokeMethod createInvokeMethod(AnonymousDelegateTemplateSymbol containingType, RefKindVector refKinds, TypeSymbol? voidReturnTypeOpt) 240internal 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)
232internal sealed override NamedTypeSymbol GetDeclaredBaseType(ConsList<TypeSymbol> basesBeingResolved) 237internal sealed override ImmutableArray<NamedTypeSymbol> GetDeclaredInterfaces(ConsList<TypeSymbol> basesBeingResolved) 336internal sealed override bool HasCollectionBuilderAttribute(out TypeSymbol? builderType, out string? methodName) 343internal 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)
212public TypeSymbol ElementType 341internal override bool Equals(TypeSymbol? t2, TypeCompareKind comparison) 375TypeSymbol current = this; 391internal override bool ApplyNullableTransforms(byte defaultTransformFlag, ImmutableArray<byte> transforms, ref int position, out TypeSymbol result) 406internal override TypeSymbol SetNullabilityForReferenceTypes(Func<TypeWithAnnotations, TypeWithAnnotations> transform) 411internal override TypeSymbol MergeEquivalentTypes(TypeSymbol other, VarianceKind variance) 463internal override bool GetUnificationUseSiteDiagnosticRecursive(ref DiagnosticInfo result, Symbol owner, ref HashSet<TypeSymbol> checkedTypes) 548internal override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol>? basesBeingResolved = null) 595internal 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)
252internal static void DecodeMemberNotNullAttribute<T>(TypeSymbol type, ref DecodeWellKnownAttributeArguments<AttributeSyntax, CSharpAttributeData, AttributeLocation> arguments) 288private static void ReportBadNotNullMemberIfNeeded(TypeSymbol type, DecodeWellKnownAttributeArguments<AttributeSyntax, CSharpAttributeData, AttributeLocation> arguments, string memberName) 302internal static void DecodeMemberNotNullWhenAttribute<T>(TypeSymbol type, ref DecodeWellKnownAttributeArguments<AttributeSyntax, CSharpAttributeData, AttributeLocation> arguments) 369var firstArgType = (TypeSymbol?)firstArg.TypeInternal; 644var builderType = (TypeSymbol?)CommonConstructorArguments[0].ValueInternal;
Symbols\Attributes\PEAttributeData.cs (1)
79TypeSymbol? 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) 583private static readonly Func<TypeSymbol, CheckConstraintsArgsBoxed, bool, bool> s_checkConstraintsSingleTypeFunc = (type, arg, unused) => CheckConstraintsSingleType(type, in arg.Args); 585private static bool CheckConstraintsSingleType(TypeSymbol type, in CheckConstraintsArgs args) 674ConsList<TypeSymbol> basesBeingResolved) 752private static bool HasDuplicateInterfaces(NamedTypeSymbol type, ConsList<TypeSymbol> basesBeingResolved) 1201var type = typeWithAnnotations.Type; 1244var type = typeWithAnnotations.Type; 1422private static TypeParameterDiagnosticInfo GenerateConflictingConstraintsError(TypeParameterSymbol typeParameter, TypeSymbol deducedBase, bool classConflict) 1452private static ConstructorConstraintError SatisfiesConstructorConstraint(TypeSymbol typeArgument) 1523private static bool IsEncompassedBy(ConversionsBase conversions, TypeSymbol a, TypeSymbol b, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1534private static bool IsValidEncompassedByArgument(TypeSymbol type) 1594private 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)
88internal override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol>? basesBeingResolved) 183internal override bool GetUnificationUseSiteDiagnosticRecursive(ref DiagnosticInfo result, Symbol owner, ref HashSet<TypeSymbol> checkedTypes) 195internal override bool Equals(TypeSymbol? t2, TypeCompareKind comparison) 220internal override bool ApplyNullableTransforms(byte defaultTransformFlag, ImmutableArray<byte> transforms, ref int position, out TypeSymbol result) 226internal override TypeSymbol SetNullabilityForReferenceTypes(Func<TypeWithAnnotations, TypeWithAnnotations> transform) 231internal 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)
37/// Called by <see cref="AbstractTypeMap.SubstituteType(TypeSymbol)"/> to perform substitution 446internal override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol>? basesBeingResolved) 456internal override NamedTypeSymbol? GetDeclaredBaseType(ConsList<TypeSymbol> basesBeingResolved) 461internal override ImmutableArray<NamedTypeSymbol> GetDeclaredInterfaces(ConsList<TypeSymbol> basesBeingResolved) 573internal sealed override bool HasCollectionBuilderAttribute(out TypeSymbol? builderType, out string? methodName) 580internal 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; 296HashSet<TypeSymbol>? unificationCheckedTypes = null; 346return 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\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)
18public static FunctionPointerTypeSymbol CreateFromSource(FunctionPointerTypeSyntax syntax, Binder typeBinder, BindingDiagnosticBag diagnostics, ConsList<TypeSymbol> basesBeingResolved, bool suppressUseSiteDiagnostics) 55public static FunctionPointerTypeSymbol CreateFromMetadata(ModuleSymbol containingModule, Cci.CallingConvention callingConvention, ImmutableArray<ParamInfo<TypeSymbol>> retAndParamTypes) 97internal override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol>? basesBeingResolved = null) => ImmutableArray<NamedTypeSymbol>.Empty; 99internal override bool Equals(TypeSymbol t2, TypeCompareKind compareKind) 135internal override bool ApplyNullableTransforms(byte defaultTransformFlag, ImmutableArray<byte> transforms, ref int position, out TypeSymbol result) 155internal override bool GetUnificationUseSiteDiagnosticRecursive(ref DiagnosticInfo? result, Symbol owner, ref HashSet<TypeSymbol> checkedTypes) 160internal override TypeSymbol MergeEquivalentTypes(TypeSymbol other, VarianceKind variance) 172internal 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"/> 152internal override bool ApplyNullableTransforms(byte defaultTransformFlag, ImmutableArray<byte> transforms, ref int position, out TypeSymbol result) => throw ExceptionUtilities.Unreachable(); 156internal override bool GetUnificationUseSiteDiagnosticRecursive(ref DiagnosticInfo result, Symbol owner, ref HashSet<TypeSymbol> checkedTypes) => throw ExceptionUtilities.Unreachable(); 158internal override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol>? basesBeingResolved = null) => ImmutableArray<NamedTypeSymbol>.Empty; 160internal override TypeSymbol MergeEquivalentTypes(TypeSymbol other, VarianceKind variance) 179internal override TypeSymbol SetNullabilityForReferenceTypes(Func<TypeWithAnnotations, TypeWithAnnotations> transform) 205internal 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 (3)
228return ((TypeSymbol)m).CustomModifierCount(); 340internal static ImmutableArray<TypeSymbol> GetMemberTypeArgumentsNoUseSiteDiagnostics(this Symbol symbol) 352return 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); 1699internal 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)
483internal override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol> basesBeingResolved = null) 498internal override NamedTypeSymbol GetDeclaredBaseType(ConsList<TypeSymbol> basesBeingResolved) 518TypeSymbol decodedType = DynamicTypeDecoder.TransformType(baseType, 0, _handle, moduleSymbol); 530internal override ImmutableArray<NamedTypeSymbol> GetDeclaredInterfaces(ConsList<TypeSymbol> basesBeingResolved) 577TypeSymbol typeSymbol = tokenDecoder.GetTypeOfToken(interfaceHandle); 1225FieldInfo<TypeSymbol> fieldInfo = decoder.DecodeFieldSignature(fieldDef); 1226TypeSymbol type = fieldInfo.Type; 1769TypeSymbol @base = GetDeclaredBaseType(skipTransformsIfNecessary: true); 1816private static ExtendedErrorTypeSymbol CyclicInheritanceError(TypeSymbol declaredBase) 2132TypeSymbol @base = GetDeclaredBaseType(null); 2360var type = this.ContainingPEModule.TryDecodeAttributeWithTypeArgument(this.Handle, AttributeDescription.CoClassAttribute); 2492internal sealed override bool HasCollectionBuilderAttribute(out TypeSymbol? builderType, out string? methodName) 2533internal override bool HasAsyncMethodBuilderAttribute(out TypeSymbol? builderArgument) 2596internal 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)
267var typeSymbol = tokenDecoder.DecodeGenericParameterConstraint(constraint.Type, out ImmutableArray<ModifierInfo<TypeSymbol>> modifiers); 278ModifierInfo<TypeSymbol> m = modifiers.Single(); 633internal 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; 738public MethodSymbol ReduceExtensionMethod(TypeSymbol receiverType, CSharpCompilation compilation) 750public MethodSymbol ReduceExtensionMethod(TypeSymbol receiverType, CSharpCompilation compilation, out bool wasFullyInferred) 815public virtual TypeSymbol ReceiverType 831public virtual TypeSymbol GetTypeInferredDuringReduction(TypeParameterSymbol reducedFromTypeParameter) 841public MethodSymbol Construct(params TypeSymbol[] typeArguments) 852public MethodSymbol Construct(ImmutableArray<TypeSymbol> typeArguments) 906internal TypeSymbol GetParameterType(int index) => ParameterTypesWithAnnotations[index].Type; 970HashSet<TypeSymbol> unificationCheckedTypes = null; 1238return 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)
173internal 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)
768internal abstract NamedTypeSymbol GetDeclaredBaseType(ConsList<TypeSymbol> basesBeingResolved); 770internal abstract ImmutableArray<NamedTypeSymbol> GetDeclaredInterfaces(ConsList<TypeSymbol> basesBeingResolved); 789internal override bool Equals(TypeSymbol t2, TypeCompareKind comparison) 925internal override bool ApplyNullableTransforms(byte defaultTransformFlag, ImmutableArray<byte> transforms, ref int position, out TypeSymbol result) 959internal override TypeSymbol SetNullabilityForReferenceTypes(Func<TypeWithAnnotations, TypeWithAnnotations> transform) 993internal override TypeSymbol MergeEquivalentTypes(TypeSymbol other, VarianceKind variance) 1105public NamedTypeSymbol Construct(params TypeSymbol[] typeArguments) 1116public NamedTypeSymbol Construct(ImmutableArray<TypeSymbol> typeArguments) 1126public NamedTypeSymbol Construct(IEnumerable<TypeSymbol> typeArguments) 1155internal abstract bool HasAsyncMethodBuilderAttribute(out TypeSymbol builderArgument); 1166private NamedTypeSymbol ConstructWithoutModifiers(ImmutableArray<TypeSymbol> typeArguments, bool unbound) 1265internal void GetAllTypeArguments(ref TemporaryArray<TypeSymbol> builder, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1334protected sealed override TypeSymbol OriginalTypeSymbolDefinition 1414HashSet<TypeSymbol> unificationCheckedTypes = null; 1441internal override bool GetUnificationUseSiteDiagnosticRecursive(ref DiagnosticInfo result, Symbol owner, ref HashSet<TypeSymbol> checkedTypes) 1616internal abstract bool HasCollectionBuilderAttribute(out TypeSymbol? builderType, out string? methodName); 1620/// Requires less computation than <see cref="TypeSymbol.TypeKind"/> == <see cref="TypeKind.Interface"/>. 1654TypeSymbol typeToCheck = this;
Symbols\NamespaceSymbol.cs (1)
228var types = this.GetTypeMembers(TypeSymbol.ImplicitTypeName);
Symbols\NativeIntegerTypeSymbol.cs (8)
148internal override NamedTypeSymbol GetDeclaredBaseType(ConsList<TypeSymbol> basesBeingResolved) => _underlyingType.GetDeclaredBaseType(basesBeingResolved); 150internal override ImmutableArray<NamedTypeSymbol> GetDeclaredInterfaces(ConsList<TypeSymbol> basesBeingResolved) => GetInterfaces(basesBeingResolved); 160internal override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol>? basesBeingResolved = null) => GetInterfaces(basesBeingResolved); 187internal override bool Equals(TypeSymbol? other, TypeCompareKind comparison) 216private ImmutableArray<NamedTypeSymbol> GetInterfaces(ConsList<TypeSymbol>? basesBeingResolved) 285internal sealed override bool HasCollectionBuilderAttribute(out TypeSymbol? builderType, out string? methodName) 292internal sealed override bool HasAsyncMethodBuilderAttribute(out TypeSymbol? builderArgument) 393internal 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)
76public TypeSymbol PointedAtType => PointedAtTypeWithAnnotations.Type; 87internal override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol>? basesBeingResolved) 218TypeSymbol current = this; 228internal override bool Equals(TypeSymbol? t2, TypeCompareKind comparison) 253internal override bool ApplyNullableTransforms(byte defaultTransformFlag, ImmutableArray<byte> transforms, ref int position, out TypeSymbol result) 268internal override TypeSymbol SetNullabilityForReferenceTypes(Func<TypeWithAnnotations, TypeWithAnnotations> transform) 273internal override TypeSymbol MergeEquivalentTypes(TypeSymbol other, VarianceKind variance) 294internal override bool GetUnificationUseSiteDiagnosticRecursive(ref DiagnosticInfo result, Symbol owner, ref HashSet<TypeSymbol> checkedTypes)
Symbols\PropertySymbol.cs (3)
91public TypeSymbol Type => TypeWithAnnotations.Type; 414HashSet<TypeSymbol> unificationCheckedTypes = null; 474return 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)
380internal sealed override bool HasAsyncMethodBuilderAttribute(out TypeSymbol builderArgument)
Symbols\Retargeting\RetargetingNamedTypeSymbol.cs (6)
267private static ExtendedErrorTypeSymbol CyclicInheritanceError(TypeSymbol declaredBase) 303internal override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol> basesBeingResolved) 328internal override NamedTypeSymbol GetDeclaredBaseType(ConsList<TypeSymbol> basesBeingResolved) 340internal override ImmutableArray<NamedTypeSymbol> GetDeclaredInterfaces(ConsList<TypeSymbol> basesBeingResolved) 418internal sealed override bool HasCollectionBuilderAttribute(out TypeSymbol? builderType, out string? methodName) 428internal 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)
118TypeSymbol.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) 187internal 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(); 399&& 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 (1)
735TypeSymbol parameterType = parameter.Type;
Symbols\Source\SourceAssemblySymbol.cs (11)
108internal ConcurrentSet<TypeSymbol> TypesReferencedInExternalMethods = new ConcurrentSet<TypeSymbol>(); 650TypeSymbol compilationRelaxationsAttribute = compilation.GetWellKnownType(WellKnownType.System_Runtime_CompilerServices_CompilationRelaxationsAttribute); 659TypeSymbol runtimeCompatibilityAttribute = compilation.GetWellKnownType(WellKnownType.System_Runtime_CompilerServices_RuntimeCompatibilityAttribute); 692TypeSymbol unverifiableCodeAttribute = compilation.GetWellKnownType(WellKnownType.System_Security_UnverifiableCodeAttribute); 704TypeSymbol securityPermissionAttribute = compilation.GetWellKnownType(WellKnownType.System_Security_Permissions_SecurityPermissionAttribute); 711TypeSymbol securityAction = compilation.GetWellKnownType(WellKnownType.System_Security_Permissions_SecurityAction); 1236if (uniqueAttributes == null || !uniqueAttributes.Contains((a) => TypeSymbol.Equals(a.AttributeClass, attributeClass, TypeCompareKind.ConsiderEverything2))) 2207TypeSymbol forwardedType = (TypeSymbol)arguments.Attribute.CommonConstructorArguments[0].ValueInternal; 2780private static string DefaultValue(TypeSymbol type)
Symbols\Source\SourceComplexParameterSymbol.cs (6)
1015else if (!compilation.Conversions.ClassifyConversionFromType((TypeSymbol)arg.TypeInternal, this.Type, isChecked: false, ref useSiteInfo).Kind.IsImplicitConversion()) 1073TypeSymbol intType = compilation.GetSpecialType(SpecialType.System_Int32); 1101TypeSymbol stringType = compilation.GetSpecialType(SpecialType.System_String); 1134TypeSymbol stringType = compilation.GetSpecialType(SpecialType.System_String); 1175TypeSymbol stringType = compilation.GetSpecialType(SpecialType.System_String); 1558var elementType = elementTypeWithAnnotations.Type;
Symbols\Source\SourceCustomEventSymbol.cs (2)
23private readonly TypeSymbol _explicitInterfaceType; 228TypeSymbol.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)
627TypeSymbol overriddenEventType = eventWithCustomModifiers.Type;
Symbols\Source\SourceFixedFieldSymbol.cs (3)
89TypeSymbol intType = binder.GetSpecialType(SpecialType.System_Int32, diagnostics, sizeExpression); 109TypeSymbol elementType = ((PointerTypeSymbol)this.Type).PointedAtType; 183var elementType = ((PointerTypeSymbol)_field.Type).PointedAtType;
Symbols\Source\SourceLocalSymbol.cs (1)
582var type = this.Type;
Symbols\Source\SourceMemberContainerSymbol.cs (11)
1070Debug.Assert(!nonTypeMembers.Any(static s => s is TypeSymbol)); 1412internal override bool HasAsyncMethodBuilderAttribute(out TypeSymbol? builderArgument) 1421internal static bool HasAsyncMethodBuilderAttribute(Symbol symbol, [NotNullWhen(true)] out TypeSymbol? builderArgument) 1434builderArgument = (TypeSymbol)attr.CommonConstructorArguments[0].ValueInternal!; 1900static bool needsTupleElementNamesAttribute(TypeSymbol type) 1907var resultType = type.VisitType( 2403var type = field.NonPointerType(); 2440if (member is TypeSymbol) 2718return (!TypeSymbol.Equals(oldInstance, t, TypeCompareKind.AllNullableIgnoreOptions)) && ReferenceEquals(tOriginal, top); 2967Debug.Assert(!nonTypeMembers.Any(static s => s is TypeSymbol)); 3951var 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)) 1190internal static bool IsOrContainsErrorType(TypeSymbol typeSymbol) 1345TypeSymbol sourceType, 1346TypeSymbol targetType) 1761TypeSymbol.Equals(interface1.OriginalDefinition, interface2.OriginalDefinition, TypeCompareKind.ConsiderEverything2) &&
Symbols\Source\SourceMemberFieldSymbol.cs (2)
47protected void TypeChecks(TypeSymbol type, BindingDiagnosticBag diagnostics) 573var elementType = ((PointerTypeSymbol)type.Type).PointedAtType;
Symbols\Source\SourceMethodSymbol.cs (1)
87internal override bool HasAsyncMethodBuilderAttribute(out TypeSymbol? builderArgument)
Symbols\Source\SourceMethodSymbolWithAttributes.cs (2)
1399static void checkAndReportManagedTypes(TypeSymbol type, RefKind refKind, SyntaxNode syntax, bool isParam, BindingDiagnosticBag diagnostics) 1601var returnType = methodSymbol.ReturnType;
Symbols\Source\SourceNamedTypeSymbol.cs (12)
61TypeSymbol bt = baseBinder.BindType(t, BindingDiagnosticBag.Discarded).Type; 63if (TypeSymbol.Equals(bt, @base, TypeCompareKind.ConsiderEverything2)) 1031TypeSymbol? builderType = attributeData.CommonConstructorArguments[0].ValueInternal as TypeSymbol; 1182var builderType = attribute.CommonConstructorArguments[0].ValueInternal as TypeSymbol; 1230internal static bool IsValidCollectionBuilderType([NotNullWhen(true)] TypeSymbol? builderType) 1365internal sealed override bool HasCollectionBuilderAttribute(out TypeSymbol? builderType, out string? methodName) 1768internal override bool Equals(TypeSymbol t2, TypeCompareKind comparison) 1867bool fieldSupported = TypeSymbol.IsInlineArrayElementFieldSupported(elementField); 1872TypeSymbol returnType = conversion.ReturnType; 1873TypeSymbol 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\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)
308Debug.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; 932protected sealed override TypeSymbol ExplicitInterfaceType 963private readonly TypeSymbol _explicitInterfaceType; 976TypeSymbol explicitInterfaceType, 995protected sealed override TypeSymbol ExplicitInterfaceType => _explicitInterfaceType;
Symbols\Source\SourceParameterSymbol.cs (2)
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)
132internal 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)
54private readonly TypeSymbol _explicitInterfaceType; 85TypeSymbol? explicitInterfaceType, 1021TypeSymbol.CheckModifierMismatchOnImplementingMember(this.ContainingType, this, explicitlyImplementedProperty, isExplicit: true, diagnostics); 1179else if (TypeSymbol.HaveInitOnlyMismatch(thisAccessor, otherAccessor)) 1832var 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)
44TypeSymbol explicitInterfaceType; 61TypeSymbol explicitInterfaceType,
Symbols\Source\SourceUserDefinedOperatorSymbolBase.cs (14)
21private readonly TypeSymbol? _explicitInterfaceType; 26TypeSymbol explicitInterfaceType, 326protected sealed override TypeSymbol? ExplicitInterfaceType => _explicitInterfaceType; 443var source = this.GetParameterType(0); 444var target = this.ReturnType; 445var source0 = source.StrippedType(); 446var target0 = target.StrippedType(); 553TypeSymbol same; 554TypeSymbol different; 670var parameterType = this.GetParameterType(0); 691private bool MatchesContainingType(TypeSymbol type) 696private bool IsContainingType(TypeSymbol type) 701public static bool IsSelfConstrainedTypeParameter(TypeSymbol type, NamedTypeSymbol containingType) 710private bool IsSelfConstrainedTypeParameter(TypeSymbol type)
Symbols\Source\ThisParameterSymbol.cs (2)
127private readonly TypeSymbol _containingType; 133internal ThisParameterSymbol(MethodSymbol? forMethod, TypeSymbol containingType)
Symbols\Source\TypeParameterConstraintClause.cs (2)
174TypeSymbol type = constraintType.IsResolved ? constraintType.Type : constraintType.DefaultType; 234TypeSymbol 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)
43Debug.Assert(TypeSymbol.Equals(originalDefinition.ContainingType, containingSymbol.OriginalDefinition, TypeCompareKind.ConsiderEverything2)); 158public override TypeSymbol ReceiverType 172public override TypeSymbol GetTypeInferredDuringReduction(TypeParameterSymbol reducedFromTypeParameter) 175var notUsed = OriginalDefinition.GetTypeInferredDuringReduction(reducedFromTypeParameter); 438if (!TypeSymbol.Equals(this.ContainingType, other.ContainingType, compareKind)) return false; 475internal sealed override bool HasAsyncMethodBuilderAttribute(out TypeSymbol builderArgument)
Symbols\SubstitutedNamedTypeSymbol.cs (6)
144internal sealed override NamedTypeSymbol GetDeclaredBaseType(ConsList<TypeSymbol> basesBeingResolved) 149internal sealed override ImmutableArray<NamedTypeSymbol> GetDeclaredInterfaces(ConsList<TypeSymbol> basesBeingResolved) 174internal sealed override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol> basesBeingResolved) 184internal abstract override bool GetUnificationUseSiteDiagnosticRecursive(ref DiagnosticInfo result, Symbol owner, ref HashSet<TypeSymbol> checkedTypes); 441internal sealed override bool HasCollectionBuilderAttribute(out TypeSymbol? builderType, out string? methodName) 446internal sealed override bool HasAsyncMethodBuilderAttribute(out TypeSymbol? builderArgument)
Symbols\SubstitutedTypeParameterSymbol.cs (1)
180internal override TypeSymbol GetDeducedBaseType(ConsList<TypeParameterSymbol> inProgress)
Symbols\Symbol.cs (7)
1197internal bool DeriveUseSiteInfoFromType(ref UseSiteInfo<AssemblySymbol> result, TypeSymbol type) 1329internal static bool GetUnificationUseSiteDiagnosticRecursive<T>(ref DiagnosticInfo result, ImmutableArray<T> types, Symbol owner, ref HashSet<TypeSymbol> checkedTypes) where T : TypeSymbol 1342internal static bool GetUnificationUseSiteDiagnosticRecursive(ref DiagnosticInfo result, ImmutableArray<TypeWithAnnotations> types, Symbol owner, ref HashSet<TypeSymbol> checkedTypes) 1355internal static bool GetUnificationUseSiteDiagnosticRecursive(ref DiagnosticInfo result, ImmutableArray<CustomModifier> modifiers, Symbol owner, ref HashSet<TypeSymbol> checkedTypes) 1368internal static bool GetUnificationUseSiteDiagnosticRecursive(ref DiagnosticInfo result, ImmutableArray<ParameterSymbol> parameters, Symbol owner, ref HashSet<TypeSymbol> checkedTypes) 1382internal static bool GetUnificationUseSiteDiagnosticRecursive(ref DiagnosticInfo result, ImmutableArray<TypeParameterSymbol> typeParameters, Symbol owner, ref HashSet<TypeSymbol> checkedTypes)
Symbols\Symbol_Attributes.cs (1)
477boundAttribute.CommonConstructorArguments[0].ValueInternal is TypeSymbol &&
Symbols\SymbolExtensions.cs (13)
87public static bool IsNoMoreVisibleThan(this Symbol symbol, TypeSymbol type, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 232public static bool IsContainingSymbolOfAllTypeParameters(this Symbol containingSymbol, TypeSymbol type) 241public static bool IsContainingSymbolOfAllTypeParameters(this Symbol containingSymbol, ImmutableArray<TypeSymbol> types) 246private static readonly Func<TypeSymbol, Symbol, bool, bool> s_hasInvalidTypeParameterFunc = 249private static bool HasInvalidTypeParameter(TypeSymbol type, Symbol? containingSymbol) 281Debug.Assert(!(symbol is TypeSymbol)); 420internal static TypeSymbol? EnsureCSharpSymbolOrNull(this ITypeSymbol? symbol, string paramName) 422return (TypeSymbol?)EnsureCSharpSymbolOrNull((ISymbol?)symbol, paramName); 530returnType = TypeWithAnnotations.Create((TypeSymbol)symbol); 593internal static ITypeSymbol? GetPublicSymbol(this TypeSymbol? symbol) 714internal static ImmutableArray<ITypeSymbol> GetPublicSymbols(this ImmutableArray<TypeSymbol> symbols) 778internal static TypeSymbol? GetSymbol(this ITypeSymbol? symbol) 780return symbol.GetSymbol<TypeSymbol>();
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)
218internal override NamedTypeSymbol GetDeclaredBaseType(ConsList<TypeSymbol> basesBeingResolved) => BaseTypeNoUseSiteDiagnostics; 220internal override ImmutableArray<NamedTypeSymbol> GetDeclaredInterfaces(ConsList<TypeSymbol> basesBeingResolved) => _interfaces; 238internal override bool HasCollectionBuilderAttribute(out TypeSymbol? builderType, out string? methodName) 251internal override bool HasAsyncMethodBuilderAttribute(out TypeSymbol? builderArgument) 259internal 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)
275TypeSymbol fieldType = kind switch 738TypeSymbol fieldType = fieldReference.Type; 900internal override NamedTypeSymbol GetDeclaredBaseType(ConsList<TypeSymbol> basesBeingResolved) => BaseTypeNoUseSiteDiagnostics; 902internal override ImmutableArray<NamedTypeSymbol> GetDeclaredInterfaces(ConsList<TypeSymbol> basesBeingResolved) => _interfaces; 926internal override bool HasCollectionBuilderAttribute(out TypeSymbol? builderType, out string? methodName) 939internal override bool HasAsyncMethodBuilderAttribute(out TypeSymbol? builderArgument) 947internal 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\SynthesizedRecordOrdinaryMethod.cs (1)
69protected sealed override TypeSymbol? ExplicitInterfaceType => null;
Symbols\Synthesized\Records\SynthesizedRecordPropertySymbol.cs (1)
70private static bool ShouldUseInit(TypeSymbol container)
Symbols\Synthesized\SynthesizedAccessorValueParameterSymbol.cs (1)
134TypeSymbol eventTokenType = @event.DeclaringCompilation.GetWellKnownType(WellKnownType.System_Runtime_InteropServices_WindowsRuntime_EventRegistrationToken);
Symbols\Synthesized\SynthesizedContainer.cs (5)
158internal override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol> basesBeingResolved) => ImmutableArray<NamedTypeSymbol>.Empty; 164internal override NamedTypeSymbol GetDeclaredBaseType(ConsList<TypeSymbol> basesBeingResolved) => BaseTypeNoUseSiteDiagnostics; 166internal override ImmutableArray<NamedTypeSymbol> GetDeclaredInterfaces(ConsList<TypeSymbol> basesBeingResolved) => InterfacesNoUseSiteDiagnostics(basesBeingResolved); 224internal sealed override bool HasCollectionBuilderAttribute(out TypeSymbol? builderType, out string? methodName) 231internal 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)
155internal override NamedTypeSymbol GetDeclaredBaseType(ConsList<TypeSymbol> basesBeingResolved) => _baseType; 157internal override ImmutableArray<NamedTypeSymbol> GetDeclaredInterfaces(ConsList<TypeSymbol> basesBeingResolved) => ImmutableArray<NamedTypeSymbol>.Empty; 169internal override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol> basesBeingResolved = null) => ImmutableArray<NamedTypeSymbol>.Empty; 212internal sealed override bool HasCollectionBuilderAttribute(out TypeSymbol? builderType, out string? methodName) 219internal 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) 123internal override NamedTypeSymbol GetDeclaredBaseType(ConsList<TypeSymbol> basesBeingResolved) => _baseType; 124internal override ImmutableArray<NamedTypeSymbol> GetDeclaredInterfaces(ConsList<TypeSymbol> basesBeingResolved) => []; 129internal override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol>? basesBeingResolved = null) => []; 149internal sealed override bool HasCollectionBuilderAttribute(out TypeSymbol? builderType, out string? methodName) 156internal 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)
149internal override NamedTypeSymbol GetDeclaredBaseType(ConsList<TypeSymbol> basesBeingResolved) => BaseTypeNoUseSiteDiagnostics; 151internal override ImmutableArray<NamedTypeSymbol> GetDeclaredInterfaces(ConsList<TypeSymbol> basesBeingResolved) => ImmutableArray<NamedTypeSymbol>.Empty; 163internal override bool HasCollectionBuilderAttribute(out TypeSymbol? builderType, out string? methodName) 176internal sealed override bool HasAsyncMethodBuilderAttribute(out TypeSymbol? builderArgument) 184internal override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol>? basesBeingResolved = null) => ImmutableArray<NamedTypeSymbol>.Empty; 253internal override TypeSymbol GetDeducedBaseType(ConsList<TypeParameterSymbol> inProgress) => ContainingAssembly.GetSpecialType(SpecialType.System_Object);
Symbols\Synthesized\SynthesizedInstanceMethodSymbol.cs (1)
86internal sealed override bool HasAsyncMethodBuilderAttribute(out TypeSymbol builderArgument)
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)
17private readonly TypeSymbol _containingType; 20private readonly TypeSymbol _returnType; 22public SynthesizedIntrinsicOperatorSymbol(TypeSymbol leftType, string name, TypeSymbol rightType, TypeSymbol returnType) 48public SynthesizedIntrinsicOperatorSymbol(TypeSymbol container, string name, TypeSymbol returnType) 439TypeSymbol.Equals(_containingType, other._containingType, compareKind) && 440TypeSymbol.Equals(_returnType, other._returnType, compareKind)) 444if (!TypeSymbol.Equals(_parameters[i].Type, other._parameters[i].Type, compareKind)) 465TypeSymbol type, 511internal 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\SynthesizedParameterlessThrowMethod.cs (1)
17internal SynthesizedParameterlessThrowMethod(SynthesizedPrivateImplementationDetailsType privateImplType, TypeSymbol returnType, string synthesizedMethodName, MethodSymbol exceptionConstructor)
Symbols\Synthesized\SynthesizedPrivateImplementationDetailsType.cs (5)
141internal override NamedTypeSymbol GetDeclaredBaseType(ConsList<TypeSymbol> basesBeingResolved) => _objectType; 143internal override ImmutableArray<NamedTypeSymbol> GetDeclaredInterfaces(ConsList<TypeSymbol> basesBeingResolved) => ImmutableArray<NamedTypeSymbol>.Empty; 161internal override bool HasAsyncMethodBuilderAttribute(out TypeSymbol? builderArgument) 167internal override bool HasCollectionBuilderAttribute(out TypeSymbol? builderType, out string? methodName) 182internal 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)
278internal static void ReportTupleNamesMismatchesIfAny(TypeSymbol destination, BoundTupleLiteral literal, BindingDiagnosticBag diagnostics) 854private TypeSymbol MergeTupleNames(NamedTypeSymbol other, NamedTypeSymbol mergedType) 1113if (TypeSymbol.Equals(underlyingMemberDefinition.ContainingType, TupleUnderlyingType.OriginalDefinition, TypeCompareKind.ConsiderEverything))
Symbols\TypeMap.cs (3)
24public static readonly Func<TypeWithAnnotations, TypeSymbol> AsTypeSymbol = t => t.Type; 36internal static ImmutableArray<TypeSymbol> AsTypeSymbols(ImmutableArray<TypeWithAnnotations> typesOpt) 141Debug.Assert(TypeSymbol.Equals(oldOwner.ConstructedFrom, oldOwner, TypeCompareKind.ConsiderEverything2));
Symbols\TypeParameterBounds.cs (2)
27TypeSymbol deducedBaseType) 80public readonly TypeSymbol DeducedBaseType;
Symbols\TypeParameterSymbol.cs (17)
35protected sealed override TypeSymbol OriginalTypeSymbolDefinition 99((TypeSymbol)constraint.Type.OriginalDefinition).AddUseSiteInfo(ref useSiteInfo); 242internal sealed override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol> basesBeingResolved = null) 308internal TypeSymbol DeducedBaseTypeNoUseSiteDiagnostics 317internal TypeSymbol DeducedBaseType(ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 320var result = DeducedBaseTypeNoUseSiteDiagnostics; 324((TypeSymbol)result.OriginalDefinition).AddUseSiteInfo(ref useSiteInfo); 348var current = DeducedBaseType(ref useSiteInfo); 389internal abstract TypeSymbol GetDeducedBaseType(ConsList<TypeParameterSymbol> inProgress); 391private static bool ConstraintImpliesReferenceType(TypeSymbol constraint) 401internal static bool NonTypeParameterConstraintImpliesReferenceType(TypeSymbol constraint) 645internal sealed override bool GetUnificationUseSiteDiagnosticRecursive(ref DiagnosticInfo result, Symbol owner, ref HashSet<TypeSymbol> checkedTypes) 650internal override bool Equals(TypeSymbol t2, TypeCompareKind comparison) 685internal override bool ApplyNullableTransforms(byte defaultTransformFlag, ImmutableArray<byte> transforms, ref int position, out TypeSymbol result) 691internal override TypeSymbol SetNullabilityForReferenceTypes(Func<TypeWithAnnotations, TypeWithAnnotations> transform) 696internal 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); 633internal abstract bool ApplyNullableTransforms(byte defaultTransformFlag, ImmutableArray<byte> transforms, ref int position, out TypeSymbol result); 635internal abstract TypeSymbol SetNullabilityForReferenceTypes(Func<TypeWithAnnotations, TypeWithAnnotations> transform); 637internal TypeSymbol SetUnknownNullabilityForReferenceTypes() 651internal abstract TypeSymbol MergeEquivalentTypes(TypeSymbol other, VarianceKind variance); 802private static Symbol ComputeImplementationForInterfaceMember(Symbol interfaceMember, TypeSymbol implementingType, BindingDiagnosticBag diagnostics, 833TypeSymbol implementingBaseOpt = null; // Calculated only if canBeImplementedImplicitly == false 838for (TypeSymbol currType = implementingType; (object)currType != null; currType = currType.BaseTypeWithDefinitionUseSiteDiagnostics(ref useSiteInfo)) 1048private static Symbol FindMostSpecificImplementationInInterfaces(Symbol interfaceMember, TypeSymbol implementingType, 1081static bool stopLookup(MethodSymbol interfaceAccessor, TypeSymbol implementingType) 1144TypeSymbol implementingType, 1457private static bool IsExplicitlyImplementedViaAccessors(bool checkPendingExplicitImplementations, Symbol interfaceMember, TypeSymbol currType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, out Symbol implementingMember) 1494private static bool TryGetExplicitImplementationAssociatedPropertyOrEvent(bool checkPendingExplicitImplementations, MethodSymbol interfaceAccessor, TypeSymbol currType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, out Symbol associated) 1538private static void CheckForImplementationOfCorrespondingPropertyOrEvent(MethodSymbol interfaceMethod, TypeSymbol implementingType, bool implementingTypeIsFromSomeCompilation, 1590else if ((object)correspondingImplementingAccessor != null && ((object)implicitImpl == null || TypeSymbol.Equals(correspondingImplementingAccessor.ContainingType, implicitImpl.ContainingType, TypeCompareKind.ConsiderEverything2))) 1621private static void ReportDefaultInterfaceImplementationMatchDiagnostics(Symbol interfaceMember, TypeSymbol implementingType, Symbol implicitImpl, BindingDiagnosticBag diagnostics) 1669private static void ReportImplicitImplementationMatchDiagnostics(Symbol interfaceMember, TypeSymbol implementingType, Symbol implicitImpl, BindingDiagnosticBag diagnostics) 1764internal static void CheckModifierMismatchOnImplementingMember(TypeSymbol implementingType, Symbol implementingMember, Symbol interfaceMember, bool isExplicit, BindingDiagnosticBag diagnostics) 1795TypeSymbol implementingType, 1801ReportMismatchInReturnType<(TypeSymbol implementingType, bool isExplicit)> reportMismatchInReturnType = 1824ReportMismatchInParameterType<(TypeSymbol implementingType, bool isExplicit)> reportMismatchInParameterType = 1981private static void ReportImplicitImplementationMismatchDiagnostics(Symbol interfaceMember, TypeSymbol implementingType, Symbol closestMismatch, BindingDiagnosticBag diagnostics) 2003TypeSymbol interfaceMemberReturnType; 2071private static Location GetInterfaceLocation(Symbol interfaceMember, TypeSymbol implementingType) 2085private static bool ReportAnyMismatchedConstraints(MethodSymbol interfaceMethod, TypeSymbol implementingType, MethodSymbol implicitImpl, BindingDiagnosticBag diagnostics) 2130internal static Location GetImplicitImplementationDiagnosticLocation(Symbol interfaceMember, TypeSymbol implementingType, Symbol member) 2132if (TypeSymbol.Equals(member.ContainingType, implementingType, TypeCompareKind.ConsiderEverything2)) 2162TypeSymbol currType, 2446public static bool Equals(TypeSymbol? left, TypeSymbol? right, TypeCompareKind comparison) 2458public static bool operator ==(TypeSymbol left, TypeSymbol right) 2462public static bool operator !=(TypeSymbol left, TypeSymbol right) 2466public static bool operator ==(Symbol left, TypeSymbol right) 2470public static bool operator !=(Symbol left, TypeSymbol right) 2474public static bool operator ==(TypeSymbol left, Symbol right) 2478public static bool operator !=(TypeSymbol left, Symbol right)
Symbols\TypeSymbolExtensions.cs (168)
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( 869(TypeWithAnnotations nextTypeWithAnnotations, TypeSymbol? nextType) = getNextIterationElements(fields[i].TypeWithAnnotations, canDigThroughNullable); 870var result = VisitType( 900(TypeWithAnnotations nextTypeWithAnnotations, TypeSymbol? nextType) = getNextIterationElements(typeArguments[i], canDigThroughNullable); 901var result = VisitType( 931var result = visitFunctionPointerType((FunctionPointerTypeSymbol)current, typeWithAnnotationsPredicate, typePredicate, arg, useDefaultType, canDigThroughNullable, visitCustomModifiers, out next); 949static (TypeWithAnnotations, TypeSymbol?) getNextIterationElements(TypeWithAnnotations type, bool canDigThroughNullable) 952static 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) 961var result = VisitType( 979(TypeWithAnnotations nextTypeWithAnnotations, TypeSymbol? nextType) = getNextIterationElements(currentPointer.Parameters[i].TypeWithAnnotations, canDigThroughNullable); 1181public static bool IsUnboundGenericType(this TypeSymbol type) 1197public static bool ContainsTypeParameter(this TypeSymbol type, TypeParameterSymbol? parameter = null) 1199var result = type.VisitType(s_containsTypeParameterPredicate, parameter); 1203private static readonly Func<TypeSymbol, TypeParameterSymbol?, bool, bool> s_containsTypeParameterPredicate = 1204(type, parameter, unused) => type.TypeKind == TypeKind.TypeParameter && (parameter is null || TypeSymbol.Equals(type, parameter, TypeCompareKind.ConsiderEverything2)); 1206public static bool ContainsTypeParameter(this TypeSymbol type, MethodSymbol parameterContainer) 1210var result = type.VisitType(s_isTypeParameterWithSpecificContainerPredicate, parameterContainer); 1214private static readonly Func<TypeSymbol, Symbol, bool, bool> s_isTypeParameterWithSpecificContainerPredicate = 1217public static bool ContainsTypeParameters(this TypeSymbol type, HashSet<TypeParameterSymbol> parameters) 1219var result = type.VisitType(s_containsTypeParametersPredicate, parameters); 1223private static readonly Func<TypeSymbol, HashSet<TypeParameterSymbol>, bool, bool> s_containsTypeParametersPredicate = 1226public static bool ContainsMethodTypeParameter(this TypeSymbol type) 1228var result = type.VisitType(s_containsMethodTypeParameterPredicate, null); 1232private static readonly Func<TypeSymbol, object?, bool, bool> s_containsMethodTypeParameterPredicate = 1238public static bool ContainsDynamic(this TypeSymbol type) 1240var result = type.VisitType(s_containsDynamicPredicate, null, canDigThroughNullable: true); 1244private static readonly Func<TypeSymbol, object?, bool, bool> s_containsDynamicPredicate = (type, unused1, unused2) => type.TypeKind == TypeKind.Dynamic; 1246internal static bool ContainsNativeIntegerWrapperType(this TypeSymbol type) 1248var result = type.VisitType((type, unused1, unused2) => type.IsNativeIntegerWrapperType, (object?)null, canDigThroughNullable: true); 1257internal static bool ContainsErrorType(this TypeSymbol type) 1259var result = type.VisitType((type, unused1, unused2) => type.IsErrorType(), (object?)null, canDigThroughNullable: true); 1266internal static bool ContainsTuple(this TypeSymbol type) => 1267type.VisitType((TypeSymbol t, object? _1, bool _2) => t.IsTupleType, null) is object; 1272internal static bool ContainsTupleNames(this TypeSymbol type) => 1273type.VisitType((TypeSymbol t, object? _1, bool _2) => !t.TupleElementNames.IsDefault, null) is object; 1278internal static bool ContainsFunctionPointer(this TypeSymbol type) => 1279type.VisitType((TypeSymbol t, object? _, bool _) => t.IsFunctionPointer(), null) is object; 1281internal static bool ContainsPointer(this TypeSymbol type) => 1282type.VisitType((TypeSymbol t, object? _, bool _) => t.TypeKind is TypeKind.Pointer or TypeKind.FunctionPointer, null) is object; 1299internal static TypeSymbol? GetNonErrorGuess(this TypeSymbol type) 1301var result = ExtendedErrorTypeSymbol.ExtractNonErrorType(type); 1310internal static TypeKind GetNonErrorTypeKindGuess(this TypeSymbol type) 1320internal static bool IsValidV6SwitchGoverningType(this TypeSymbol type, bool isTargetTypeOfUserDefinedOp = false) 1365internal static bool IsSpan(this TypeSymbol type) 1378internal static bool IsReadOnlySpan(this TypeSymbol type) 1391internal static bool IsSpanChar(this TypeSymbol type) 1402internal static bool IsReadOnlySpanChar(this TypeSymbol type) 1413internal static bool IsSpanOrReadOnlySpanChar(this TypeSymbol type) 1431internal static bool IsRestrictedType(this TypeSymbol type, 1447public static bool IsIntrinsicType(this TypeSymbol type) 1474public static bool IsPartial(this TypeSymbol type) 1479public static bool HasFileLocalTypes(this TypeSymbol type) 1481var foundType = type.VisitType(predicate: (type, _, _) => type is NamedTypeSymbol { IsFileLocal: true }, arg: (object?)null); 1494public static bool IsPointerType(this TypeSymbol type) 1499internal static int FixedBufferElementSizeInBytes(this TypeSymbol type) 1505internal static bool IsValidVolatileFieldType(this TypeSymbol type) 1539public static bool MarkCheckedIfNecessary(this TypeSymbol type, ref HashSet<TypeSymbol> checkedTypes) 1543checkedTypes = new HashSet<TypeSymbol>(); 1549internal static bool IsVoidPointer(this TypeSymbol type) 1558internal static bool IsPrimitiveRecursiveStruct(this TypeSymbol t) 1642public static TypeSymbol AsDynamicIfNoPia(this TypeSymbol type, NamedTypeSymbol containingType) 1644return type.TryAsDynamicIfNoPia(containingType, out TypeSymbol? result) ? result : type; 1647public static bool TryAsDynamicIfNoPia(this TypeSymbol type, NamedTypeSymbol containingType, [NotNullWhen(true)] out TypeSymbol? result) 1667internal static bool IsVerifierReference(this TypeSymbol type) 1675internal 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) 2140private static bool IsWellKnownInteropServicesTopLevelType(this TypeSymbol typeSymbol, string name) 2150private static bool IsWellKnownCompilerServicesTopLevelType(this TypeSymbol typeSymbol, string name) 2160internal static bool IsCompilerServicesTopLevelType(this TypeSymbol typeSymbol) 2163internal static bool IsWellKnownSetsRequiredMembersAttribute(this TypeSymbol type) 2166internal static bool IsWellKnownINumberBaseType(this TypeSymbol type) 2173internal static bool IsWellKnownDiagnosticsCodeAnalysisTopLevelType(this TypeSymbol typeSymbol) 2176private static bool IsContainedInNamespace(this TypeSymbol typeSymbol, string outerNS, string midNS, string? innerNS = null) 2209internal static int TypeToIndex(this TypeSymbol type) 2234TypeSymbol underlyingType = type.GetNullableUnderlyingType(); 2263internal 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)
289TypeSymbol type, 386TypeSymbol typeArg = namedType.TypeArgumentsWithAnnotationsNoUseSiteDiagnostics[i].Type; 472if (!(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) 209private 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)
2085var invokeReturn = invoke.ReturnType; 2087var 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)
2862var 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;