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
4678 references to TypeSymbol
Microsoft.CodeAnalysis.CSharp (4631)
Binder\Binder.cs (4)
775TypeSymbol? throughTypeOpt = null) 783TypeSymbol throughTypeOpt, 786ConsList<TypeSymbol>? basesBeingResolved = null) 856TypeSymbol 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 (8)
959TypeSymbol.Equals( 1401? TypeSymbol.Equals(fieldSymbol.ContainingType, containing.ContainingType, TypeCompareKind.AllIgnoreOptions) 1403: TypeSymbol.Equals(fieldSymbol.ContainingType.OriginalDefinition, containing.ContainingType.OriginalDefinition, TypeCompareKind.AllIgnoreOptions))) 1734var accessThroughType = this.GetAccessThroughType(receiver); 1783var accessThroughType = this.GetAccessThroughType(receiver); 5488private SignatureOnlyMethodSymbol GetInlineArrayConversionEquivalentSignatureMethod(BoundExpression inlineArray, TypeSymbol resultType, out ImmutableArray<BoundExpression> arguments, out ImmutableArray<RefKind> refKinds) 5705var type = expression.Type; 5882if (!TypeSymbol.Equals(field.ContainingType, containingSymbol.ContainingSymbol as NamedTypeSymbol, TypeCompareKind.AllIgnoreOptions))
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 (59)
21TypeSymbol destination, 34TypeSymbol destination, 46TypeSymbol destination, 59TypeSymbol destination, 101TypeSymbol destination, 215TypeSymbol? type = source.Type; 304void reportUseSiteDiagnostics(SyntaxNode syntax, Conversion conversion, BoundExpression source, TypeSymbol destination, BindingDiagnosticBag diagnostics) 318void ensureAllUnderlyingConversionsChecked(SyntaxNode syntax, BoundExpression source, Conversion conversion, bool wasCompilerGenerated, TypeSymbol destination, BindingDiagnosticBag diagnostics) 411void checkConstraintLanguageVersionAndRuntimeSupportForConversion(SyntaxNode syntax, Conversion conversion, BoundExpression source, TypeSymbol destination, BindingDiagnosticBag diagnostics) 490private static void CheckInlineArrayTypeIsSupported(SyntaxNode syntax, TypeSymbol inlineArrayType, TypeSymbol elementType, BindingDiagnosticBag diagnostics) 503SyntaxNode syntax, BoundUnconvertedObjectCreationExpression node, Conversion conversion, bool isCast, TypeSymbol destination, 537TypeSymbol type, AnalyzedArguments arguments, BindingDiagnosticBag diagnostics) 570TypeSymbol targetType, 581var collectionTypeKind = conversion.GetCollectionExpressionTypeKind(out var elementType, out MethodSymbol? constructor, out bool isExpanded); 618collectionBuilderMethod = GetAndValidateCollectionBuilderMethod(syntax, namedType, diagnostics, out var updatedElementType); 734BoundNode bindSpreadElement(BoundCollectionExpressionSpreadElement element, TypeSymbol elementType, Conversion elementConversion, BindingDiagnosticBag diagnostics) 760private bool HasCollectionInitializerTypeInProgress(SyntaxNode syntax, TypeSymbol targetType) 782out TypeSymbol? elementType) 785bool result = namedType.HasCollectionBuilderAttribute(out TypeSymbol? builderType, out string? methodName); 822internal BoundExpression BindCollectionExpressionConstructor(SyntaxNode syntax, TypeSymbol targetType, BindingDiagnosticBag diagnostics) 852internal bool HasCollectionExpressionApplicableConstructor(SyntaxNode syntax, TypeSymbol targetType, out MethodSymbol? constructor, out bool isExpanded, BindingDiagnosticBag diagnostics, bool isParamsModifierValidation = false) 978internal bool HasCollectionExpressionApplicableAddMethod(SyntaxNode syntax, TypeSymbol targetType, out ImmutableArray<MethodSymbol> addMethods, BindingDiagnosticBag diagnostics) 1206TypeSymbol? receiverType = methodGroup.ReceiverOpt.Type; 1243TypeSymbol secondArgumentType = (constructed ?? member).Parameters[1].Type; 1430internal bool TryGetCollectionIterationType(SyntaxNode syntax, TypeSymbol collectionType, out TypeWithAnnotations iterationType) 1453TypeSymbol targetType, 1484TypeSymbol targetType, 1513var elementType = elementTypeWithAnnotations.Type; 1574TypeSymbol elementTypeOriginalDefinition, 1575TypeSymbol? builderType, 1634var spanTypeArg = ((NamedTypeSymbol)methodWithTargetTypeParameters.Parameters[0].Type).TypeArgumentsWithAnnotationsNoUseSiteDiagnostics[0].Type; 1665TypeSymbol destination, 1706private BoundExpression ConvertSwitchExpression(BoundUnconvertedSwitchExpression source, TypeSymbol destination, Conversion? conversionIfTargetTyped, BindingDiagnosticBag diagnostics, bool hasErrors = false) 1739TypeSymbol destination, 1805TypeSymbol conversionParameterType = conversion.BestUserDefinedConversionAnalysis.Operator.GetParameterType(0); 1809!TypeSymbol.Equals(conversion.BestUserDefinedConversionAnalysis.FromType, conversionParameterType, TypeCompareKind.ConsiderEverything2)) 1825TypeSymbol conversionReturnType = conversion.BestUserDefinedConversionAnalysis.Operator.ReturnType; 1826TypeSymbol conversionToType = conversion.BestUserDefinedConversionAnalysis.ToType; 1830!TypeSymbol.Equals(conversionToType, conversionReturnType, TypeCompareKind.ConsiderEverything2)) 1845if (conversionToType.IsNullableType() && TypeSymbol.Equals(conversionToType.GetNullableUnderlyingType(), conversionReturnType, TypeCompareKind.ConsiderEverything2)) 1904private BoundExpression CreateFunctionTypeConversion(SyntaxNode syntax, BoundExpression source, Conversion conversion, bool isCast, ConversionGroup? conversionGroup, TypeSymbol destination, BindingDiagnosticBag diagnostics) 1952private BoundExpression CreateAnonymousFunctionConversion(SyntaxNode syntax, BoundExpression source, Conversion conversion, bool isCast, ConversionGroup? conversionGroup, TypeSymbol destination, BindingDiagnosticBag diagnostics) 1979private BoundExpression CreateMethodGroupConversion(SyntaxNode syntax, BoundExpression source, Conversion conversion, bool isCast, ConversionGroup? conversionGroup, TypeSymbol destination, BindingDiagnosticBag diagnostics) 2001private static void CheckParameterModifierMismatchMethodConversion(SyntaxNode syntax, MethodSymbol lambdaOrMethod, TypeSymbol targetType, bool invokedAsExtensionMethod, BindingDiagnosticBag diagnostics) 2049private static void CheckLambdaConversion(LambdaSymbol lambdaSymbol, TypeSymbol targetType, BindingDiagnosticBag diagnostics) 2137private BoundExpression CreateStackAllocConversion(SyntaxNode syntax, BoundExpression source, Conversion conversion, bool isCast, ConversionGroup? conversionGroup, TypeSymbol destination, BindingDiagnosticBag diagnostics) 2143TypeSymbol stackAllocType; 2165private BoundExpression CreateTupleLiteralConversion(SyntaxNode syntax, BoundTupleLiteral sourceTuple, Conversion conversion, bool isCast, ConversionGroup? conversionGroup, TypeSymbol destination, BindingDiagnosticBag diagnostics) 2171var destinationWithoutNullable = destination; 2241if (!TypeSymbol.Equals(sourceTuple.Type, destination, TypeCompareKind.ConsiderEverything2)) 2549internal bool MethodIsCompatibleWithDelegateOrFunctionPointer(BoundExpression? receiverOpt, bool isExtensionMethod, MethodSymbol method, TypeSymbol delegateType, Location errorLocation, BindingDiagnosticBag diagnostics) 2627var methodReturnType = method.ReturnType; 2628var delegateReturnType = delegateOrFuncPtrMethod.ReturnType; 2674static bool hasConversion(TypeKind targetKind, Conversions conversions, TypeSymbol source, TypeSymbol destination, 2733TypeSymbol delegateOrFuncPtrType, 2828TypeSymbol destination, 2929TypeSymbol 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; 841internal virtual BoundSwitchExpressionArm BindSwitchExpressionArm(SwitchExpressionArmSyntax node, TypeSymbol switchGoverningType, BindingDiagnosticBag diagnostics) 1218TypeSymbol typedReferenceType = this.Compilation.GetSpecialType(SpecialType.System_TypedReference); 1242TypeSymbol typedReferenceType = GetSpecialType(SpecialType.System_TypedReference, diagnostics, node); 1266TypeSymbol typedReferenceType = this.Compilation.GetSpecialType(SpecialType.System_TypedReference); 1267TypeSymbol typeType = this.GetWellKnownType(WellKnownType.System_Type, diagnostics, node); 1308TypeSymbol runtimeArgumentHandleType = GetSpecialType(SpecialType.System_RuntimeArgumentHandle, diagnostics, node); 1372TypeSymbol type = typeWithAnnotations.Type; 1400var type = typeWithAnnotations.Type; 1425TypeSymbol type = typeWithAnnotations.Type; 1437internal static bool CheckManagedAddr(CSharpCompilation compilation, TypeSymbol type, Location location, BindingDiagnosticBag diagnostics, bool errorForManaged = false) 1447internal static bool CheckManagedAddr(CSharpCompilation compilation, TypeSymbol type, ManagedKind managedKind, Location location, BindingDiagnosticBag diagnostics, bool errorForManaged = false) 1471internal static ConstantValue GetConstantSizeOf(TypeSymbol type) 1482TypeSymbol type = typeWithAnnotations.Type; 1892private bool IsBadLocalOrParameterCapture(Symbol symbol, TypeSymbol type, RefKind refKind) 1922TypeSymbol type; 2122return new BoundTypeExpression(node, null, (TypeSymbol)symbol, hasErrors: isError); 2150TypeSymbol typeSymbol => new BoundTypeExpression(node, alias, typeSymbol, hasErrors: isError), 2292TypeSymbol hostObjectType = Compilation.GetHostObjectTypeSymbol(); 2397var type = symbol as TypeSymbol; 2468TypeSymbol baseType = this.ContainingType is null ? null : this.ContainingType.BaseTypeNoUseSiteDiagnostics; 2500TypeSymbol targetType = targetTypeWithAnnotations.Type; 2506!TypeSymbol.Equals(targetType.GetNullableUnderlyingType(), operand.Type, TypeCompareKind.ConsiderEverything2)) 2524TypeSymbol intType = GetSpecialType(SpecialType.System_Int32, diagnostics, node); 2525TypeSymbol indexType = GetWellKnownType(WellKnownType.System_Index, diagnostics, node); 2561TypeSymbol rangeType = GetWellKnownType(WellKnownType.System_Range, diagnostics, node); 2632TypeSymbol indexType = GetWellKnownType(WellKnownType.System_Index, diagnostics, operand); 2662TypeSymbol targetType = targetTypeWithAnnotations.Type; 2683TypeSymbol targetType) 2820var targetElementType = targetElementTypesWithAnnotations[i].Type; 3092var type = declType.Type; 3190TypeSymbol fieldType = expressionVariableField.GetFieldType(this.FieldsBeingBound).Type; 3204internal static void CheckRestrictedTypeInAsyncMethod(Symbol containingSymbol, TypeSymbol type, BindingDiagnosticBag diagnostics, SyntaxNode syntax) 3644TypeSymbol handlerType, 3761TypeSymbol placeholderType; 4030TypeSymbol bestType = BestTypeInferrer.InferBestType(boundInitializerExpressions, this.Conversions, ref useSiteInfo, out _); 4057TypeSymbol bestType = BestTypeInferrer.InferBestType(boundInitializerExpressions, this.Conversions, ref useSiteInfo, out _); 4185TypeSymbol elemType = type.ElementType; 4423TypeSymbol type = GetStackAllocType(node, elementType, diagnostics, out bool hasErrors); 4506private TypeSymbol GetStackAllocType(SyntaxNode node, TypeWithAnnotations elementTypeWithAnnotations, BindingDiagnosticBag diagnostics, out bool hasErrors) 4566TypeSymbol type, 4567TypeSymbol elementType, 4746TypeSymbol constructorReturnType = constructor.ReturnType; 4871TypeSymbol constructorReturnType, 5102var type = typeWithAnnotations.Type; 5103var originalType = type; 5206var collectionType = enumeratorInfo.CollectionType; 5418private BoundExpression BindClassCreationExpression(ObjectCreationExpressionSyntax node, NamedTypeSymbol type, string typeName, BindingDiagnosticBag diagnostics, TypeSymbol initializerType = null) 5491private BoundExpression MakeBadExpressionForObjectCreation(ObjectCreationExpressionSyntax node, TypeSymbol type, AnalyzedArguments analyzedArguments, BindingDiagnosticBag diagnostics, bool wasCompilerGenerated = false) 5497private BoundExpression MakeBadExpressionForObjectCreation(SyntaxNode node, TypeSymbol type, AnalyzedArguments analyzedArguments, InitializerExpressionSyntax? initializerOpt, SyntaxNode? typeSyntax, BindingDiagnosticBag diagnostics, bool wasCompilerGenerated = false) 5517TypeSymbol type, 5549TypeSymbol type, 5571TypeSymbol initializerType, 5679var initializerType = implicitReceiver.Type; 6086TypeSymbol initializerType, 6140private bool CollectionInitializerTypeImplementsIEnumerable(TypeSymbol initializerType, CSharpSyntaxNode node, BindingDiagnosticBag diagnostics) 6178TypeSymbol initializerType, 6522TypeSymbol initializerTypeOpt = null, 6617TypeSymbol initializerTypeOpt, 6702TypeSymbol initializerTypeOpt, 6756private BoundObjectInitializerExpressionBase MakeBoundInitializerOpt(SyntaxNode typeNode, NamedTypeSymbol type, InitializerExpressionSyntax initializerSyntaxOpt, TypeSymbol initializerTypeOpt, BindingDiagnosticBag diagnostics) 6809Debug.Assert(TypeSymbol.Equals(interfaceType.ComImportCoClass, coClassType, TypeCompareKind.ConsiderEverything2)); 7209TypeSymbol type = null; 7295TypeSymbol pointedAtType; 7372var leftType = boundValue.Type; 7380if (TypeSymbol.Equals(boundType.Type, leftType, TypeCompareKind.AllIgnoreOptions)) 7407private bool IsPotentialColorColorReceiver(IdentifierNameSyntax id, TypeSymbol type) 7412TypeSymbol.Equals(BindNamespaceOrType(id, BindingDiagnosticBag.Discarded).Type, type, TypeCompareKind.AllIgnoreOptions); 7516TypeSymbol leftType = boundLeft.Type; 7731TypeSymbol leftType, 7838var leftType = boundLeft.Type; 7905private void LookupInstanceMember(LookupResult lookupResult, TypeSymbol leftType, bool leftIsBaseReference, string rightName, int rightArity, bool invoked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 7980private bool WouldUsingSystemFindExtension(TypeSymbol receiver, string methodName) 7992private bool ImplementsWinRTAsyncInterface(TypeSymbol type) 7997private bool IsWinRTAsyncInterface(TypeSymbol type) 8006TypeSymbol.Equals(namedType, Compilation.GetWellKnownType(WellKnownType.Windows_Foundation_IAsyncAction), TypeCompareKind.ConsiderEverything2) || 8007TypeSymbol.Equals(namedType, Compilation.GetWellKnownType(WellKnownType.Windows_Foundation_IAsyncActionWithProgress_T), TypeCompareKind.ConsiderEverything2) || 8008TypeSymbol.Equals(namedType, Compilation.GetWellKnownType(WellKnownType.Windows_Foundation_IAsyncOperation_T), TypeCompareKind.ConsiderEverything2) || 8009TypeSymbol.Equals(namedType, Compilation.GetWellKnownType(WellKnownType.Windows_Foundation_IAsyncOperationWithProgress_T2), TypeCompareKind.ConsiderEverything2); 8068private TypeSymbol GetNonMethodMemberType(Symbol symbolOpt) 8070TypeSymbol resultType = null; 8248TypeSymbol returnType, 8450TypeSymbol receiverType = receiver.Type; 8518TypeSymbol fieldType = fieldSymbol.GetFieldType(this.FieldsBeingBound).Type; 8601Debug.Assert(symbol is not TypeSymbol); 8649return !symbol.IsStatic && !(symbol is TypeSymbol) && 8931if (!TypeSymbol.IsInlineArrayElementFieldSupported(elementField)) 8956{ Code: (int)ErrorCode.ERR_BadIndexLHS, Arguments: [TypeSymbol type] } && type.Equals(expr.Type, TypeCompareKind.ConsiderEverything)) 9093TypeSymbol resultType; 9134if (TypeSymbol.Equals(convertedIndex.Type, compilation.GetWellKnownType(WellKnownType.System_Index), TypeCompareKind.AllIgnoreOptions)) 9185var exprType = expr.Type; 9266TypeSymbol resultType = indexOrRangeWellknownType == WellKnownType.System_Range 9362TypeSymbol type = GetWellKnownType(wellKnownType, ref useSiteInfo); 9384TypeSymbol type = GetSpecialType(specialType, attemptDiagnostics, node); 9397private BoundExpression TryImplicitConversionToArrayIndex(BoundExpression expr, TypeSymbol targetType, SyntaxNode node, BindingDiagnosticBag diagnostics) 9441TypeSymbol pointedAtType = pointerType.PointedAtType; 9809TypeSymbol.Equals(argType, Compilation.GetWellKnownType(WellKnownType.System_Index), TypeCompareKind.ConsiderEverything) ? ThreeState.True : 9810TypeSymbol.Equals(argType, Compilation.GetWellKnownType(WellKnownType.System_Range), TypeCompareKind.ConsiderEverything) ? ThreeState.False : 10069TypeSymbol receiverType, 10120TypeSymbol propertyType = GetCommonTypeOrReturnType(propertyGroup) ?? CreateErrorType(); 10146TypeSymbol returnType = null, 10167TypeSymbol returnType = null, 10192TypeSymbol returnType, 10215TypeSymbol returnType = null, 10285TypeSymbol returnType = null, 10710internal static bool ReportDelegateInvokeUseSiteDiagnostic(BindingDiagnosticBag diagnostics, TypeSymbol possibleDelegateType, 10762var receiverType = receiver.Type; 10771var accessType = access.Type; 10902var receiverType = receiver.Type; 10933var 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 (5)
381Func<BoundUnconvertedInterpolatedString, int, (ImmutableArray<ImmutableArray<BoundExpression>>, TypeSymbol), BoundExpression> interpolationFactory = 383Func<BoundBinaryOperator, BoundExpression, BoundExpression, (ImmutableArray<ImmutableArray<BoundExpression>>, TypeSymbol), BoundExpression> binaryOperatorFactory = 390static BoundInterpolatedString createInterpolation(BoundUnconvertedInterpolatedString expression, int i, (ImmutableArray<ImmutableArray<BoundExpression>> AppendCalls, TypeSymbol _) arg) 402static BoundBinaryOperator createBinaryOperator(BoundBinaryOperator original, BoundExpression left, BoundExpression right, (ImmutableArray<ImmutableArray<BoundExpression>> _, TypeSymbol @string) arg) 536TypeSymbol objectType = GetSpecialType(SpecialType.System_Object, diagnostics, syntax);
Binder\Binder_Invocation.cs (24)
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); 1771var paramsType = constructor.Parameters[^1].Type; 1841TypeSymbol.Equals(containingMethod.ContainingType, method.ContainingType, TypeCompareKind.ConsiderEverything) && 1994var returnType = GetCommonTypeOrReturnType(methods) ?? new ExtendedErrorTypeSymbol(this.Compilation, string.Empty, arity: 0, errorInfo: null); 1995var methodContainer = (object)receiver != null && (object)receiver.Type != null 2089var parameterType = GetCorrespondingParameterType(analyzedArguments, i, parameterList); 2111var candidateType = getCorrespondingParameterType(i); 2158TypeSymbol getCorrespondingParameterType(int i) 2161TypeSymbol candidateType = null; 2164var parameterType = GetCorrespondingParameterType(analyzedArguments, i, parameterList); 2192private static TypeSymbol GetCorrespondingParameterType(AnalyzedArguments analyzedArguments, int i, ImmutableArray<ParameterSymbol> parameterList) 2224TypeSymbol returnType = new ExtendedErrorTypeSymbol(this.Compilation, string.Empty, arity: 0, errorInfo: null); 2225var methodContainer = expr.Type ?? this.ContainingType; 2236private static TypeSymbol GetCommonTypeOrReturnType<TMember>(ImmutableArray<TMember> members) 2239TypeSymbol type = null; 2242TypeSymbol returnType = members[i].GetTypeOrReturnType().Type; 2247else 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, 3691TypeSymbol targetType = targetTypeWithAnnotations.Type; 3694var resultType = targetType; 3795var operandType = operand.Type; 3846TypeSymbol operandType, 3847TypeSymbol targetType, 3908TypeSymbol operandType, 3909TypeSymbol targetType, 3939internal static ConstantValue GetAsOperatorConstantResult(TypeSymbol operandType, TypeSymbol targetType, ConversionKind conversionKind, ConstantValue operandConstantValue) 4007TypeSymbol optLeftType = leftOperand.Type; // "A" 4008TypeSymbol optRightType = rightOperand.Type; // "B" 4010TypeSymbol optLeftType0 = isLeftNullable ? // "A0" 4183TypeSymbol leftType = leftOperand.Type; 4199var underlyingLeftType = leftType.GetNullableUnderlyingType(); 4302TypeSymbol? bestType = BestTypeInferrer.InferBestTypeForConditionalOperator(trueExpr, falseExpr, this.Conversions, out bool hadMultipleCandidates, ref useSiteInfo); 4342TypeSymbol trueType = trueExpr.Type; 4343TypeSymbol falseType = falseExpr.Type; 4345TypeSymbol type;
Binder\Binder_Patterns.cs (67)
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, 1747var narrowedTypeCandidates = ArrayBuilder<TypeSymbol>.GetInstance(2); 1755static void collectCandidates(BoundPattern pat, ArrayBuilder<TypeSymbol> candidates) 1768TypeSymbol? leastSpecificType(SyntaxNode node, ArrayBuilder<TypeSymbol> candidates, BindingDiagnosticBag diagnostics) 1772TypeSymbol? bestSoFar = candidates[0]; 1776TypeSymbol candidate = candidates[i]; 1782TypeSymbol candidate = candidates[i]; 1783TypeSymbol? spoiler = lessSpecificCandidate(candidate, bestSoFar, ref useSiteInfo); 1799TypeSymbol? lessSpecificCandidate(TypeSymbol bestSoFar, TypeSymbol possiblyLessSpecificCandidate, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
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)
236TypeSymbol elementType = GetIteratorElementType().Type; 406var type = boundExpr.Type; 1019TypeSymbol initializerType = initializerOpt?.Type; 1221private bool IsValidFixedVariableInitializer(TypeSymbol declType, ref BoundExpression initializerOpt, BindingDiagnosticBag diagnostics) 1231TypeSymbol initializerType = initializerOpt.Type; 1240TypeSymbol elementType; 1354TypeSymbol elementType, 1355TypeSymbol declType, 1364TypeSymbol pointerType = new PointerTypeSymbol(TypeWithAnnotations.Create(elementType)); 1458var inferredType = op2.Type; 1509TypeSymbol type; 1769TypeSymbol.Equals(sourceProperty.ContainingType, fromMember.ContainingType, TypeCompareKind.AllIgnoreOptions) && 1782private TypeSymbol GetAccessThroughType(BoundExpression receiver) 1803TypeSymbol destinationType, 1897internal BoundExpression GenerateConversionForAssignment(TypeSymbol targetType, BoundExpression expression, BindingDiagnosticBag diagnostics, ConversionForAssignmentFlags flags = ConversionForAssignmentFlags.None) 1900internal BoundExpression GenerateConversionForAssignment(TypeSymbol targetType, BoundExpression expression, BindingDiagnosticBag diagnostics, out Conversion conversion, ConversionForAssignmentFlags flags = ConversionForAssignmentFlags.None) 1968UnboundLambda anonymousFunction, TypeSymbol targetType) 2142var lambdaParameterType = anonymousFunction.ParameterType(i); 2150var delegateParameterType = delegateParameters[i].Type; 2197Conversion conversion, TypeSymbol sourceType, TypeSymbol targetType, ConstantValue sourceConstantValueOpt = null) 2248else if (TypeSymbol.Equals(sourceType, targetType, TypeCompareKind.ConsiderEverything2)) 2269TypeSymbol targetType) 2398var sourceType = operand.Type; 2487var targetElementType = targetElementTypes[i].Type; 2870protected virtual TypeSymbol GetCurrentReturnType(out RefKind refKind) 2877TypeSymbol returnType = symbol.ReturnType; 2912TypeSymbol retType = GetCurrentReturnType(out sigRefKind); 3004var requiredType = IsEffectivelyGenericTaskReturningAsyncMethod() 3035TypeSymbol returnType) 3084&& TypeSymbol.Equals(argument.Type, this.GetCurrentReturnType(out unusedRefKind), TypeCompareKind.ConsiderEverything2)) 3144TypeSymbol type = null; 3163TypeSymbol effectiveType = type.EffectiveType(ref useSiteInfo); 3217else if (TypeSymbol.Equals(previousType, Compilation.GetWellKnownType(WellKnownType.System_Exception), TypeCompareKind.ConsiderEverything2) && 3240Debug.Assert(local.Type.IsErrorType() || (TypeSymbol.Equals(local.Type, type, TypeCompareKind.ConsiderEverything2))); 3353var 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) 1505ArrayBuilder<Symbol> members, TypeSymbol receiverType, 1555ConsList<TypeSymbol> basesBeingResolved, 1587ConsList<TypeSymbol> basesBeingResolved, 2231var 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(); 682var type = rel.Value.Type ?? input.Type; 701private TypeSymbol ErrorType(string name = "") 1514TypeSymbol expressionType, 1515TypeSymbol patternType, 1523static bool isRuntimeSimilar(TypeSymbol expressionType, TypeSymbol patternType) 1530TypeSymbol e1 = array1.ElementType.EnumUnderlyingTypeOrSelf(); 1531TypeSymbol e2 = array2.ElementType.EnumUnderlyingTypeOrSelf();
Binder\ExecutableCodeBinder.cs (1)
135var returnType = iterator.ReturnType;
Binder\ForEachEnumeratorInfo.cs (5)
17public readonly TypeSymbol CollectionType; 24public TypeSymbol ElementType => ElementTypeWithAnnotations.Type; 51TypeSymbol collectionType, 96public TypeSymbol CollectionType; 101public 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; 1254bool implementsInterface(TypeSymbol enumeratorType, bool isAsync, BindingDiagnosticBag diagnostics) 1277private ForEachEnumeratorInfo.Builder GetDefaultEnumeratorInfo(SyntaxNode syntax, ForEachEnumeratorInfo.Builder builder, BindingDiagnosticBag diagnostics, TypeSymbol collectionExprType) 1286(TypeSymbol)DynamicTypeSymbol.Instance : 1304TypeSymbol.Equals(builder.GetEnumeratorInfo.Method.ReturnType, this.Compilation.GetSpecialType(SpecialType.System_Collections_IEnumerator), TypeCompareKind.ConsiderEverything2)); 1351private MethodArgumentInfo FindForEachPatternMethod(SyntaxNode syntax, SyntaxNode collectionSyntax, TypeSymbol patternType, string methodName, LookupResult lookupResult, bool warningsOnly, BindingDiagnosticBag diagnostics, bool isAsync) 1418private MethodArgumentInfo PerformForEachPatternOverloadResolution(SyntaxNode syntax, SyntaxNode collectionSyntax, TypeSymbol patternType, ArrayBuilder<MethodSymbol> candidateMethods, bool warningsOnly, BindingDiagnosticBag diagnostics, bool isAsync) 1596TypeSymbol enumeratorType = getEnumeratorMethod.ReturnType; 1709private void ReportEnumerableWarning(SyntaxNode collectionSyntax, BindingDiagnosticBag diagnostics, TypeSymbol enumeratorType, Symbol patternMemberCandidate) 1720internal static bool IsIEnumerable(TypeSymbol type) 1722switch (((TypeSymbol)type.OriginalDefinition).SpecialType) 1732private bool IsIAsyncEnumerable(TypeSymbol type) 1751TypeSymbol type, 1787TypeSymbol type, bool isAsync, CSharpCompilation compilation, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, 1824TypeSymbol.Equals(@interface, result, TypeCompareKind.IgnoreTupleNames)) 1837internal static bool IsIEnumerableT(TypeSymbol type, bool isAsync, CSharpCompilation compilation) 1857private 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)
52internal 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, 543internal 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 (205)
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) 604private Conversion ClassifyStandardImplicitConversion(BoundExpression sourceExpression, TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 694private Conversion ClassifyStandardImplicitConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 700Conversion classifyConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 757private Conversion ClassifyImplicitBuiltInConversionSlow(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 776private Conversion GetImplicitUserDefinedConversion(BoundExpression sourceExpression, TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 782private Conversion GetImplicitUserDefinedConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 787private Conversion ClassifyExplicitBuiltInOnlyConversion(TypeSymbol source, TypeSymbol destination, bool isChecked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, bool forCast) 861private Conversion GetExplicitUserDefinedConversion(BoundExpression sourceExpression, TypeSymbol source, TypeSymbol destination, bool isChecked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 867private Conversion GetExplicitUserDefinedConversion(TypeSymbol source, TypeSymbol destination, bool isChecked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 872private Conversion DeriveStandardExplicitFromOppositeStandardImplicitConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 905var strippedSource = source.StrippedType(); 906var strippedDestination = destination.StrippedType(); 935public bool IsBaseInterface(TypeSymbol baseType, TypeSymbol derivedType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 970public bool IsBaseClass(TypeSymbol derivedType, TypeSymbol baseType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 981for (TypeSymbol b = derivedType.BaseTypeWithDefinitionUseSiteDiagnostics(ref useSiteInfo); (object)b != null; b = b.BaseTypeWithDefinitionUseSiteDiagnostics(ref useSiteInfo)) 1013private Conversion ClassifyImplicitBuiltInConversionFromExpression(BoundExpression sourceExpression, TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1143private Conversion GetImplicitCollectionExpressionConversion(BoundUnconvertedCollectionExpression collectionExpression, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1155if (destination.IsNullableType(out var underlyingDestination)) 1168private Conversion GetSwitchExpressionConversion(BoundExpression source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1197private Conversion GetConditionalExpressionConversion(BoundExpression source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1215private static Conversion ClassifyNullLiteralConversion(BoundExpression source, TypeSymbol destination) 1254private static Conversion ClassifyImplicitConstantExpressionConversion(BoundExpression source, TypeSymbol destination) 1267if (destination.IsNullableType(out var underlyingDestination) && 1277private Conversion ClassifyImplicitTupleLiteralConversion(BoundTupleLiteral source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1291if (destination.IsNullableType(out var underlyingDestination)) 1303private Conversion ClassifyExplicitTupleLiteralConversion(BoundTupleLiteral source, TypeSymbol destination, bool isChecked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, bool forCast) 1319if (destination.IsNullableType(out var underlyingDestination)) 1333internal static bool HasImplicitConstantExpressionConversion(BoundExpression source, TypeSymbol destination) 1385private Conversion ClassifyExplicitOnlyConversionFromExpression(BoundExpression sourceExpression, TypeSymbol destination, bool isChecked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, bool forCast) 1403var sourceType = sourceExpression.Type; 1425private static bool HasImplicitEnumerationConversion(BoundExpression source, TypeSymbol destination) 1451private static LambdaConversionResult IsAnonymousFunctionCompatibleWithDelegate(UnboundLambda anonymousFunction, TypeSymbol type, CSharpCompilation compilation, bool isTargetExpressionTree) 1589var delegateType = type.TypeArgumentsWithAnnotationsNoUseSiteDiagnostics[0].Type; 1603internal bool IsAssignableFromMulticastDelegate(TypeSymbol type, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1610public static LambdaConversionResult IsAnonymousFunctionCompatibleWithType(UnboundLambda anonymousFunction, TypeSymbol type, CSharpCompilation compilation) 1627private static bool HasAnonymousFunctionConversion(BoundExpression source, TypeSymbol destination, CSharpCompilation compilation) 1640internal static CollectionExpressionTypeKind GetCollectionExpressionTypeKind(CSharpCompilation compilation, TypeSymbol destination, out TypeWithAnnotations elementType) 1684static bool implementsSpecialInterface(CSharpCompilation compilation, TypeSymbol targetType, SpecialType specialInterface) 1692internal static bool IsSpanOrListType(CSharpCompilation compilation, TypeSymbol targetType, WellKnownType spanType, [NotNullWhen(true)] out TypeWithAnnotations elementType) 1705internal Conversion ClassifyImplicitUserDefinedConversionForV6SwitchGoverningType(TypeSymbol sourceType, out TypeSymbol switchGoverningType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1737internal Conversion GetCallerLineNumberConversion(TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1742TypeSymbol expectedAttributeType = corLibrary.GetSpecialType(SpecialType.System_Int32); 1762internal bool HasCallerLineNumberConversion(TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1767internal bool HasCallerInfoStringConversion(TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1769TypeSymbol expectedAttributeType = corLibrary.GetSpecialType(SpecialType.System_String); 1774public static bool HasIdentityConversion(TypeSymbol type1, TypeSymbol type2) 1779private static bool HasIdentityConversionInternal(TypeSymbol type1, TypeSymbol type2, bool includeNullability) 1801private bool HasIdentityConversionInternal(TypeSymbol type1, TypeSymbol type2) 1866var type = typeWithAnnotations.Type; 1896public Conversion ConvertExtensionMethodThisArg(TypeSymbol parameterType, TypeSymbol thisType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1905public Conversion ClassifyImplicitExtensionMethodThisArgConversion(BoundExpression sourceExpressionOpt, TypeSymbol sourceType, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2011private static ConversionKind GetNumericConversion(TypeSymbol source, TypeSymbol destination) 2033private static bool HasImplicitNumericConversion(TypeSymbol source, TypeSymbol destination) 2038private static bool HasExplicitNumericConversion(TypeSymbol source, TypeSymbol destination) 2076private static bool IsNumericType(TypeSymbol type) 2100private static bool HasSpecialIntPtrConversion(TypeSymbol source, TypeSymbol target) 2136var s0 = source.StrippedType(); 2137var t0 = target.StrippedType(); 2139TypeSymbol otherType; 2182static bool isIntPtrOrUIntPtr(TypeSymbol type) => 2186private static bool HasExplicitEnumerationConversion(TypeSymbol source, TypeSymbol destination) 2215private Conversion ClassifyImplicitNullableConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2231TypeSymbol unwrappedDestination = destination.GetNullableUnderlyingType(); 2232TypeSymbol unwrappedSource = source.StrippedType(); 2261private Conversion GetImplicitTupleLiteralConversion(BoundTupleLiteral source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2279private Conversion GetExplicitTupleLiteralConversion(BoundTupleLiteral source, TypeSymbol destination, bool isChecked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, bool forCast) 2299TypeSymbol destination, 2337private Conversion ClassifyImplicitTupleConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2356private Conversion ClassifyExplicitTupleConversion(TypeSymbol source, TypeSymbol destination, bool isChecked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, bool forCast) 2376TypeSymbol source, 2377TypeSymbol destination, 2410private Conversion ClassifyExplicitNullableConversion(TypeSymbol source, TypeSymbol destination, bool isChecked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, bool forCast) 2428TypeSymbol unwrappedSource = source.StrippedType(); 2429TypeSymbol unwrappedDestination = destination.StrippedType(); 2465private bool HasCovariantArrayConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2487public bool HasIdentityOrImplicitReferenceConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2500private static bool HasImplicitDynamicConversionFromExpression(TypeSymbol expressionType, TypeSymbol destination) 2509private static bool HasExplicitDynamicConversion(TypeSymbol source, TypeSymbol destination) 2519private bool HasArrayConversionToInterface(ArrayTypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2600internal bool HasImplicitReferenceConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2663private bool HasImplicitConversionToInterface(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2697private bool HasImplicitConversionFromArray(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2738private bool HasImplicitConversionFromDelegate(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2774private bool HasImplicitFunctionTypeConversion(FunctionTypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2785internal bool IsValidFunctionTypeConversionTarget(TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2828public bool HasImplicitTypeParameterConversion(TypeParameterSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2850private bool HasImplicitReferenceTypeParameterConversion(TypeParameterSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2893private bool HasImplicitEffectiveBaseConversion(TypeParameterSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2917private bool HasImplicitEffectiveInterfaceSetConversion(TypeParameterSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2922private bool HasVarianceCompatibleInterfaceInEffectiveInterfaceSet(TypeParameterSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2942private bool HasAnyBaseInterfaceConversion(TypeSymbol derivedType, TypeSymbol baseType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2947private bool ImplementsVarianceCompatibleInterface(TypeSymbol derivedType, TypeSymbol baseType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2973internal bool ImplementsVarianceCompatibleInterface(NamedTypeSymbol derivedType, TypeSymbol baseType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2975return ImplementsVarianceCompatibleInterface((TypeSymbol)derivedType, baseType, ref useSiteInfo); 2978internal bool HasImplicitConversionToOrImplementsVarianceCompatibleInterface(TypeSymbol typeToCheck, NamedTypeSymbol targetInterfaceType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, out bool needSupportForRefStructInterfaces) 2998private bool IsRefLikeOrAllowsRefLikeTypeImplementingVarianceCompatibleInterface(TypeSymbol typeToCheck, NamedTypeSymbol targetInterfaceType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 3022if (expressionToCheck.Type is TypeSymbol typeToCheck && IsRefLikeOrAllowsRefLikeTypeImplementingVarianceCompatibleInterface(typeToCheck, targetInterfaceType, ref useSiteInfo)) 3046private bool HasInterfaceVarianceConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 3065private bool HasDelegateVarianceConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 3126if (!TypeSymbol.Equals(typeSymbol, destination.OriginalDefinition, TypeCompareKind.ConsiderEverything2)) 3149Debug.Assert(TypeSymbol.Equals(source.OriginalDefinition, destination.OriginalDefinition, TypeCompareKind.AllIgnoreOptions)); 3178TypeSymbol.Equals(destinationTypeArgument.Type, sourceTypeArgument.Type, TypeCompareKind.AllNullableIgnoreOptions) && 3227private bool HasImplicitBoxingTypeParameterConversion(TypeParameterSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 3281public bool HasBoxingConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 3342internal static bool HasImplicitPointerToVoidConversion(TypeSymbol source, TypeSymbol destination) 3353internal bool HasImplicitPointerConversion(TypeSymbol? source, TypeSymbol? destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 3410private bool HasIdentityOrReferenceConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 3433private bool HasExplicitReferenceConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 3507private bool HasExplicitReferenceTypeParameterConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 3559private bool HasUnboxingTypeParameterConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 3582if (TypeSymbol.Equals(type, source, TypeCompareKind.ConsiderEverything2)) 3610private bool HasExplicitDelegateConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 3641if (!TypeSymbol.Equals(source.OriginalDefinition, destination.OriginalDefinition, TypeCompareKind.ConsiderEverything2)) 3665var sourceArg = sourceTypeArguments[i].Type; 3666var destinationArg = destinationTypeArguments[i].Type; 3699private bool HasExplicitArrayConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 3760var specialDefinition = ((TypeSymbol)source.OriginalDefinition).SpecialType; 3768var sourceElement = ((NamedTypeSymbol)source).TypeArgumentWithDefinitionUseSiteDiagnostics(0, ref useSiteInfo).Type; 3769var destinationElement = destinationArray.ElementType; 3791private bool HasUnboxingConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 3859private static bool HasPointerToPointerConversion(TypeSymbol source, TypeSymbol destination) 3867private static bool HasPointerToIntegerConversion(TypeSymbol source, TypeSymbol destination) 3885private static bool HasIntegerToPointerConversion(TypeSymbol source, TypeSymbol destination) 3899private static bool IsIntegerTypeSupportingPointerConversions(TypeSymbol type)
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, 262TypeSymbol convertsFrom = op.GetParameterType(0); 263TypeSymbol convertsTo = op.ReturnType; 314TypeSymbol nullableFrom = MakeNullableType(convertsFrom); 315TypeSymbol nullableTo = convertsTo.IsValidNullableTypeArgument() ? MakeNullableType(convertsTo) : convertsTo; 360private TypeSymbol MostSpecificSourceTypeForExplicitUserDefinedConversion( 363TypeSymbol source, 398if (u.Any(static (conv, source) => TypeSymbol.Equals(conv.FromType, source, TypeCompareKind.ConsiderEverything2), source)) 407var result = MostEncompassedType(u, isValid, conv => conv.FromType, ref inLambdaUseSiteInfo); 418private TypeSymbol MostSpecificTargetTypeForExplicitUserDefinedConversion( 420TypeSymbol target, 452if (u.Any(static (conv, target) => TypeSymbol.Equals(conv.ToType, target, TypeCompareKind.ConsiderEverything2), target)) 461var result = MostEncompassingType(u, isValid, conv => conv.ToType, ref inLambdaUseSiteInfo); 470private Conversion EncompassingExplicitConversion(BoundExpression expr, TypeSymbol a, TypeSymbol b, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 493private 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, 278TypeSymbol source, 279TypeSymbol target, 292TypeSymbol convertsFrom = op.GetParameterType(0); 293TypeSymbol convertsTo = op.ReturnType; 340TypeSymbol nullableFrom = MakeNullableType(convertsFrom); 341TypeSymbol nullableTo = convertsTo.IsValidNullableTypeArgument() ? MakeNullableType(convertsTo) : convertsTo; 355private TypeSymbol MostSpecificSourceTypeForImplicitUserDefinedConversion(ImmutableArray<UserDefinedConversionAnalysis> u, TypeSymbol source, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 360if (u.Any(static (conv, source) => TypeSymbol.Equals(conv.FromType, source, TypeCompareKind.ConsiderEverything2), source)) 371private TypeSymbol MostSpecificTargetTypeForImplicitUserDefinedConversion(ImmutableArray<UserDefinedConversionAnalysis> u, TypeSymbol target, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 394if (u.Any(static (conv, target) => TypeSymbol.Equals(conv.ToType, target, TypeCompareKind.ConsiderEverything2), target)) 405if (!TypeSymbol.Equals(conv.FromType, conv.Operator.GetParameterType(0), TypeCompareKind.ConsiderEverything2)) 410if (!TypeSymbol.Equals(conv.ToType, conv.Operator.ReturnType, TypeCompareKind.ConsiderEverything2)) 418private static int? MostSpecificConversionOperator(TypeSymbol sx, TypeSymbol tx, ImmutableArray<UserDefinedConversionAnalysis> u) 420return MostSpecificConversionOperator(conv => TypeSymbol.Equals(conv.FromType, sx, TypeCompareKind.ConsiderEverything2) && TypeSymbol.Equals(conv.ToType, tx, TypeCompareKind.ConsiderEverything2), u); 565private bool IsEncompassedBy(BoundExpression aExpr, TypeSymbol a, TypeSymbol b, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 579private bool IsEncompassedBy(TypeSymbol a, TypeSymbol b, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 584private Conversion EncompassingImplicitConversion(BoundExpression aExpr, TypeSymbol a, TypeSymbol b, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 599private Conversion EncompassingImplicitConversion(TypeSymbol a, TypeSymbol b, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 676private TypeSymbol MostEncompassedType<T>( 678Func<T, TypeSymbol> extract, 684private TypeSymbol MostEncompassedType<T>( 687Func<T, TypeSymbol> extract, 718TypeSymbol leftType = extract(left); 719TypeSymbol rightType = extract(right); 720if (TypeSymbol.Equals(leftType, rightType, TypeCompareKind.ConsiderEverything2)) 738private TypeSymbol MostEncompassingType<T>( 740Func<T, TypeSymbol> extract, 746private TypeSymbol MostEncompassingType<T>( 749Func<T, TypeSymbol> extract, 757TypeSymbol leftType = extract(left); 758TypeSymbol rightType = extract(right); 759if (TypeSymbol.Equals(leftType, rightType, TypeCompareKind.ConsiderEverything2)) 872private NamedTypeSymbol MakeNullableType(TypeSymbol type) 881protected 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 (44)
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(); 1793if (!TypeSymbol.Equals(namedSource.OriginalDefinition, namedTarget.OriginalDefinition, TypeCompareKind.ConsiderEverything2)) 1860Debug.Assert(TypeSymbol.Equals(source.OriginalDefinition, target.OriginalDefinition, TypeCompareKind.ConsiderEverything2)); 1985private static TypeWithAnnotations GetMatchingElementType(ArrayTypeSymbol source, TypeSymbol target, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2020private bool LowerBoundArrayInference(TypeSymbol source, TypeSymbol target, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2063private bool LowerBoundConstructedInference(TypeSymbol source, TypeSymbol target, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2090TypeSymbol.Equals(constructedSource.OriginalDefinition, constructedTarget.OriginalDefinition, TypeCompareKind.ConsiderEverything2)) 2127private bool LowerBoundClassInference(TypeSymbol source, NamedTypeSymbol target, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2162if (TypeSymbol.Equals(sourceBase.OriginalDefinition, target.OriginalDefinition, TypeCompareKind.ConsiderEverything2)) 2172private bool LowerBoundInterfaceInference(TypeSymbol source, NamedTypeSymbol target, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2257Debug.Assert(TypeSymbol.Equals(source.OriginalDefinition, target.OriginalDefinition, TypeCompareKind.ConsiderEverything2)); 2296private bool LowerBoundFunctionPointerTypeInference(TypeSymbol source, TypeSymbol target, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2468var source = sourceWithAnnotations.Type; 2469var target = targetWithAnnotations.Type; 2490TypeSymbol.Equals(constructedSource.OriginalDefinition, target.OriginalDefinition, TypeCompareKind.ConsiderEverything2)) 2524private bool UpperBoundClassInference(NamedTypeSymbol source, TypeSymbol target, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2541if (TypeSymbol.Equals(targetBase.OriginalDefinition, source.OriginalDefinition, TypeCompareKind.ConsiderEverything2)) 2553private bool UpperBoundInterfaceInference(NamedTypeSymbol source, TypeSymbol target, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2607Debug.Assert(TypeSymbol.Equals(source.OriginalDefinition, target.OriginalDefinition, TypeCompareKind.ConsiderEverything2)); 2646private bool UpperBoundFunctionPointerTypeInference(TypeSymbol source, TypeSymbol target, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2894static bool isExpressionType(TypeSymbol? type) 2910var source = sourceWithAnnotations.Type; 2911var destination = destinationWithAnnotations.Type; 3032if (TypeSymbol.Equals(currentInterface.OriginalDefinition, target.OriginalDefinition, TypeCompareKind.ConsiderEverything)) 3038else if (!TypeSymbol.Equals(matchingInterface, currentInterface, TypeCompareKind.ConsiderEverything)) 3138TypeSymbol source = argument.Type; 3183private static bool IsReallyAType(TypeSymbol? type)
Binder\Semantics\OverloadResolution\OverloadResolution.cs (67)
144TypeSymbol returnType = null, 192TypeSymbol returnType = null, 264TypeSymbol returnType, 726TypeSymbol returnType, 1194public static bool TryInferParamsCollectionIterationType(Binder binder, TypeSymbol type, out TypeWithAnnotations elementType) 1353private bool TypeArgumentsAccessible(ImmutableArray<TypeSymbol> typeArguments, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1355foreach (TypeSymbol arg in typeArguments) 1485private static bool IsLessDerivedThanAny<TMember>(int index, TypeSymbol type, ArrayBuilder<MemberResolutionResult<TMember>> results, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2040var type1 = getParameterTypeAndRefKind(i, m1.Result, m1LeastOverriddenParameters, m1.Result.ParamsElementTypeOpt, out RefKind parameter1RefKind); 2042var type2 = getParameterTypeAndRefKind(i, m2.Result, m2LeastOverriddenParameters, m2.Result.ParamsElementTypeOpt, out RefKind parameter2RefKind); 2058var type1Normalized = type1; 2059var type2Normalized = type2; 2182var type1 = getParameterTypeAndRefKind(i, m1.Result, m1LeastOverriddenParameters, m1.Result.ParamsElementTypeOpt, out _); 2184var type2 = getParameterTypeAndRefKind(i, m2.Result, m2LeastOverriddenParameters, m2.Result.ParamsElementTypeOpt, out _); 2186var type1Normalized = type1; 2187var type2Normalized = type2; 2326using (var uninst1 = TemporaryArray<TypeSymbol>.Empty) 2327using (var uninst2 = TemporaryArray<TypeSymbol>.Empty) 2414TypeSymbol t1 = m1LeastOverriddenParameters[^1].Type; 2415TypeSymbol t2 = m2LeastOverriddenParameters[^1].Type; 2434static TypeSymbol getParameterTypeAndRefKind(int i, MemberAnalysisResult result, ImmutableArray<ParameterSymbol> parameters, TypeWithAnnotations paramsElementTypeOpt, out RefKind parameter1RefKind) 2439var type = parameter.Type; 2574private static BetterResult MoreSpecificType(ref TemporaryArray<TypeSymbol> t1, ref TemporaryArray<TypeSymbol> t2, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2606private static BetterResult MoreSpecificType(TypeSymbol t1, TypeSymbol t2, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2683using var allTypeArgs1 = TemporaryArray<TypeSymbol>.Empty; 2684using var allTypeArgs2 = TemporaryArray<TypeSymbol>.Empty; 2694private BetterResult BetterConversionFromExpression(BoundExpression node, TypeSymbol t1, TypeSymbol t2, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2710TypeSymbol t1, 2713TypeSymbol t2, 2764private BetterResult BetterConversionFromExpression(BoundExpression node, TypeSymbol t1, Conversion conv1, TypeSymbol t2, Conversion conv2, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, out bool okToDowngradeToNeither) 2871private bool IsBetterCollectionExpressionConversion(TypeSymbol t1, Conversion conv1, TypeSymbol t2, Conversion conv2, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2873TypeSymbol elementType1; 2875TypeSymbol elementType2; 2882TypeSymbol t1, CollectionExpressionTypeKind kind1, TypeSymbol elementType1, 2883TypeSymbol t2, CollectionExpressionTypeKind kind2, TypeSymbol elementType2, 2913bool hasImplicitConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) => 2917private bool IsBetterParamsCollectionType(TypeSymbol t1, TypeSymbol t2, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2925private static bool IsSZArrayOrArrayInterface(TypeSymbol type, out TypeSymbol elementType) 2943private bool ExpressionMatchExactly(BoundExpression node, TypeSymbol t, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2967TypeSymbol y; 3059private bool ExpressionMatchExactly(BoundTupleLiteral tupleSource, TypeSymbol targetType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 3130TypeSymbol type1, 3131TypeSymbol type2, 3146TypeSymbol type1, 3148TypeSymbol type2, 3158TypeSymbol type1, 3160TypeSymbol type2, 3237TypeSymbol r1 = invoke1.ReturnType; 3238TypeSymbol r2 = invoke2.ReturnType; 3325private bool CanDowngradeConversionFromLambdaToNeither(BetterResult currentResult, UnboundLambda lambda, TypeSymbol type1, TypeSymbol type2, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, bool fromTypeAnalysis) 3354TypeSymbol r1 = invoke1.ReturnType; 3355TypeSymbol r2 = invoke2.ReturnType; 3449private static bool IsSignedIntegralType(TypeSymbol type) 3470private static bool IsUnsignedIntegralType(TypeSymbol type) 4266TypeSymbol parameterType, 4298var 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) 145var 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)
51bool foundInfo = _updatedNullabilities.TryGetValue(currentBinary, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType); 53var type = foundInfo ? infoAndType.Type : currentBinary.Type; 173if (_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() 1033Debug.Assert(taskLikeReturnTypeOpt is null || ((object)taskLikeReturnTypeOpt == taskLikeReturnTypeOpt.ConstructedFrom && taskLikeReturnTypeOpt.IsCustomTaskType(out var builderArgument))); 1050!TypeSymbol.Equals(other.TaskLikeReturnTypeOpt, this.TaskLikeReturnTypeOpt, TypeCompareKind.ConsiderEverything2)) 1123if (delegateReturnType.IsCustomTaskType(out var builderType))
CodeGen\CodeGenerator.cs (1)
344private void EmitSymbolToken(TypeSymbol symbol, SyntaxNode syntaxNode)
CodeGen\EmitAddress.cs (5)
136var type = expression.Type; 241var receiverType = expression.Type; 408var elementType = arrayAccess.Type; 506var receiverType = receiver.Type; 536private 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; 157private ConcurrentCache<TypeSymbol, NamedTypeSymbol>? _lazyTypeToNullableVersion; 1685private ConcurrentCache<TypeSymbol, NamedTypeSymbol> TypeToNullableVersion 1689return InterlockedOperations.Initialize(ref _lazyTypeToNullableVersion, static () => new ConcurrentCache<TypeSymbol, NamedTypeSymbol>(size: 100)); 1700internal NamedTypeSymbol GetOrCreateNullableType(TypeSymbol typeArgument) 1717static bool isSupportedType(TypeSymbol typeArgument) 1761internal TypeSymbol GetTypeByReflectionType(Type type, BindingDiagnosticBag diagnostics) 1763var result = Assembly.GetTypeByReflectionType(type); 1788internal TypeSymbol? GetHostObjectTypeSymbol() 1792TypeSymbol? symbol = Assembly.GetTypeByReflectionType(HostObjectType); 1834internal new TypeSymbol DynamicType 2185if (!(TypeSymbol.Equals(namedType.ConstructedFrom, GetWellKnownType(WellKnownType.System_Threading_Tasks_Task), TypeCompareKind.ConsiderEverything2) || 2186TypeSymbol.Equals(namedType.ConstructedFrom, GetWellKnownType(WellKnownType.System_Threading_Tasks_Task_T), TypeCompareKind.ConsiderEverything2))) 2216TypeSymbol returnType = method.ReturnType; 2311TypeSymbol? cssource = source.EnsureCSharpSymbolOrNull(nameof(source)); 2312TypeSymbol? csdest = destination.EnsureCSharpSymbolOrNull(nameof(destination)); 2370internal ArrayTypeSymbol CreateArrayTypeSymbol(TypeSymbol elementType, int rank = 1, NullableAnnotation elementNullableAnnotation = NullableAnnotation.Oblivious) 2388internal PointerTypeSymbol CreatePointerTypeSymbol(TypeSymbol elementType, NullableAnnotation elementNullableAnnotation = NullableAnnotation.Oblivious) 2405TypeSymbol? throughType0 = throughType.EnsureCSharpSymbolOrNull(nameof(throughType)); 4125var elementType = typeSymbol.EnsureCSharpSymbolOrNull($"{nameof(elementTypes)}[{i}]"); 4191var type = memberTypes[i].GetSymbol(); 4209var csharpReturnType = returnType.EnsureCSharpSymbolOrNull(nameof(returnType)); 4210var csharpLeftType = leftType.EnsureCSharpSymbolOrNull(nameof(leftType)); 4211var csharpRightType = rightType.EnsureCSharpSymbolOrNull(nameof(rightType)); 4279TypeSymbol.Equals(csharpLeftType, csharpRightType, TypeCompareKind.ConsiderEverything)) 4292TypeSymbol.Equals(csharpLeftType, csharpReturnType, TypeCompareKind.ConsiderEverything)) 4313TypeSymbol.Equals(csharpLeftType, csharpRightType, TypeCompareKind.ConsiderEverything)) 4324TypeSymbol.Equals(csharpLeftType, csharpRightType, TypeCompareKind.ConsiderEverything) && 4325TypeSymbol.Equals(csharpReturnType, csharpRightType, TypeCompareKind.ConsiderEverything)) 4338TypeSymbol.Equals(csharpLeftType, csharpReturnType, TypeCompareKind.ConsiderEverything)) 4345TypeSymbol.Equals(csharpRightType, csharpReturnType, TypeCompareKind.ConsiderEverything)) 4354TypeSymbol.Equals(csharpLeftType, csharpRightType, TypeCompareKind.ConsiderEverything)) 4378TypeSymbol.Equals(csharpLeftType, csharpReturnType, TypeCompareKind.ConsiderEverything)) 4387TypeSymbol.Equals(csharpRightType, csharpReturnType, TypeCompareKind.ConsiderEverything)) 4396TypeSymbol.Equals(csharpLeftType, csharpReturnType, TypeCompareKind.ConsiderEverything)) 4405TypeSymbol.Equals(csharpLeftType, csharpRightType, TypeCompareKind.ConsiderEverything)) 4422bool isAllowedPointerArithmeticIntegralType(TypeSymbol type) 4425bool isReadOnlySpanOfByteType(TypeSymbol type) 4434var csharpReturnType = returnType.EnsureCSharpSymbolOrNull(nameof(returnType)); 4435var csharpOperandType = operandType.EnsureCSharpSymbolOrNull(nameof(operandType)); 4488TypeSymbol.Equals(csharpOperandType, csharpReturnType, TypeCompareKind.ConsiderEverything)) 4496TypeSymbol.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; 4660TypeSymbol receiverType, 4699TypeSymbol receiverType, 4743TypeSymbol extensionThisType = null;
Compilation\MemberSemanticModel.cs (2)
439TypeSymbol csdestination = destination.EnsureCSharpSymbolOrNull(nameof(destination)); 488TypeSymbol destination)
Compilation\MemberSemanticModel.NodeMapBuilder.cs (2)
98TypeSymbol.Equals(((BoundTypeExpression)existing[i]).Type, ((BoundTypeOrValueExpression)nodesToAdd[i]).Type, TypeCompareKind.ConsiderEverything2), 106TypeSymbol.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)
233var returnType = entryPoint.ReturnType; 564TypeSymbol discarded = fieldSymbol.FixedImplementationType(compilationState.ModuleBuilderOpt); 2265if (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)
94internal override Cci.ITypeReference EncTranslateLocalVariableType(TypeSymbol type, DiagnosticBag diagnostics) 98var 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)
1408private static bool TypeIsImmutable(TypeSymbol t)
FlowAnalysis\DefiniteAssignment.cs (9)
244Debug.Assert(member is TypeSymbol type && 474TypeSymbol parameterType = parameter.Type; 898internal static bool WriteConsideredUse(TypeSymbol type, BoundExpression value) 1120private bool MayRequireTrackingReceiverType(TypeSymbol type) 1672TypeSymbol structType = variable.Symbol.GetTypeOrReturnType().Type; 1708TypeSymbol type = id.Symbol.GetTypeOrReturnType().Type; 1744TypeSymbol type = id.Symbol.GetTypeOrReturnType().Type; 2538if (refKind != RefKind.None && ((object)method == null || method.IsExtern) && arg.Type is TypeSymbol type) 2585private 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, 1031static ImmutableArray<Symbol> getAllTypeAndRequiredMembers(TypeSymbol containingType) 1484ImmutableDictionary<BoundExpression, (NullabilityInfo, TypeSymbol?)> analyzedNullabilitiesMap; 1489private static (SnapshotManager?, ImmutableDictionary<BoundExpression, (NullabilityInfo, TypeSymbol?)>) AnalyzeWithSemanticInfo( 1499var analyzedNullabilities = ImmutableDictionary.CreateBuilder<BoundExpression, (NullabilityInfo, TypeSymbol?)>(EqualityComparer<BoundExpression>.Default, NullabilityInfoTypeComparer.Instance); 1556var analyzedNullabilities = ImmutableDictionary.CreateBuilder<BoundExpression, (NullabilityInfo, TypeSymbol?)>(EqualityComparer<BoundExpression>.Default, NullabilityInfoTypeComparer.Instance); 1595private static BoundNode Rewrite(ImmutableDictionary<BoundExpression, (NullabilityInfo, TypeSymbol?)> updatedNullabilities, SnapshotManager? snapshotManager, BoundNode node, ref ImmutableDictionary<Symbol, Symbol>? remappedSymbols) 1717ImmutableDictionary<BoundExpression, (NullabilityInfo, TypeSymbol?)>.Builder? analyzedNullabilityMapOpt, 1991TypeSymbol slotType = NominalSlotType(result); 1992TypeSymbol? nodeType = node.Type; 2028var operandType = operand.Type; 2029var convertedType = conv.Type; 2046TypeSymbol.Equals(conv.Type, conv.Operand.Type, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes): 2191private static object GetTypeAsDiagnosticArgument(TypeSymbol? typeOpt) 2549private void InheritNullableStateOfTrackableStruct(TypeSymbol targetType, int targetSlot, int valueSlot, bool isDefaultValue, int skipSlot = -1) 2574TypeSymbol possibleBase = possibleMember.ContainingType; 2575TypeSymbol possibleDerived = NominalSlotType(slot); 2639private TypeSymbol NominalSlotType(int slot) 2671private void InheritDefaultState(TypeSymbol targetType, int targetSlot) 2676var actualType = _variables[targetSlot].Symbol.GetTypeOrReturnType().Type; 3486private static bool AreCloseEnough(TypeSymbol? typeA, TypeSymbol? typeB) 3502static bool canIgnoreAnyType(TypeSymbol type) 3506static bool canIgnoreType(TypeSymbol type) 3552private static bool TypeAllowsConditionalState(TypeSymbol? type) 3558private void UnsplitIfNeeded(TypeSymbol? type) 3680var strippedTargetCollectionType = targetCollectionType.Type.StrippedType(); 3681Debug.Assert(TypeSymbol.Equals(strippedTargetCollectionType, node.Type, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes)); 3720(CollectionExpressionTypeKind, TypeWithAnnotations) getCollectionDetails(BoundCollectionExpression node, TypeSymbol collectionType) 3751var type = node.Type; 3752(int slot, NullableFlowState resultState, Func<TypeSymbol, MethodSymbol?, int>? initialStateInferenceCompletion) = inferInitialObjectState(node, type, constructor, arguments, argumentResults, isTargetTyped); 3754Action<int, TypeSymbol>? initializerCompletion = null; 3767TypeSymbol? type, 3770Func<TypeSymbol, MethodSymbol?, int>? initialStateInferenceCompletion, 3771Action<int, TypeSymbol>? initializerCompletion, 3799Func<TypeSymbol, MethodSymbol?, int> initialStateInferenceCompletion, 3800Action<int, TypeSymbol>? initializerCompletion, 3808Debug.Assert(TypeSymbol.Equals(resultTypeWithAnnotations.Type, node.Type, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes)); 3810var type = resultTypeWithAnnotations.Type; 3823static MethodSymbol? getConstructor(BoundObjectCreationExpressionBase node, TypeSymbol type) 3835(int slot, NullableFlowState resultState, Func<TypeSymbol, MethodSymbol?, int>? completion) inferInitialObjectState( 3836BoundExpression node, TypeSymbol type, MethodSymbol? constructor, 3905Func<TypeSymbol, MethodSymbol?, int> inferInitialObjectStateAsContinuation( 3910return (TypeSymbol type, MethodSymbol? constructor) => 3924private Action<int, TypeSymbol>? VisitObjectCreationInitializer(int containingSlot, TypeSymbol containingType, BoundObjectInitializerExpressionBase node, bool delayCompletionForType) 3927Action<int, TypeSymbol>? completion = null; 3974private Action<int, TypeSymbol>? VisitObjectElementInitializer(int containingSlot, TypeSymbol containingType, BoundAssignmentOperator node, bool delayCompletionForType) 3993Action<int, TypeSymbol>? visitMemberInitializer(int containingSlot, TypeSymbol containingType, BoundAssignmentOperator node, bool delayCompletionForType) 4032Action<int, TypeSymbol>? setAnalyzedNullability( 4054Action<int, TypeSymbol>? setAnalyzedNullabilityAsContinuation( 4060return (int containingSlot, TypeSymbol containingType) => 4074static Symbol? getTargetMember(TypeSymbol containingType, BoundObjectInitializerMember objectInitializer) 4080Debug.Assert(TypeSymbol.Equals(objectInitializer.Type, symbol.GetTypeOrReturnType().Type, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes)); 4092Action<int, Symbol>? visitNestedInitializer(int containingSlot, TypeSymbol containingType, Symbol symbol, BoundObjectInitializerExpressionBase initializer, bool delayCompletionForType) 4097Action<int, TypeSymbol>? nestedCompletion = VisitObjectCreationInitializer(slot, symbol.GetTypeOrReturnType().Type, initializer, delayCompletionForType); 4103Symbol symbol, BoundObjectInitializerExpressionBase initializer, int slot, Action<int, TypeSymbol>? nestedCompletion, 4124Action<int, Symbol>? completeNestedInitializerAnalysisAsContinuation(BoundObjectInitializerExpressionBase initializer, Action<int, TypeSymbol>? nestedCompletion) 4185private Action<int, TypeSymbol>? VisitCollectionElementInitializer(BoundCollectionElementInitializer node, TypeSymbol containingType, bool delayCompletionForType) 4211Debug.Assert(TypeSymbol.Equals(containingType, receiverResult.RValueType.Type, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes)); 4212Debug.Assert(TypeSymbol.Equals(containingType, receiverResult.LValueType.Type, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes)); 4218Action<int, TypeSymbol>? setUpdatedSymbol( 4220TypeSymbol containingType, 4245Action<int, TypeSymbol>? setUpdatedSymbolAsContinuation( 4250return (int containingSlot, TypeSymbol containingType) => 4260static MethodSymbol addMethodAsMemberOfContainingType(BoundCollectionElementInitializer node, TypeSymbol containingType, ref ImmutableArray<VisitResult> argumentResults) 4269Debug.Assert(TypeSymbol.Equals(containingType, receiverResult.RValueType.Type, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes)); 4270Debug.Assert(TypeSymbol.Equals(containingType, receiverResult.LValueType.Type, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes)); 4307protected override bool IsEmptyStructType(TypeSymbol type) 4443var arrayType = VisitArrayInitialization(node.Type, initialization, node.HasErrors); 4448private TypeSymbol VisitArrayInitialization(TypeSymbol type, BoundArrayInitialization initialization, bool hasErrors) 4465var resultType = type; 4498TypeSymbol? bestType = null; 4553static TypeSymbol setSpanElementType(NamedTypeSymbol namedType, TypeWithAnnotations elementType) 4616TypeSymbol? bestType = BestTypeInferrer.InferBestType(placeholders, walker._conversions, ref discardedUseSiteInfo, out inferredFromFunctionType); 4683TypeSymbol.Equals(node.Indices[0].Type, compilation.GetWellKnownType(WellKnownType.System_Range), TypeCompareKind.ConsiderEverything2)) 4700var expressionType = VisitRvalueWithState(node.Expression).Type; 4719private TypeWithState InferResultNullability(BinaryOperatorKind operatorKind, MethodSymbol? methodOpt, TypeSymbol resultType, TypeWithState leftType, TypeWithState rightType) 4959TypeSymbol returnType, 4977TypeSymbol methodContainer = method.ContainingType; 4981TypeSymbol asMemberOfType = getTypeIfContainingType(methodContainer, leftUnderlyingType.Type, leftOperand) ?? 5073TypeSymbol? getTypeIfContainingType(TypeSymbol baseType, TypeSymbol? derivedType, BoundExpression operand) 5232var receiverType = conditional.Receiver.Type!; 5278private static bool PossiblyNullableType([NotNullWhen(true)] TypeSymbol? operandType) => operandType?.CanContainNull() == true; 5334private void LearnFromNullTest(int slot, TypeSymbol? expressionType, ref LocalState state, bool markDependentSlotsNotNull) 5354private void MarkDependentSlotsNotNull(int slot, TypeSymbol expressionType, ref LocalState state, int depth = 2) 5376static IEnumerable<Symbol> getMembers(TypeSymbol type) 5394static NamedTypeSymbol effectiveBase(TypeSymbol type) => type switch 5400static ImmutableArray<NamedTypeSymbol> inheritedInterfaces(TypeSymbol type) => type switch 5446TypeSymbol.Equals(targetType.Type.GetNullableUnderlyingType(), node.Type, TypeCompareKind.AllIgnoreOptions)); 5456Debug.Assert(TypeSymbol.Equals(targetType.Type, rightResult.Type, TypeCompareKind.AllIgnoreOptions)); 5499var leftResultType = leftResult.Type; 5500var rightResultType = rightResult.Type; 5516(TypeSymbol ResultType, NullableFlowState LeftState) getLeftResultType(TypeSymbol leftType, TypeSymbol rightType) 5534(TypeSymbol ResultType, NullableFlowState LeftState) getResultStateWithRightType(TypeSymbol leftType, TypeSymbol rightType) 5720TypeSymbol accessType = accessTypeWithAnnotations.Type; 5721var oldType = node.Type; 5722var resultType = 5786TypeSymbol? refResultType = node.Type?.SetUnknownNullabilityForReferenceTypes(); 5822TypeSymbol? resultType; 6047var rvalueType = _currentConditionalReceiverVisitResult.RValueType.Type; 6240static bool isWellKnownEqualityMethodOrImplementation(CSharpCompilation compilation, MethodSymbol method, TypeSymbol? receiverType, WellKnownMember wellKnownMember) 6260for (var baseType = receiverType; baseType is object && method is object; baseType = baseType.BaseTypeNoUseSiteDiagnostics) 6433var type = receiverType.Type; 7022void applyMemberPostConditions(int receiverSlot, TypeSymbol type, ImmutableArray<string> members, ref LocalState state) 7035void markMembersAsNotNull(int receiverSlot, TypeSymbol type, string memberName, ref LocalState state) 7213var argumentResultType = resultType.Type; 7301static bool hasNoNonNullableCounterpart(TypeSymbol? type) 7925private Conversion GenerateConversionForConditionalOperator(BoundExpression sourceExpression, TypeSymbol? sourceType, TypeSymbol destinationType, bool reportMismatch, bool isChecked) 7936private Conversion GenerateConversion(Conversions conversions, BoundExpression? sourceExpression, TypeSymbol? sourceType, TypeSymbol destinationType, bool fromExplicitCast, bool extensionMethodThisArgument, bool isChecked) 8013private static Symbol AsMemberOfType(TypeSymbol? type, Symbol symbol) 8226private static bool AreNullableAndUnderlyingTypes([NotNullWhen(true)] TypeSymbol? nullableTypeOpt, [NotNullWhen(true)] TypeSymbol? underlyingTypeOpt, out TypeWithAnnotations underlyingTypeWithAnnotations) 8352private void TrackNullableStateOfNullableValue(int containingSlot, TypeSymbol containingType, BoundExpression? value, TypeWithState valueType, int valueSlot) 8369TypeSymbol targetType, 8370TypeSymbol operandType, 8478private void ReportNullabilityMismatchWithTargetDelegate(Location location, TypeSymbol targetType, MethodSymbol targetInvokeMethod, MethodSymbol sourceInvokeMethod, bool invokedAsExtensionMethod) 8496void reportBadDelegateReturn(BindingDiagnosticBag bag, MethodSymbol targetInvokeMethod, MethodSymbol sourceInvokeMethod, bool topLevel, (TypeSymbol targetType, Location location) arg) 8503void reportBadDelegateParameter(BindingDiagnosticBag bag, MethodSymbol sourceInvokeMethod, MethodSymbol targetInvokeMethod, ParameterSymbol parameter, bool topLevel, (TypeSymbol targetType, Location location) arg) 8681TypeSymbol targetType = targetTypeWithNullability.Type; 8705static (MethodSymbol invokeSignature, ImmutableArray<ParameterSymbol>) getDelegateOrFunctionPointerInfo(TypeSymbol targetType) 8964static TypeWithState calculateResultType(TypeWithAnnotations targetTypeWithNullability, bool fromExplicitCast, NullableFlowState resultState, bool isSuppressed, TypeSymbol targetType) 8988var type = operandType.Type; 9019var type = operandType.Type; 9180TypeSymbol targetType = targetTypeWithNullability.Type; 9351TypeSymbol type = typeNeedsLifting ? MakeNullableOf(returnType) : returnType.Type; 9360var type = typeWithState.Type; 9376private TypeSymbol MakeNullableOf(TypeWithAnnotations underlying) 9485Debug.Assert(TypeSymbol.Equals(resultTypeWithAnnotations.Type, node.Type, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes)); 9563TypeSymbol argType = arg.Type; 9582TypeSymbol argType = arg.Type; 10455private void ReportNullabilityMismatchInRefArgument(BoundExpression argument, TypeSymbol argumentType, ParameterSymbol parameter, TypeSymbol parameterType) 10467private void ReportNullabilityMismatchInArgument(SyntaxNode argument, TypeSymbol argumentType, ParameterSymbol parameter, TypeSymbol parameterType, bool forOutput) 10472private void ReportNullabilityMismatchInArgument(Location argumentLocation, TypeSymbol argumentType, ParameterSymbol? parameterOpt, TypeSymbol parameterType, bool forOutput) 10534var receiverType = VisitRvalueWithState(receiverOpt).Type; 10657private int GetNullableOfTValueSlot(TypeSymbol containingType, int containingSlot, out Symbol? valueProperty, bool forceSlotEvenIfEmpty = false) 10660Debug.Assert(TypeSymbol.Equals(NominalSlotType(containingSlot), containingType, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes)); 10706var resultType = resultTypeWithState.Type; 10812TypeSymbol? getEnumeratorType; 11302TypeSymbol type = node.Type; 11355var type = node.Type; 11612var resultTypeSymbol = resultType.Type; 11632private bool ReportPossibleNullReceiverIfNeeded(TypeSymbol type, NullableFlowState state, bool checkNullableValueType, SyntaxNode syntax, out bool reportedDiagnostic) 11673private static bool IsNullabilityMismatch(TypeSymbol type1, TypeSymbol type2) 11760var type = VisitArrayInitialization(node.Type, initialization, node.HasErrors); 12467private sealed class NullabilityInfoTypeComparer : IEqualityComparer<(NullabilityInfo info, TypeSymbol? type)> 12471public bool Equals((NullabilityInfo info, TypeSymbol? type) x, (NullabilityInfo info, TypeSymbol? type) y) 12477public int GetHashCode((NullabilityInfo info, TypeSymbol? type) obj)
FlowAnalysis\NullableWalker.DebugVerifier.cs (3)
20private readonly ImmutableDictionary<BoundExpression, (NullabilityInfo Info, TypeSymbol? Type)> _analyzedNullabilityMap; 25private DebugVerifier(ImmutableDictionary<BoundExpression, (NullabilityInfo Info, TypeSymbol? Type)> analyzedNullabilityMap, SnapshotManager? snapshotManager) 36public static void Verify(ImmutableDictionary<BoundExpression, (NullabilityInfo Info, TypeSymbol? Type)> analyzedNullabilityMap, SnapshotManager? snapshotManagerOpt, BoundNode node)
FlowAnalysis\NullableWalker_Patterns.cs (12)
132TypeSymbol inputType, 241var originalInputType = node.Expression.Type; 371var tempMap = PooledDictionary<BoundDagTemp, (int slot, TypeSymbol type)>.GetInstance(); 399(int inputSlot, TypeSymbol inputType) = tempMap.TryGetValue(evaluation.Input, out var slotAndType) ? slotAndType : throw ExceptionUtilities.Unreachable(); 556(int inputSlot, TypeSymbol inputType) = slotAndType; 702void addToTempMap(BoundDagTemp output, int slot, TypeSymbol type) 719bool isDerivedType(TypeSymbol derivedType, TypeSymbol baseType) 799void addTemp(BoundDagEvaluation e, TypeSymbol t, int index = 0) 808static TypeWithAnnotations getIndexerOutputType(TypeSymbol inputType, BoundExpression e, bool isSlice) 845var originalInputType = node.Expression.Type; 913TypeSymbol inferredType =
Generated\BoundNodes.xml.Generated.cs (1097)
426protected BoundExpression(BoundKind kind, SyntaxNode syntax, TypeSymbol? type, bool hasErrors) 432protected BoundExpression(BoundKind kind, SyntaxNode syntax, TypeSymbol? type) 438public TypeSymbol? Type { get; } 443protected BoundValuePlaceholderBase(BoundKind kind, SyntaxNode syntax, TypeSymbol? type, bool hasErrors) 448protected BoundValuePlaceholderBase(BoundKind kind, SyntaxNode syntax, TypeSymbol? type) 457protected BoundEarlyValuePlaceholderBase(BoundKind kind, SyntaxNode syntax, TypeSymbol? type, bool hasErrors) 462protected BoundEarlyValuePlaceholderBase(BoundKind kind, SyntaxNode syntax, TypeSymbol? type) 471public BoundValuePlaceholder(SyntaxNode syntax, TypeSymbol? type, bool hasErrors) 476public BoundValuePlaceholder(SyntaxNode syntax, TypeSymbol? type) 485public BoundValuePlaceholder Update(TypeSymbol? type) 487if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 499public BoundCapturedReceiverPlaceholder(SyntaxNode syntax, BoundExpression receiver, uint localScopeDepth, TypeSymbol? type, bool hasErrors = false) 515public BoundCapturedReceiverPlaceholder Update(BoundExpression receiver, uint localScopeDepth, TypeSymbol? type) 517if (receiver != this.Receiver || localScopeDepth != this.LocalScopeDepth || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 529public BoundDeconstructValuePlaceholder(SyntaxNode syntax, Symbol? variableSymbol, bool isDiscardExpression, TypeSymbol type, bool hasErrors) 539public BoundDeconstructValuePlaceholder(SyntaxNode syntax, Symbol? variableSymbol, bool isDiscardExpression, TypeSymbol type) 549public new TypeSymbol Type => base.Type!; 556public BoundDeconstructValuePlaceholder Update(Symbol? variableSymbol, bool isDiscardExpression, TypeSymbol type) 558if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(variableSymbol, this.VariableSymbol) || isDiscardExpression != this.IsDiscardExpression || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 570public BoundTupleOperandPlaceholder(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 578public BoundTupleOperandPlaceholder(SyntaxNode syntax, TypeSymbol type) 586public new TypeSymbol Type => base.Type!; 591public BoundTupleOperandPlaceholder Update(TypeSymbol type) 593if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 605public BoundAwaitableValuePlaceholder(SyntaxNode syntax, TypeSymbol? type, bool hasErrors) 610public BoundAwaitableValuePlaceholder(SyntaxNode syntax, TypeSymbol? type) 615public new TypeSymbol? Type => base.Type; 620public BoundAwaitableValuePlaceholder Update(TypeSymbol? type) 622if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 634public BoundDisposableValuePlaceholder(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 642public BoundDisposableValuePlaceholder(SyntaxNode syntax, TypeSymbol type) 650public new TypeSymbol Type => base.Type!; 655public BoundDisposableValuePlaceholder Update(TypeSymbol type) 657if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 669public BoundObjectOrCollectionValuePlaceholder(SyntaxNode syntax, bool isNewInstance, TypeSymbol type, bool hasErrors) 678public BoundObjectOrCollectionValuePlaceholder(SyntaxNode syntax, bool isNewInstance, TypeSymbol type) 687public new TypeSymbol Type => base.Type!; 693public BoundObjectOrCollectionValuePlaceholder Update(bool isNewInstance, TypeSymbol type) 695if (isNewInstance != this.IsNewInstance || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 707public BoundImplicitIndexerValuePlaceholder(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 715public BoundImplicitIndexerValuePlaceholder(SyntaxNode syntax, TypeSymbol type) 723public new TypeSymbol Type => base.Type!; 728public BoundImplicitIndexerValuePlaceholder Update(TypeSymbol type) 730if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 742public BoundImplicitIndexerReceiverPlaceholder(SyntaxNode syntax, bool isEquivalentToThisReference, TypeSymbol type, bool hasErrors) 751public BoundImplicitIndexerReceiverPlaceholder(SyntaxNode syntax, bool isEquivalentToThisReference, TypeSymbol type) 760public new TypeSymbol Type => base.Type!; 766public BoundImplicitIndexerReceiverPlaceholder Update(bool isEquivalentToThisReference, TypeSymbol type) 768if (isEquivalentToThisReference != this.IsEquivalentToThisReference || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 780public BoundListPatternReceiverPlaceholder(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 788public BoundListPatternReceiverPlaceholder(SyntaxNode syntax, TypeSymbol type) 796public new TypeSymbol Type => base.Type!; 801public BoundListPatternReceiverPlaceholder Update(TypeSymbol type) 803if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 815public BoundListPatternIndexPlaceholder(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 823public BoundListPatternIndexPlaceholder(SyntaxNode syntax, TypeSymbol type) 831public new TypeSymbol Type => base.Type!; 836public BoundListPatternIndexPlaceholder Update(TypeSymbol type) 838if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 850public BoundSlicePatternReceiverPlaceholder(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 858public BoundSlicePatternReceiverPlaceholder(SyntaxNode syntax, TypeSymbol type) 866public new TypeSymbol Type => base.Type!; 871public BoundSlicePatternReceiverPlaceholder Update(TypeSymbol type) 873if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 885public BoundSlicePatternRangePlaceholder(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 893public BoundSlicePatternRangePlaceholder(SyntaxNode syntax, TypeSymbol type) 901public new TypeSymbol Type => base.Type!; 906public BoundSlicePatternRangePlaceholder Update(TypeSymbol type) 908if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 920public BoundDup(SyntaxNode syntax, RefKind refKind, TypeSymbol? type, bool hasErrors) 926public BoundDup(SyntaxNode syntax, RefKind refKind, TypeSymbol? type) 937public BoundDup Update(RefKind refKind, TypeSymbol? type) 939if (refKind != this.RefKind || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 951public BoundPassByCopy(SyntaxNode syntax, BoundExpression expression, TypeSymbol? type, bool hasErrors = false) 965public BoundPassByCopy Update(BoundExpression expression, TypeSymbol? type) 967if (expression != this.Expression || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 979public BoundBadExpression(SyntaxNode syntax, LookupResultKind resultKind, ImmutableArray<Symbol?> symbols, ImmutableArray<BoundExpression> childBoundNodes, TypeSymbol? type, bool hasErrors = false) 998public BoundBadExpression Update(LookupResultKind resultKind, ImmutableArray<Symbol?> symbols, ImmutableArray<BoundExpression> childBoundNodes, TypeSymbol? type) 1000if (resultKind != this.ResultKind || symbols != this.Symbols || childBoundNodes != this.ChildBoundNodes || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1068public BoundTypeExpression(SyntaxNode syntax, AliasSymbol? aliasOpt, BoundTypeExpression? boundContainingTypeOpt, ImmutableArray<BoundExpression> boundDimensionsOpt, TypeWithAnnotations typeWithAnnotations, TypeSymbol type, bool hasErrors = false) 1083public new TypeSymbol Type => base.Type!; 1089public BoundTypeExpression Update(AliasSymbol? aliasOpt, BoundTypeExpression? boundContainingTypeOpt, ImmutableArray<BoundExpression> boundDimensionsOpt, TypeWithAnnotations typeWithAnnotations, TypeSymbol type) 1091if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(aliasOpt, this.AliasOpt) || boundContainingTypeOpt != this.BoundContainingTypeOpt || boundDimensionsOpt != this.BoundDimensionsOpt || typeWithAnnotations != this.TypeWithAnnotations || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1103public BoundTypeOrValueExpression(SyntaxNode syntax, BoundTypeOrValueData data, TypeSymbol type, bool hasErrors) 1112public BoundTypeOrValueExpression(SyntaxNode syntax, BoundTypeOrValueData data, TypeSymbol type) 1121public new TypeSymbol Type => base.Type!; 1127public BoundTypeOrValueExpression Update(BoundTypeOrValueData data, TypeSymbol type) 1129if (data != this.Data || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1161public new TypeSymbol? Type => base.Type; 1182public BoundUnaryOperator(SyntaxNode syntax, UnaryOperatorKind operatorKind, BoundExpression operand, ConstantValue? constantValueOpt, MethodSymbol? methodOpt, TypeSymbol? constrainedToTypeOpt, LookupResultKind resultKind, ImmutableArray<MethodSymbol> originalUserDefinedOperatorsOpt, TypeSymbol type, bool hasErrors = false) 1198public new TypeSymbol Type => base.Type!; 1203public TypeSymbol? ConstrainedToTypeOpt { get; } 1210public BoundUnaryOperator Update(UnaryOperatorKind operatorKind, BoundExpression operand, ConstantValue? constantValueOpt, MethodSymbol? methodOpt, TypeSymbol? constrainedToTypeOpt, LookupResultKind resultKind, ImmutableArray<MethodSymbol> originalUserDefinedOperatorsOpt, TypeSymbol type) 1212if (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)) 1224public 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) 1243public new TypeSymbol Type => base.Type!; 1247public TypeSymbol? ConstrainedToTypeOpt { get; } 1258public 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) 1260if (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)) 1272public BoundAddressOfOperator(SyntaxNode syntax, BoundExpression operand, bool isManaged, TypeSymbol type, bool hasErrors = false) 1283public new TypeSymbol Type => base.Type!; 1290public BoundAddressOfOperator Update(BoundExpression operand, bool isManaged, TypeSymbol type) 1292if (operand != this.Operand || isManaged != this.IsManaged || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1314public new TypeSymbol? Type => base.Type; 1333public BoundFunctionPointerLoad(SyntaxNode syntax, MethodSymbol targetMethod, TypeSymbol? constrainedToTypeOpt, TypeSymbol type, bool hasErrors) 1344public BoundFunctionPointerLoad(SyntaxNode syntax, MethodSymbol targetMethod, TypeSymbol? constrainedToTypeOpt, TypeSymbol type) 1356public TypeSymbol? ConstrainedToTypeOpt { get; } 1357public new TypeSymbol Type => base.Type!; 1362public BoundFunctionPointerLoad Update(MethodSymbol targetMethod, TypeSymbol? constrainedToTypeOpt, TypeSymbol type) 1364if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(targetMethod, this.TargetMethod) || !TypeSymbol.Equals(constrainedToTypeOpt, this.ConstrainedToTypeOpt, TypeCompareKind.ConsiderEverything) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1376public BoundPointerIndirectionOperator(SyntaxNode syntax, BoundExpression operand, bool refersToLocation, TypeSymbol type, bool hasErrors = false) 1387public new TypeSymbol Type => base.Type!; 1394public BoundPointerIndirectionOperator Update(BoundExpression operand, bool refersToLocation, TypeSymbol type) 1396if (operand != this.Operand || refersToLocation != this.RefersToLocation || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1408public BoundPointerElementAccess(SyntaxNode syntax, BoundExpression expression, BoundExpression index, bool @checked, bool refersToLocation, TypeSymbol type, bool hasErrors = false) 1422public new TypeSymbol Type => base.Type!; 1431public BoundPointerElementAccess Update(BoundExpression expression, BoundExpression index, bool @checked, bool refersToLocation, TypeSymbol type) 1433if (expression != this.Expression || index != this.Index || @checked != this.Checked || refersToLocation != this.RefersToLocation || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1445public BoundFunctionPointerInvocation(SyntaxNode syntax, BoundExpression invokedExpression, ImmutableArray<BoundExpression> arguments, ImmutableArray<RefKind> argumentRefKindsOpt, LookupResultKind resultKind, TypeSymbol type, bool hasErrors = false) 1459public new TypeSymbol Type => base.Type!; 1468public BoundFunctionPointerInvocation Update(BoundExpression invokedExpression, ImmutableArray<BoundExpression> arguments, ImmutableArray<RefKind> argumentRefKindsOpt, LookupResultKind resultKind, TypeSymbol type) 1470if (invokedExpression != this.InvokedExpression || arguments != this.Arguments || argumentRefKindsOpt != this.ArgumentRefKindsOpt || resultKind != this.ResultKind || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1482public BoundRefTypeOperator(SyntaxNode syntax, BoundExpression operand, MethodSymbol? getTypeFromHandle, TypeSymbol type, bool hasErrors = false) 1493public new TypeSymbol Type => base.Type!; 1500public BoundRefTypeOperator Update(BoundExpression operand, MethodSymbol? getTypeFromHandle, TypeSymbol type) 1502if (operand != this.Operand || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(getTypeFromHandle, this.GetTypeFromHandle) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1514public BoundMakeRefOperator(SyntaxNode syntax, BoundExpression operand, TypeSymbol type, bool hasErrors = false) 1524public new TypeSymbol Type => base.Type!; 1530public BoundMakeRefOperator Update(BoundExpression operand, TypeSymbol type) 1532if (operand != this.Operand || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1544public BoundRefValueOperator(SyntaxNode syntax, NullableAnnotation nullableAnnotation, BoundExpression operand, TypeSymbol type, bool hasErrors = false) 1555public new TypeSymbol Type => base.Type!; 1562public BoundRefValueOperator Update(NullableAnnotation nullableAnnotation, BoundExpression operand, TypeSymbol type) 1564if (nullableAnnotation != this.NullableAnnotation || operand != this.Operand || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1576public BoundFromEndIndexExpression(SyntaxNode syntax, BoundExpression operand, MethodSymbol? methodOpt, TypeSymbol type, bool hasErrors = false) 1587public new TypeSymbol Type => base.Type!; 1594public BoundFromEndIndexExpression Update(BoundExpression operand, MethodSymbol? methodOpt, TypeSymbol type) 1596if (operand != this.Operand || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(methodOpt, this.MethodOpt) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1608public BoundRangeExpression(SyntaxNode syntax, BoundExpression? leftOperandOpt, BoundExpression? rightOperandOpt, MethodSymbol? methodOpt, TypeSymbol type, bool hasErrors = false) 1619public new TypeSymbol Type => base.Type!; 1627public BoundRangeExpression Update(BoundExpression? leftOperandOpt, BoundExpression? rightOperandOpt, MethodSymbol? methodOpt, TypeSymbol type) 1629if (leftOperandOpt != this.LeftOperandOpt || rightOperandOpt != this.RightOperandOpt || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(methodOpt, this.MethodOpt) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1641protected BoundBinaryOperatorBase(BoundKind kind, SyntaxNode syntax, BoundExpression left, BoundExpression right, TypeSymbol type, bool hasErrors = false) 1653public new TypeSymbol Type => base.Type!; 1660public BoundBinaryOperator(SyntaxNode syntax, BinaryOperatorKind operatorKind, BoundBinaryOperator.UncommonData? data, LookupResultKind resultKind, BoundExpression left, BoundExpression right, TypeSymbol type, bool hasErrors = false) 1680public BoundBinaryOperator Update(BinaryOperatorKind operatorKind, BoundBinaryOperator.UncommonData? data, LookupResultKind resultKind, BoundExpression left, BoundExpression right, TypeSymbol type) 1682if (operatorKind != this.OperatorKind || data != this.Data || resultKind != this.ResultKind || left != this.Left || right != this.Right || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1694public BoundTupleBinaryOperator(SyntaxNode syntax, BoundExpression left, BoundExpression right, BinaryOperatorKind operatorKind, TupleBinaryOperatorInfo.Multiple operators, TypeSymbol type, bool hasErrors = false) 1709public new TypeSymbol Type => base.Type!; 1718public BoundTupleBinaryOperator Update(BoundExpression left, BoundExpression right, BinaryOperatorKind operatorKind, TupleBinaryOperatorInfo.Multiple operators, TypeSymbol type) 1720if (left != this.Left || right != this.Right || operatorKind != this.OperatorKind || operators != this.Operators || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1732public 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) 1756public TypeSymbol? ConstrainedToTypeOpt { get; } 1763public BoundUserDefinedConditionalLogicalOperator Update(BinaryOperatorKind operatorKind, MethodSymbol logicalOperator, MethodSymbol trueOperator, MethodSymbol falseOperator, TypeSymbol? constrainedToTypeOpt, LookupResultKind resultKind, ImmutableArray<MethodSymbol> originalUserDefinedOperatorsOpt, BoundExpression left, BoundExpression right, TypeSymbol type) 1765if (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)) 1777public 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) 1796public new TypeSymbol Type => base.Type!; 1810public BoundCompoundAssignmentOperator Update(BinaryOperatorSignature @operator, BoundExpression left, BoundExpression right, BoundValuePlaceholder? leftPlaceholder, BoundExpression? leftConversion, BoundValuePlaceholder? finalPlaceholder, BoundExpression? finalConversion, LookupResultKind resultKind, ImmutableArray<MethodSymbol> originalUserDefinedOperatorsOpt, TypeSymbol type) 1812if (@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)) 1824public BoundAssignmentOperator(SyntaxNode syntax, BoundExpression left, BoundExpression right, bool isRef, TypeSymbol type, bool hasErrors = false) 1836public new TypeSymbol Type => base.Type!; 1844public BoundAssignmentOperator Update(BoundExpression left, BoundExpression right, bool isRef, TypeSymbol type) 1846if (left != this.Left || right != this.Right || isRef != this.IsRef || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1858public BoundDeconstructionAssignmentOperator(SyntaxNode syntax, BoundTupleExpression left, BoundConversion right, bool isUsed, TypeSymbol type, bool hasErrors = false) 1871public new TypeSymbol Type => base.Type!; 1879public BoundDeconstructionAssignmentOperator Update(BoundTupleExpression left, BoundConversion right, bool isUsed, TypeSymbol type) 1881if (left != this.Left || right != this.Right || isUsed != this.IsUsed || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1893public BoundNullCoalescingOperator(SyntaxNode syntax, BoundExpression leftOperand, BoundExpression rightOperand, BoundValuePlaceholder? leftPlaceholder, BoundExpression? leftConversion, BoundNullCoalescingOperatorResultKind operatorResultKind, bool @checked, TypeSymbol type, bool hasErrors = false) 1909public new TypeSymbol Type => base.Type!; 1920public BoundNullCoalescingOperator Update(BoundExpression leftOperand, BoundExpression rightOperand, BoundValuePlaceholder? leftPlaceholder, BoundExpression? leftConversion, BoundNullCoalescingOperatorResultKind operatorResultKind, bool @checked, TypeSymbol type) 1922if (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)) 1934public BoundNullCoalescingAssignmentOperator(SyntaxNode syntax, BoundExpression leftOperand, BoundExpression rightOperand, TypeSymbol? type, bool hasErrors = false) 1951public BoundNullCoalescingAssignmentOperator Update(BoundExpression leftOperand, BoundExpression rightOperand, TypeSymbol? type) 1953if (leftOperand != this.LeftOperand || rightOperand != this.RightOperand || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1980public new TypeSymbol? Type => base.Type; 2004public BoundConditionalOperator(SyntaxNode syntax, bool isRef, BoundExpression condition, BoundExpression consequence, BoundExpression alternative, ConstantValue? constantValueOpt, TypeSymbol? naturalTypeOpt, bool wasTargetTyped, TypeSymbol type, bool hasErrors = false) 2022public new TypeSymbol Type => base.Type!; 2028public TypeSymbol? NaturalTypeOpt { get; } 2034public BoundConditionalOperator Update(bool isRef, BoundExpression condition, BoundExpression consequence, BoundExpression alternative, ConstantValue? constantValueOpt, TypeSymbol? naturalTypeOpt, bool wasTargetTyped, TypeSymbol type) 2036if (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)) 2048public BoundArrayAccess(SyntaxNode syntax, BoundExpression expression, ImmutableArray<BoundExpression> indices, TypeSymbol type, bool hasErrors = false) 2060public new TypeSymbol Type => base.Type!; 2067public BoundArrayAccess Update(BoundExpression expression, ImmutableArray<BoundExpression> indices, TypeSymbol type) 2069if (expression != this.Expression || indices != this.Indices || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2090public new TypeSymbol? Type => base.Type; 2110public BoundArrayLength(SyntaxNode syntax, BoundExpression expression, TypeSymbol type, bool hasErrors = false) 2120public new TypeSymbol Type => base.Type!; 2126public BoundArrayLength Update(BoundExpression expression, TypeSymbol type) 2128if (expression != this.Expression || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2173public BoundAwaitExpression(SyntaxNode syntax, BoundExpression expression, BoundAwaitableInfo awaitableInfo, BoundAwaitExpressionDebugInfo debugInfo, TypeSymbol type, bool hasErrors = false) 2186public new TypeSymbol Type => base.Type!; 2194public BoundAwaitExpression Update(BoundExpression expression, BoundAwaitableInfo awaitableInfo, BoundAwaitExpressionDebugInfo debugInfo, TypeSymbol type) 2196if (expression != this.Expression || awaitableInfo != this.AwaitableInfo || debugInfo != this.DebugInfo || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2208protected BoundTypeOf(BoundKind kind, SyntaxNode syntax, MethodSymbol? getTypeFromHandle, TypeSymbol type, bool hasErrors) 2217protected BoundTypeOf(BoundKind kind, SyntaxNode syntax, MethodSymbol? getTypeFromHandle, TypeSymbol type) 2226public new TypeSymbol Type => base.Type!; 2232public BoundTypeOfOperator(SyntaxNode syntax, BoundTypeExpression sourceType, MethodSymbol? getTypeFromHandle, TypeSymbol type, bool hasErrors = false) 2247public BoundTypeOfOperator Update(BoundTypeExpression sourceType, MethodSymbol? getTypeFromHandle, TypeSymbol type) 2249if (sourceType != this.SourceType || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(getTypeFromHandle, this.GetTypeFromHandle) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2293public BoundMethodDefIndex(SyntaxNode syntax, MethodSymbol method, TypeSymbol type, bool hasErrors) 2303public BoundMethodDefIndex(SyntaxNode syntax, MethodSymbol method, TypeSymbol type) 2313public new TypeSymbol Type => base.Type!; 2319public BoundMethodDefIndex Update(MethodSymbol method, TypeSymbol type) 2321if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(method, this.Method) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2333public BoundLocalId(SyntaxNode syntax, LocalSymbol local, FieldSymbol? hoistedField, TypeSymbol type, bool hasErrors) 2344public BoundLocalId(SyntaxNode syntax, LocalSymbol local, FieldSymbol? hoistedField, TypeSymbol type) 2355public new TypeSymbol Type => base.Type!; 2362public BoundLocalId Update(LocalSymbol local, FieldSymbol? hoistedField, TypeSymbol type) 2364if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(local, this.Local) || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(hoistedField, this.HoistedField) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2376public BoundParameterId(SyntaxNode syntax, ParameterSymbol parameter, FieldSymbol? hoistedField, TypeSymbol type, bool hasErrors) 2387public BoundParameterId(SyntaxNode syntax, ParameterSymbol parameter, FieldSymbol? hoistedField, TypeSymbol type) 2398public new TypeSymbol Type => base.Type!; 2405public BoundParameterId Update(ParameterSymbol parameter, FieldSymbol? hoistedField, TypeSymbol type) 2407if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(parameter, this.Parameter) || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(hoistedField, this.HoistedField) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2419public BoundStateMachineInstanceId(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 2427public BoundStateMachineInstanceId(SyntaxNode syntax, TypeSymbol type) 2435public new TypeSymbol Type => base.Type!; 2440public BoundStateMachineInstanceId Update(TypeSymbol type) 2442if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2454public BoundMaximumMethodDefIndex(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 2462public BoundMaximumMethodDefIndex(SyntaxNode syntax, TypeSymbol type) 2470public new TypeSymbol Type => base.Type!; 2475public BoundMaximumMethodDefIndex Update(TypeSymbol type) 2477if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2489public BoundInstrumentationPayloadRoot(SyntaxNode syntax, int analysisKind, TypeSymbol type, bool hasErrors) 2498public BoundInstrumentationPayloadRoot(SyntaxNode syntax, int analysisKind, TypeSymbol type) 2508public new TypeSymbol Type => base.Type!; 2513public BoundInstrumentationPayloadRoot Update(int analysisKind, TypeSymbol type) 2515if (analysisKind != this.AnalysisKind || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2527public BoundThrowIfModuleCancellationRequested(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 2535public BoundThrowIfModuleCancellationRequested(SyntaxNode syntax, TypeSymbol type) 2543public new TypeSymbol Type => base.Type!; 2548public BoundThrowIfModuleCancellationRequested Update(TypeSymbol type) 2550if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2562public ModuleCancellationTokenExpression(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 2570public ModuleCancellationTokenExpression(SyntaxNode syntax, TypeSymbol type) 2578public new TypeSymbol Type => base.Type!; 2583public ModuleCancellationTokenExpression Update(TypeSymbol type) 2585if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2597public BoundModuleVersionId(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 2605public BoundModuleVersionId(SyntaxNode syntax, TypeSymbol type) 2613public new TypeSymbol Type => base.Type!; 2618public BoundModuleVersionId Update(TypeSymbol type) 2620if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2632public BoundModuleVersionIdString(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 2640public BoundModuleVersionIdString(SyntaxNode syntax, TypeSymbol type) 2648public new TypeSymbol Type => base.Type!; 2653public BoundModuleVersionIdString Update(TypeSymbol type) 2655if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2667public BoundSourceDocumentIndex(SyntaxNode syntax, Cci.DebugSourceDocument document, TypeSymbol type, bool hasErrors) 2677public BoundSourceDocumentIndex(SyntaxNode syntax, Cci.DebugSourceDocument document, TypeSymbol type) 2687public new TypeSymbol Type => base.Type!; 2693public BoundSourceDocumentIndex Update(Cci.DebugSourceDocument document, TypeSymbol type) 2695if (document != this.Document || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2707public BoundMethodInfo(SyntaxNode syntax, MethodSymbol method, MethodSymbol? getMethodFromHandle, TypeSymbol type, bool hasErrors) 2718public BoundMethodInfo(SyntaxNode syntax, MethodSymbol method, MethodSymbol? getMethodFromHandle, TypeSymbol type) 2729public new TypeSymbol Type => base.Type!; 2736public BoundMethodInfo Update(MethodSymbol method, MethodSymbol? getMethodFromHandle, TypeSymbol type) 2738if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(method, this.Method) || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(getMethodFromHandle, this.GetMethodFromHandle) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2750public BoundFieldInfo(SyntaxNode syntax, FieldSymbol field, MethodSymbol? getFieldFromHandle, TypeSymbol type, bool hasErrors) 2761public BoundFieldInfo(SyntaxNode syntax, FieldSymbol field, MethodSymbol? getFieldFromHandle, TypeSymbol type) 2772public new TypeSymbol Type => base.Type!; 2779public BoundFieldInfo Update(FieldSymbol field, MethodSymbol? getFieldFromHandle, TypeSymbol type) 2781if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(field, this.Field) || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(getFieldFromHandle, this.GetFieldFromHandle) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2803public new TypeSymbol? Type => base.Type; 2816public BoundDefaultExpression(SyntaxNode syntax, BoundTypeExpression? targetType, ConstantValue? constantValueOpt, TypeSymbol type, bool hasErrors = false) 2826public new TypeSymbol Type => base.Type!; 2833public BoundDefaultExpression Update(BoundTypeExpression? targetType, ConstantValue? constantValueOpt, TypeSymbol type) 2835if (targetType != this.TargetType || constantValueOpt != this.ConstantValueOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2847public BoundIsOperator(SyntaxNode syntax, BoundExpression operand, BoundTypeExpression targetType, ConversionKind conversionKind, TypeSymbol type, bool hasErrors = false) 2860public new TypeSymbol Type => base.Type!; 2868public BoundIsOperator Update(BoundExpression operand, BoundTypeExpression targetType, ConversionKind conversionKind, TypeSymbol type) 2870if (operand != this.Operand || targetType != this.TargetType || conversionKind != this.ConversionKind || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2882public BoundAsOperator(SyntaxNode syntax, BoundExpression operand, BoundTypeExpression targetType, BoundValuePlaceholder? operandPlaceholder, BoundExpression? operandConversion, TypeSymbol type, bool hasErrors = false) 2896public new TypeSymbol Type => base.Type!; 2905public BoundAsOperator Update(BoundExpression operand, BoundTypeExpression targetType, BoundValuePlaceholder? operandPlaceholder, BoundExpression? operandConversion, TypeSymbol type) 2907if (operand != this.Operand || targetType != this.TargetType || operandPlaceholder != this.OperandPlaceholder || operandConversion != this.OperandConversion || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2919public BoundSizeOfOperator(SyntaxNode syntax, BoundTypeExpression sourceType, ConstantValue? constantValueOpt, TypeSymbol type, bool hasErrors = false) 2930public new TypeSymbol Type => base.Type!; 2937public BoundSizeOfOperator Update(BoundTypeExpression sourceType, ConstantValue? constantValueOpt, TypeSymbol type) 2939if (sourceType != this.SourceType || constantValueOpt != this.ConstantValueOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2951public 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) 2968public new TypeSymbol Type => base.Type!; 2981public BoundConversion Update(BoundExpression operand, Conversion conversion, bool isBaseConversion, bool @checked, bool explicitCastInCode, ConstantValue? constantValueOpt, ConversionGroup? conversionGroupOpt, ImmutableArray<MethodSymbol> originalUserDefinedConversionsOpt, TypeSymbol type) 2983if (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)) 2995public BoundReadOnlySpanFromArray(SyntaxNode syntax, BoundExpression operand, MethodSymbol conversionMethod, TypeSymbol type, bool hasErrors = false) 3007public new TypeSymbol Type => base.Type!; 3014public BoundReadOnlySpanFromArray Update(BoundExpression operand, MethodSymbol conversionMethod, TypeSymbol type) 3016if (operand != this.Operand || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(conversionMethod, this.ConversionMethod) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 3028public BoundArgList(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 3036public BoundArgList(SyntaxNode syntax, TypeSymbol type) 3044public new TypeSymbol Type => base.Type!; 3049public BoundArgList Update(TypeSymbol type) 3051if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 3063public BoundArgListOperator(SyntaxNode syntax, ImmutableArray<BoundExpression> arguments, ImmutableArray<RefKind> argumentRefKindsOpt, TypeSymbol? type, bool hasErrors = false) 3073public new TypeSymbol? Type => base.Type; 3080public BoundArgListOperator Update(ImmutableArray<BoundExpression> arguments, ImmutableArray<RefKind> argumentRefKindsOpt, TypeSymbol? type) 3082if (arguments != this.Arguments || argumentRefKindsOpt != this.ArgumentRefKindsOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 3094public BoundFixedLocalCollectionInitializer(SyntaxNode syntax, TypeSymbol elementPointerType, BoundValuePlaceholder? elementPointerPlaceholder, BoundExpression? elementPointerConversion, BoundExpression expression, MethodSymbol? getPinnableOpt, TypeSymbol type, bool hasErrors = false) 3109public new TypeSymbol Type => base.Type!; 3110public TypeSymbol ElementPointerType { get; } 3119public BoundFixedLocalCollectionInitializer Update(TypeSymbol elementPointerType, BoundValuePlaceholder? elementPointerPlaceholder, BoundExpression? elementPointerConversion, BoundExpression expression, MethodSymbol? getPinnableOpt, TypeSymbol type) 3121if (!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)) 4259public BoundCatchBlock(SyntaxNode syntax, ImmutableArray<LocalSymbol> locals, BoundExpression? exceptionSourceOpt, TypeSymbol? exceptionTypeOpt, BoundStatementList? exceptionFilterPrologueOpt, BoundExpression? exceptionFilterOpt, BoundBlock body, bool isSynthesizedAsyncCatchAll, bool hasErrors = false) 4277public TypeSymbol? ExceptionTypeOpt { get; } 4286public BoundCatchBlock Update(ImmutableArray<LocalSymbol> locals, BoundExpression? exceptionSourceOpt, TypeSymbol? exceptionTypeOpt, BoundStatementList? exceptionFilterPrologueOpt, BoundExpression? exceptionFilterOpt, BoundBlock body, bool isSynthesizedAsyncCatchAll) 4288if (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) 4300public BoundLiteral(SyntaxNode syntax, ConstantValue? constantValueOpt, TypeSymbol? type, bool hasErrors) 4306public BoundLiteral(SyntaxNode syntax, ConstantValue? constantValueOpt, TypeSymbol? type) 4317public BoundLiteral Update(ConstantValue? constantValueOpt, TypeSymbol? type) 4319if (constantValueOpt != this.ConstantValueOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 4331public BoundUtf8String(SyntaxNode syntax, string value, TypeSymbol type, bool hasErrors) 4341public BoundUtf8String(SyntaxNode syntax, string value, TypeSymbol type) 4351public new TypeSymbol Type => base.Type!; 4357public BoundUtf8String Update(string value, TypeSymbol type) 4359if (value != this.Value || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 4371public BoundThisReference(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 4379public BoundThisReference(SyntaxNode syntax, TypeSymbol type) 4387public new TypeSymbol Type => base.Type!; 4392public BoundThisReference Update(TypeSymbol type) 4394if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 4406public BoundPreviousSubmissionReference(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 4414public BoundPreviousSubmissionReference(SyntaxNode syntax, TypeSymbol type) 4422public new TypeSymbol Type => base.Type!; 4427public BoundPreviousSubmissionReference Update(TypeSymbol type) 4429if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 4441public BoundHostObjectMemberReference(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 4449public BoundHostObjectMemberReference(SyntaxNode syntax, TypeSymbol type) 4457public new TypeSymbol Type => base.Type!; 4462public BoundHostObjectMemberReference Update(TypeSymbol type) 4464if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 4476public BoundBaseReference(SyntaxNode syntax, TypeSymbol? type, bool hasErrors) 4481public BoundBaseReference(SyntaxNode syntax, TypeSymbol? type) 4486public new TypeSymbol? Type => base.Type; 4491public BoundBaseReference Update(TypeSymbol? type) 4493if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 4505public BoundLocal(SyntaxNode syntax, LocalSymbol localSymbol, BoundLocalDeclarationKind declarationKind, ConstantValue? constantValueOpt, bool isNullableUnknown, TypeSymbol type, bool hasErrors) 4518public BoundLocal(SyntaxNode syntax, LocalSymbol localSymbol, BoundLocalDeclarationKind declarationKind, ConstantValue? constantValueOpt, bool isNullableUnknown, TypeSymbol type) 4531public new TypeSymbol Type => base.Type!; 4540public BoundLocal Update(LocalSymbol localSymbol, BoundLocalDeclarationKind declarationKind, ConstantValue? constantValueOpt, bool isNullableUnknown, TypeSymbol type) 4542if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(localSymbol, this.LocalSymbol) || declarationKind != this.DeclarationKind || constantValueOpt != this.ConstantValueOpt || isNullableUnknown != this.IsNullableUnknown || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 4554public BoundPseudoVariable(SyntaxNode syntax, LocalSymbol localSymbol, PseudoVariableExpressions emitExpressions, TypeSymbol type, bool hasErrors) 4566public BoundPseudoVariable(SyntaxNode syntax, LocalSymbol localSymbol, PseudoVariableExpressions emitExpressions, TypeSymbol type) 4578public new TypeSymbol Type => base.Type!; 4585public BoundPseudoVariable Update(LocalSymbol localSymbol, PseudoVariableExpressions emitExpressions, TypeSymbol type) 4587if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(localSymbol, this.LocalSymbol) || emitExpressions != this.EmitExpressions || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 4599public BoundRangeVariable(SyntaxNode syntax, RangeVariableSymbol rangeVariableSymbol, BoundExpression value, TypeSymbol type, bool hasErrors = false) 4611public new TypeSymbol Type => base.Type!; 4618public BoundRangeVariable Update(RangeVariableSymbol rangeVariableSymbol, BoundExpression value, TypeSymbol type) 4620if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(rangeVariableSymbol, this.RangeVariableSymbol) || value != this.Value || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 4632public BoundParameter(SyntaxNode syntax, ParameterSymbol parameterSymbol, TypeSymbol type, bool hasErrors) 4642public BoundParameter(SyntaxNode syntax, ParameterSymbol parameterSymbol, TypeSymbol type) 4652public new TypeSymbol Type => base.Type!; 4658public BoundParameter Update(ParameterSymbol parameterSymbol, TypeSymbol type) 4660if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(parameterSymbol, this.ParameterSymbol) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 4772public BoundLabel(SyntaxNode syntax, LabelSymbol label, TypeSymbol? type, bool hasErrors) 4781public BoundLabel(SyntaxNode syntax, LabelSymbol label, TypeSymbol? type) 4795public BoundLabel Update(LabelSymbol label, TypeSymbol? type) 4797if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(label, this.Label) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 4879protected BoundSwitchExpression(BoundKind kind, SyntaxNode syntax, BoundExpression expression, ImmutableArray<BoundSwitchExpressionArm> switchArms, BoundDecisionDag reachabilityDecisionDag, LabelSymbol? defaultLabel, bool reportedNotExhaustive, TypeSymbol? type, bool hasErrors = false) 4942public BoundUnconvertedSwitchExpression(SyntaxNode syntax, BoundExpression expression, ImmutableArray<BoundSwitchExpressionArm> switchArms, BoundDecisionDag reachabilityDecisionDag, LabelSymbol? defaultLabel, bool reportedNotExhaustive, TypeSymbol? type, bool hasErrors = false) 4956public BoundUnconvertedSwitchExpression Update(BoundExpression expression, ImmutableArray<BoundSwitchExpressionArm> switchArms, BoundDecisionDag reachabilityDecisionDag, LabelSymbol? defaultLabel, bool reportedNotExhaustive, TypeSymbol? type) 4958if (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)) 4970public BoundConvertedSwitchExpression(SyntaxNode syntax, TypeSymbol? naturalTypeOpt, bool wasTargetTyped, BoundExpression expression, ImmutableArray<BoundSwitchExpressionArm> switchArms, BoundDecisionDag reachabilityDecisionDag, LabelSymbol? defaultLabel, bool reportedNotExhaustive, TypeSymbol type, bool hasErrors = false) 4983public new TypeSymbol Type => base.Type!; 4984public TypeSymbol? NaturalTypeOpt { get; } 4990public BoundConvertedSwitchExpression Update(TypeSymbol? naturalTypeOpt, bool wasTargetTyped, BoundExpression expression, ImmutableArray<BoundSwitchExpressionArm> switchArms, BoundDecisionDag reachabilityDecisionDag, LabelSymbol? defaultLabel, bool reportedNotExhaustive, TypeSymbol type) 4992if (!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)) 5197public BoundDagTemp(SyntaxNode syntax, TypeSymbol type, BoundDagEvaluation? source, int index, bool hasErrors = false) 5208public TypeSymbol Type { get; } 5215public BoundDagTemp Update(TypeSymbol type, BoundDagEvaluation? source, int index) 5217if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything) || source != this.Source || index != this.Index) 5229public BoundDagTypeTest(SyntaxNode syntax, TypeSymbol type, BoundDagTemp input, bool hasErrors = false) 5239public TypeSymbol Type { get; } 5244public BoundDagTypeTest Update(TypeSymbol type, BoundDagTemp input) 5246if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything) || input != this.Input) 5413public BoundDagTypeEvaluation(SyntaxNode syntax, TypeSymbol type, BoundDagTemp input, bool hasErrors = false) 5423public TypeSymbol Type { get; } 5428public BoundDagTypeEvaluation Update(TypeSymbol type, BoundDagTemp input) 5430if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything) || input != this.Input) 5533public BoundDagIndexerEvaluation(SyntaxNode syntax, TypeSymbol indexerType, BoundDagTemp lengthTemp, int index, BoundExpression indexerAccess, BoundListPatternReceiverPlaceholder receiverPlaceholder, BoundListPatternIndexPlaceholder argumentPlaceholder, BoundDagTemp input, bool hasErrors = false) 5556public TypeSymbol IndexerType { get; } 5566public BoundDagIndexerEvaluation Update(TypeSymbol indexerType, BoundDagTemp lengthTemp, int index, BoundExpression indexerAccess, BoundListPatternReceiverPlaceholder receiverPlaceholder, BoundListPatternIndexPlaceholder argumentPlaceholder, BoundDagTemp input) 5568if (!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) 5580public BoundDagSliceEvaluation(SyntaxNode syntax, TypeSymbol sliceType, BoundDagTemp lengthTemp, int startIndex, int endIndex, BoundExpression indexerAccess, BoundSlicePatternReceiverPlaceholder receiverPlaceholder, BoundSlicePatternRangePlaceholder argumentPlaceholder, BoundDagTemp input, bool hasErrors = false) 5604public TypeSymbol SliceType { get; } 5615public BoundDagSliceEvaluation Update(TypeSymbol sliceType, BoundDagTemp lengthTemp, int startIndex, int endIndex, BoundExpression indexerAccess, BoundSlicePatternReceiverPlaceholder receiverPlaceholder, BoundSlicePatternRangePlaceholder argumentPlaceholder, BoundDagTemp input) 5617if (!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) 5730public new TypeSymbol? Type => base.Type; 5737public BoundSequencePointExpression(SyntaxNode syntax, BoundExpression expression, TypeSymbol? type, bool hasErrors = false) 5751public BoundSequencePointExpression Update(BoundExpression expression, TypeSymbol? type) 5753if (expression != this.Expression || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 5765public BoundSequence(SyntaxNode syntax, ImmutableArray<LocalSymbol> locals, ImmutableArray<BoundExpression> sideEffects, BoundExpression value, TypeSymbol type, bool hasErrors = false) 5779public new TypeSymbol Type => base.Type!; 5787public BoundSequence Update(ImmutableArray<LocalSymbol> locals, ImmutableArray<BoundExpression> sideEffects, BoundExpression value, TypeSymbol type) 5789if (locals != this.Locals || sideEffects != this.SideEffects || value != this.Value || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 5801public BoundSpillSequence(SyntaxNode syntax, ImmutableArray<LocalSymbol> locals, ImmutableArray<BoundStatement> sideEffects, BoundExpression value, TypeSymbol type, bool hasErrors = false) 5815public new TypeSymbol Type => base.Type!; 5823public BoundSpillSequence Update(ImmutableArray<LocalSymbol> locals, ImmutableArray<BoundStatement> sideEffects, BoundExpression value, TypeSymbol type) 5825if (locals != this.Locals || sideEffects != this.SideEffects || value != this.Value || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 5837public BoundDynamicMemberAccess(SyntaxNode syntax, BoundExpression receiver, ImmutableArray<TypeWithAnnotations> typeArgumentsOpt, string name, bool invoked, bool indexed, TypeSymbol type, bool hasErrors = false) 5852public new TypeSymbol Type => base.Type!; 5862public BoundDynamicMemberAccess Update(BoundExpression receiver, ImmutableArray<TypeWithAnnotations> typeArgumentsOpt, string name, bool invoked, bool indexed, TypeSymbol type) 5864if (receiver != this.Receiver || typeArgumentsOpt != this.TypeArgumentsOpt || name != this.Name || invoked != this.Invoked || indexed != this.Indexed || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 5876protected BoundDynamicInvocableBase(BoundKind kind, SyntaxNode syntax, BoundExpression expression, ImmutableArray<BoundExpression> arguments, TypeSymbol? type, bool hasErrors = false) 5893public BoundDynamicInvocation(SyntaxNode syntax, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, ImmutableArray<MethodSymbol> applicableMethods, BoundExpression expression, ImmutableArray<BoundExpression> arguments, TypeSymbol type, bool hasErrors = false) 5907public new TypeSymbol Type => base.Type!; 5915public BoundDynamicInvocation Update(ImmutableArray<string?> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, ImmutableArray<MethodSymbol> applicableMethods, BoundExpression expression, ImmutableArray<BoundExpression> arguments, TypeSymbol type) 5917if (argumentNamesOpt != this.ArgumentNamesOpt || argumentRefKindsOpt != this.ArgumentRefKindsOpt || applicableMethods != this.ApplicableMethods || expression != this.Expression || arguments != this.Arguments || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 5929public BoundConditionalAccess(SyntaxNode syntax, BoundExpression receiver, BoundExpression accessExpression, TypeSymbol type, bool hasErrors = false) 5941public new TypeSymbol Type => base.Type!; 5948public BoundConditionalAccess Update(BoundExpression receiver, BoundExpression accessExpression, TypeSymbol type) 5950if (receiver != this.Receiver || accessExpression != this.AccessExpression || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 5962public BoundLoweredConditionalAccess(SyntaxNode syntax, BoundExpression receiver, MethodSymbol? hasValueMethodOpt, BoundExpression whenNotNull, BoundExpression? whenNullOpt, int id, bool forceCopyOfNullableValueType, TypeSymbol type, bool hasErrors = false) 5978public new TypeSymbol Type => base.Type!; 5989public BoundLoweredConditionalAccess Update(BoundExpression receiver, MethodSymbol? hasValueMethodOpt, BoundExpression whenNotNull, BoundExpression? whenNullOpt, int id, bool forceCopyOfNullableValueType, TypeSymbol type) 5991if (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)) 6003public BoundConditionalReceiver(SyntaxNode syntax, int id, TypeSymbol type, bool hasErrors) 6012public BoundConditionalReceiver(SyntaxNode syntax, int id, TypeSymbol type) 6021public new TypeSymbol Type => base.Type!; 6027public BoundConditionalReceiver Update(int id, TypeSymbol type) 6029if (id != this.Id || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 6041public BoundComplexConditionalReceiver(SyntaxNode syntax, BoundExpression valueTypeReceiver, BoundExpression referenceTypeReceiver, TypeSymbol type, bool hasErrors = false) 6053public new TypeSymbol Type => base.Type!; 6060public BoundComplexConditionalReceiver Update(BoundExpression valueTypeReceiver, BoundExpression referenceTypeReceiver, TypeSymbol type) 6062if (valueTypeReceiver != this.ValueTypeReceiver || referenceTypeReceiver != this.ReferenceTypeReceiver || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 6143public 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) 6166public new TypeSymbol Type => base.Type!; 6184public 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) 6186if (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)) 6198public BoundEventAssignmentOperator(SyntaxNode syntax, EventSymbol @event, bool isAddition, bool isDynamic, BoundExpression? receiverOpt, BoundExpression argument, TypeSymbol type, bool hasErrors = false) 6213public new TypeSymbol Type => base.Type!; 6223public BoundEventAssignmentOperator Update(EventSymbol @event, bool isAddition, bool isDynamic, BoundExpression? receiverOpt, BoundExpression argument, TypeSymbol type) 6225if (!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)) 6237public 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) 6255public new TypeSymbol Type => base.Type!; 6268public BoundAttribute Update(MethodSymbol? constructor, ImmutableArray<BoundExpression> constructorArguments, ImmutableArray<string?> constructorArgumentNamesOpt, ImmutableArray<int> constructorArgumentsToParamsOpt, bool constructorExpanded, BitVector constructorDefaultArguments, ImmutableArray<BoundAssignmentOperator> namedArguments, LookupResultKind resultKind, TypeSymbol type) 6270if (!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)) 6296public new TypeSymbol? Type => base.Type; 6320protected BoundObjectCreationExpressionBase(BoundKind kind, SyntaxNode syntax, TypeSymbol type, bool hasErrors) 6328protected BoundObjectCreationExpressionBase(BoundKind kind, SyntaxNode syntax, TypeSymbol type) 6336public new TypeSymbol Type => base.Type!; 6341public 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) 6378public 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) 6380if (!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)) 6392protected BoundCollectionExpressionBase(BoundKind kind, SyntaxNode syntax, ImmutableArray<BoundNode> elements, TypeSymbol? type, bool hasErrors = false) 6414public new TypeSymbol? Type => base.Type; 6433public 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) 6451public new TypeSymbol Type => base.Type!; 6464public BoundCollectionExpression Update(CollectionExpressionTypeKind collectionTypeKind, BoundObjectOrCollectionValuePlaceholder? placeholder, BoundExpression? collectionCreation, MethodSymbol? collectionBuilderMethod, BoundValuePlaceholder? collectionBuilderInvocationPlaceholder, BoundExpression? collectionBuilderInvocationConversion, bool wasTargetTyped, BoundUnconvertedCollectionExpression unconvertedCollectionExpression, ImmutableArray<BoundNode> elements, TypeSymbol type) 6466if (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)) 6478public BoundCollectionExpressionSpreadExpressionPlaceholder(SyntaxNode syntax, TypeSymbol? type, bool hasErrors) 6483public BoundCollectionExpressionSpreadExpressionPlaceholder(SyntaxNode syntax, TypeSymbol? type) 6492public BoundCollectionExpressionSpreadExpressionPlaceholder Update(TypeSymbol? type) 6494if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 6546protected BoundTupleExpression(BoundKind kind, SyntaxNode syntax, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<bool> inferredNamesOpt, TypeSymbol? type, bool hasErrors = false) 6564public BoundTupleLiteral(SyntaxNode syntax, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<bool> inferredNamesOpt, TypeSymbol? type, bool hasErrors = false) 6572public new TypeSymbol? Type => base.Type; 6577public BoundTupleLiteral Update(ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<bool> inferredNamesOpt, TypeSymbol? type) 6579if (arguments != this.Arguments || argumentNamesOpt != this.ArgumentNamesOpt || inferredNamesOpt != this.InferredNamesOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 6591public BoundConvertedTupleLiteral(SyntaxNode syntax, BoundTupleLiteral? sourceTuple, bool wasTargetTyped, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<bool> inferredNamesOpt, TypeSymbol? type, bool hasErrors = false) 6607public BoundConvertedTupleLiteral Update(BoundTupleLiteral? sourceTuple, bool wasTargetTyped, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<bool> inferredNamesOpt, TypeSymbol? type) 6609if (sourceTuple != this.SourceTuple || wasTargetTyped != this.WasTargetTyped || arguments != this.Arguments || argumentNamesOpt != this.ArgumentNamesOpt || inferredNamesOpt != this.InferredNamesOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 6621public 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) 6650public BoundDynamicObjectCreationExpression Update(string name, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, BoundObjectInitializerExpressionBase? initializerExpressionOpt, ImmutableArray<MethodSymbol> applicableMethods, bool wasTargetTyped, TypeSymbol type) 6652if (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)) 6664public BoundNoPiaObjectCreationExpression(SyntaxNode syntax, string? guidString, BoundObjectInitializerExpressionBase? initializerExpressionOpt, bool wasTargetTyped, TypeSymbol type, bool hasErrors = false) 6682public BoundNoPiaObjectCreationExpression Update(string? guidString, BoundObjectInitializerExpressionBase? initializerExpressionOpt, bool wasTargetTyped, TypeSymbol type) 6684if (guidString != this.GuidString || initializerExpressionOpt != this.InitializerExpressionOpt || wasTargetTyped != this.WasTargetTyped || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 6696protected BoundObjectInitializerExpressionBase(BoundKind kind, SyntaxNode syntax, BoundObjectOrCollectionValuePlaceholder placeholder, ImmutableArray<BoundExpression> initializers, TypeSymbol type, bool hasErrors = false) 6708public new TypeSymbol Type => base.Type!; 6715public BoundObjectInitializerExpression(SyntaxNode syntax, BoundObjectOrCollectionValuePlaceholder placeholder, ImmutableArray<BoundExpression> initializers, TypeSymbol type, bool hasErrors = false) 6729public BoundObjectInitializerExpression Update(BoundObjectOrCollectionValuePlaceholder placeholder, ImmutableArray<BoundExpression> initializers, TypeSymbol type) 6731if (placeholder != this.Placeholder || initializers != this.Initializers || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 6743public 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) 6763public new TypeSymbol Type => base.Type!; 6773public TypeSymbol ReceiverType { get; } 6778public 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) 6780if (!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)) 6792public BoundDynamicObjectInitializerMember(SyntaxNode syntax, string memberName, TypeSymbol receiverType, TypeSymbol type, bool hasErrors) 6804public BoundDynamicObjectInitializerMember(SyntaxNode syntax, string memberName, TypeSymbol receiverType, TypeSymbol type) 6816public new TypeSymbol Type => base.Type!; 6818public TypeSymbol ReceiverType { get; } 6823public BoundDynamicObjectInitializerMember Update(string memberName, TypeSymbol receiverType, TypeSymbol type) 6825if (memberName != this.MemberName || !TypeSymbol.Equals(receiverType, this.ReceiverType, TypeCompareKind.ConsiderEverything) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 6837public BoundCollectionInitializerExpression(SyntaxNode syntax, BoundObjectOrCollectionValuePlaceholder placeholder, ImmutableArray<BoundExpression> initializers, TypeSymbol type, bool hasErrors = false) 6851public BoundCollectionInitializerExpression Update(BoundObjectOrCollectionValuePlaceholder placeholder, ImmutableArray<BoundExpression> initializers, TypeSymbol type) 6853if (placeholder != this.Placeholder || initializers != this.Initializers || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 6865public 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) 6883public new TypeSymbol Type => base.Type!; 6896public BoundCollectionElementInitializer Update(MethodSymbol addMethod, ImmutableArray<BoundExpression> arguments, BoundExpression? implicitReceiverOpt, bool expanded, ImmutableArray<int> argsToParamsOpt, BitVector defaultArguments, bool invokedAsExtensionMethod, LookupResultKind resultKind, TypeSymbol type) 6898if (!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)) 6910public BoundDynamicCollectionElementInitializer(SyntaxNode syntax, ImmutableArray<MethodSymbol> applicableMethods, BoundExpression expression, ImmutableArray<BoundExpression> arguments, TypeSymbol type, bool hasErrors = false) 6922public new TypeSymbol Type => base.Type!; 6928public BoundDynamicCollectionElementInitializer Update(ImmutableArray<MethodSymbol> applicableMethods, BoundExpression expression, ImmutableArray<BoundExpression> arguments, TypeSymbol type) 6930if (applicableMethods != this.ApplicableMethods || expression != this.Expression || arguments != this.Arguments || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 6942public BoundImplicitReceiver(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 6950public BoundImplicitReceiver(SyntaxNode syntax, TypeSymbol type) 6958public new TypeSymbol Type => base.Type!; 6963public BoundImplicitReceiver Update(TypeSymbol type) 6965if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 6977public BoundAnonymousObjectCreationExpression(SyntaxNode syntax, MethodSymbol constructor, ImmutableArray<BoundExpression> arguments, ImmutableArray<BoundAnonymousPropertyDeclaration> declarations, TypeSymbol type, bool hasErrors = false) 6991public new TypeSymbol Type => base.Type!; 6999public BoundAnonymousObjectCreationExpression Update(MethodSymbol constructor, ImmutableArray<BoundExpression> arguments, ImmutableArray<BoundAnonymousPropertyDeclaration> declarations, TypeSymbol type) 7001if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(constructor, this.Constructor) || arguments != this.Arguments || declarations != this.Declarations || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7013public BoundAnonymousPropertyDeclaration(SyntaxNode syntax, PropertySymbol property, TypeSymbol type, bool hasErrors) 7023public BoundAnonymousPropertyDeclaration(SyntaxNode syntax, PropertySymbol property, TypeSymbol type) 7033public new TypeSymbol Type => base.Type!; 7039public BoundAnonymousPropertyDeclaration Update(PropertySymbol property, TypeSymbol type) 7041if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(property, this.Property) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7053public BoundNewT(SyntaxNode syntax, BoundObjectInitializerExpressionBase? initializerExpressionOpt, bool wasTargetTyped, TypeSymbol type, bool hasErrors = false) 7069public BoundNewT Update(BoundObjectInitializerExpressionBase? initializerExpressionOpt, bool wasTargetTyped, TypeSymbol type) 7071if (initializerExpressionOpt != this.InitializerExpressionOpt || wasTargetTyped != this.WasTargetTyped || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7083public BoundDelegateCreationExpression(SyntaxNode syntax, BoundExpression argument, MethodSymbol? methodOpt, bool isExtensionMethod, bool wasTargetTyped, TypeSymbol type, bool hasErrors = false) 7096public new TypeSymbol Type => base.Type!; 7105public BoundDelegateCreationExpression Update(BoundExpression argument, MethodSymbol? methodOpt, bool isExtensionMethod, bool wasTargetTyped, TypeSymbol type) 7107if (argument != this.Argument || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(methodOpt, this.MethodOpt) || isExtensionMethod != this.IsExtensionMethod || wasTargetTyped != this.WasTargetTyped || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7119public BoundArrayCreation(SyntaxNode syntax, ImmutableArray<BoundExpression> bounds, BoundArrayInitialization? initializerOpt, TypeSymbol type, bool hasErrors = false) 7130public new TypeSymbol Type => base.Type!; 7137public BoundArrayCreation Update(ImmutableArray<BoundExpression> bounds, BoundArrayInitialization? initializerOpt, TypeSymbol type) 7139if (bounds != this.Bounds || initializerOpt != this.InitializerOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7161public new TypeSymbol? Type => base.Type; 7182protected BoundStackAllocArrayCreationBase(BoundKind kind, SyntaxNode syntax, TypeSymbol elementType, BoundExpression count, BoundArrayInitialization? initializerOpt, TypeSymbol? type, bool hasErrors = false) 7194public TypeSymbol ElementType { get; } 7201public BoundStackAllocArrayCreation(SyntaxNode syntax, TypeSymbol elementType, BoundExpression count, BoundArrayInitialization? initializerOpt, TypeSymbol? type, bool hasErrors = false) 7214public BoundStackAllocArrayCreation Update(TypeSymbol elementType, BoundExpression count, BoundArrayInitialization? initializerOpt, TypeSymbol? type) 7216if (!TypeSymbol.Equals(elementType, this.ElementType, TypeCompareKind.ConsiderEverything) || count != this.Count || initializerOpt != this.InitializerOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7228public BoundConvertedStackAllocExpression(SyntaxNode syntax, TypeSymbol elementType, BoundExpression count, BoundArrayInitialization? initializerOpt, TypeSymbol type, bool hasErrors = false) 7238public new TypeSymbol Type => base.Type!; 7243public BoundConvertedStackAllocExpression Update(TypeSymbol elementType, BoundExpression count, BoundArrayInitialization? initializerOpt, TypeSymbol type) 7245if (!TypeSymbol.Equals(elementType, this.ElementType, TypeCompareKind.ConsiderEverything) || count != this.Count || initializerOpt != this.InitializerOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7257public BoundFieldAccess(SyntaxNode syntax, BoundExpression? receiverOpt, FieldSymbol fieldSymbol, ConstantValue? constantValueOpt, LookupResultKind resultKind, bool isByValue, bool isDeclaration, TypeSymbol type, bool hasErrors = false) 7272public new TypeSymbol Type => base.Type!; 7283public BoundFieldAccess Update(BoundExpression? receiverOpt, FieldSymbol fieldSymbol, ConstantValue? constantValueOpt, LookupResultKind resultKind, bool isByValue, bool isDeclaration, TypeSymbol type) 7285if (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)) 7297public BoundHoistedFieldAccess(SyntaxNode syntax, FieldSymbol fieldSymbol, TypeSymbol type, bool hasErrors) 7307public BoundHoistedFieldAccess(SyntaxNode syntax, FieldSymbol fieldSymbol, TypeSymbol type) 7317public new TypeSymbol Type => base.Type!; 7323public BoundHoistedFieldAccess Update(FieldSymbol fieldSymbol, TypeSymbol type) 7325if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(fieldSymbol, this.FieldSymbol) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7337public BoundPropertyAccess(SyntaxNode syntax, BoundExpression? receiverOpt, ThreeState initialBindingReceiverIsSubjectToCloning, PropertySymbol propertySymbol, LookupResultKind resultKind, TypeSymbol type, bool hasErrors = false) 7350public new TypeSymbol Type => base.Type!; 7359public BoundPropertyAccess Update(BoundExpression? receiverOpt, ThreeState initialBindingReceiverIsSubjectToCloning, PropertySymbol propertySymbol, LookupResultKind resultKind, TypeSymbol type) 7361if (receiverOpt != this.ReceiverOpt || initialBindingReceiverIsSubjectToCloning != this.InitialBindingReceiverIsSubjectToCloning || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(propertySymbol, this.PropertySymbol) || resultKind != this.ResultKind || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7373public BoundEventAccess(SyntaxNode syntax, BoundExpression? receiverOpt, EventSymbol eventSymbol, bool isUsableAsField, LookupResultKind resultKind, TypeSymbol type, bool hasErrors = false) 7386public new TypeSymbol Type => base.Type!; 7395public BoundEventAccess Update(BoundExpression? receiverOpt, EventSymbol eventSymbol, bool isUsableAsField, LookupResultKind resultKind, TypeSymbol type) 7397if (receiverOpt != this.ReceiverOpt || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(eventSymbol, this.EventSymbol) || isUsableAsField != this.IsUsableAsField || resultKind != this.ResultKind || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7409public 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) 7430public new TypeSymbol Type => base.Type!; 7446public 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) 7448if (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)) 7460public BoundImplicitIndexerAccess(SyntaxNode syntax, BoundExpression receiver, BoundExpression argument, BoundExpression lengthOrCountAccess, BoundImplicitIndexerReceiverPlaceholder receiverPlaceholder, BoundExpression indexerOrSliceAccess, ImmutableArray<BoundImplicitIndexerValuePlaceholder> argumentPlaceholders, TypeSymbol type, bool hasErrors = false) 7484public new TypeSymbol Type => base.Type!; 7495public BoundImplicitIndexerAccess Update(BoundExpression receiver, BoundExpression argument, BoundExpression lengthOrCountAccess, BoundImplicitIndexerReceiverPlaceholder receiverPlaceholder, BoundExpression indexerOrSliceAccess, ImmutableArray<BoundImplicitIndexerValuePlaceholder> argumentPlaceholders, TypeSymbol type) 7497if (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)) 7509public BoundInlineArrayAccess(SyntaxNode syntax, BoundExpression expression, BoundExpression argument, bool isValue, WellKnownMember getItemOrSliceHelper, TypeSymbol type, bool hasErrors = false) 7527public new TypeSymbol Type => base.Type!; 7536public BoundInlineArrayAccess Update(BoundExpression expression, BoundExpression argument, bool isValue, WellKnownMember getItemOrSliceHelper, TypeSymbol type) 7538if (expression != this.Expression || argument != this.Argument || isValue != this.IsValue || getItemOrSliceHelper != this.GetItemOrSliceHelper || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7550public BoundDynamicIndexerAccess(SyntaxNode syntax, BoundExpression receiver, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, ImmutableArray<PropertySymbol> applicableIndexers, TypeSymbol type, bool hasErrors = false) 7566public new TypeSymbol Type => base.Type!; 7576public BoundDynamicIndexerAccess Update(BoundExpression receiver, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, ImmutableArray<PropertySymbol> applicableIndexers, TypeSymbol type) 7578if (receiver != this.Receiver || arguments != this.Arguments || argumentNamesOpt != this.ArgumentNamesOpt || argumentRefKindsOpt != this.ArgumentRefKindsOpt || applicableIndexers != this.ApplicableIndexers || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7590public BoundLambda(SyntaxNode syntax, UnboundLambda unboundLambda, LambdaSymbol symbol, BoundBlock body, ReadOnlyBindingDiagnostic<AssemblySymbol> diagnostics, Binder binder, TypeSymbol? type, bool hasErrors = false) 7608public new TypeSymbol? Type => base.Type; 7616public BoundLambda Update(UnboundLambda unboundLambda, LambdaSymbol symbol, BoundBlock body, ReadOnlyBindingDiagnostic<AssemblySymbol> diagnostics, Binder binder, TypeSymbol? type) 7618if (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)) 7652public new TypeSymbol? Type => base.Type; 7674public BoundQueryClause(SyntaxNode syntax, BoundExpression value, RangeVariableSymbol? definedSymbol, BoundExpression? operation, BoundExpression? cast, Binder binder, BoundExpression? unoptimizedForm, TypeSymbol type, bool hasErrors = false) 7690public new TypeSymbol Type => base.Type!; 7701public BoundQueryClause Update(BoundExpression value, RangeVariableSymbol? definedSymbol, BoundExpression? operation, BoundExpression? cast, Binder binder, BoundExpression? unoptimizedForm, TypeSymbol type) 7703if (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)) 7741public BoundNameOfOperator(SyntaxNode syntax, BoundExpression argument, ConstantValue constantValueOpt, TypeSymbol type, bool hasErrors = false) 7753public new TypeSymbol Type => base.Type!; 7760public BoundNameOfOperator Update(BoundExpression argument, ConstantValue constantValueOpt, TypeSymbol type) 7762if (argument != this.Argument || constantValueOpt != this.ConstantValueOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7774protected BoundInterpolatedStringBase(BoundKind kind, SyntaxNode syntax, ImmutableArray<BoundExpression> parts, ConstantValue? constantValueOpt, TypeSymbol? type, bool hasErrors = false) 7790public BoundUnconvertedInterpolatedString(SyntaxNode syntax, ImmutableArray<BoundExpression> parts, ConstantValue? constantValueOpt, TypeSymbol? type, bool hasErrors = false) 7802public BoundUnconvertedInterpolatedString Update(ImmutableArray<BoundExpression> parts, ConstantValue? constantValueOpt, TypeSymbol? type) 7804if (parts != this.Parts || constantValueOpt != this.ConstantValueOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7816public BoundInterpolatedString(SyntaxNode syntax, InterpolatedStringHandlerData? interpolationData, ImmutableArray<BoundExpression> parts, ConstantValue? constantValueOpt, TypeSymbol? type, bool hasErrors = false) 7830public BoundInterpolatedString Update(InterpolatedStringHandlerData? interpolationData, ImmutableArray<BoundExpression> parts, ConstantValue? constantValueOpt, TypeSymbol? type) 7832if (!interpolationData.Equals(this.InterpolationData) || parts != this.Parts || constantValueOpt != this.ConstantValueOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7844public BoundInterpolatedStringHandlerPlaceholder(SyntaxNode syntax, TypeSymbol? type, bool hasErrors) 7849public BoundInterpolatedStringHandlerPlaceholder(SyntaxNode syntax, TypeSymbol? type) 7858public BoundInterpolatedStringHandlerPlaceholder Update(TypeSymbol? type) 7860if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7872public BoundInterpolatedStringArgumentPlaceholder(SyntaxNode syntax, int argumentIndex, TypeSymbol type, bool hasErrors) 7881public BoundInterpolatedStringArgumentPlaceholder(SyntaxNode syntax, int argumentIndex, TypeSymbol type) 7890public new TypeSymbol Type => base.Type!; 7896public BoundInterpolatedStringArgumentPlaceholder Update(int argumentIndex, TypeSymbol type) 7898if (argumentIndex != this.ArgumentIndex || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7922public new TypeSymbol? Type => base.Type; 7945public BoundIsPatternExpression(SyntaxNode syntax, BoundExpression expression, BoundPattern pattern, bool isNegated, BoundDecisionDag reachabilityDecisionDag, LabelSymbol whenTrueLabel, LabelSymbol whenFalseLabel, TypeSymbol? type, bool hasErrors = false) 7973public BoundIsPatternExpression Update(BoundExpression expression, BoundPattern pattern, bool isNegated, BoundDecisionDag reachabilityDecisionDag, LabelSymbol whenTrueLabel, LabelSymbol whenFalseLabel, TypeSymbol? type) 7975if (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)) 7987protected BoundPattern(BoundKind kind, SyntaxNode syntax, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors) 7998protected BoundPattern(BoundKind kind, SyntaxNode syntax, TypeSymbol inputType, TypeSymbol narrowedType) 8009public TypeSymbol InputType { get; } 8010public TypeSymbol NarrowedType { get; } 8015public BoundConstantPattern(SyntaxNode syntax, BoundExpression value, ConstantValue constantValue, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors = false) 8034public BoundConstantPattern Update(BoundExpression value, ConstantValue constantValue, TypeSymbol inputType, TypeSymbol narrowedType) 8036if (value != this.Value || constantValue != this.ConstantValue || !TypeSymbol.Equals(inputType, this.InputType, TypeCompareKind.ConsiderEverything) || !TypeSymbol.Equals(narrowedType, this.NarrowedType, TypeCompareKind.ConsiderEverything)) 8048public BoundDiscardPattern(SyntaxNode syntax, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors) 8057public BoundDiscardPattern(SyntaxNode syntax, TypeSymbol inputType, TypeSymbol narrowedType) 8070public BoundDiscardPattern Update(TypeSymbol inputType, TypeSymbol narrowedType) 8072if (!TypeSymbol.Equals(inputType, this.InputType, TypeCompareKind.ConsiderEverything) || !TypeSymbol.Equals(narrowedType, this.NarrowedType, TypeCompareKind.ConsiderEverything)) 8084protected BoundObjectPattern(BoundKind kind, SyntaxNode syntax, Symbol? variable, BoundExpression? variableAccess, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors = false) 8101public BoundDeclarationPattern(SyntaxNode syntax, BoundTypeExpression declaredType, bool isVar, Symbol? variable, BoundExpression? variableAccess, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors = false) 8119public BoundDeclarationPattern Update(BoundTypeExpression declaredType, bool isVar, Symbol? variable, BoundExpression? variableAccess, TypeSymbol inputType, TypeSymbol narrowedType) 8121if (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)) 8133public 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) 8156public BoundRecursivePattern Update(BoundTypeExpression? declaredType, MethodSymbol? deconstructMethod, ImmutableArray<BoundPositionalSubpattern> deconstruction, ImmutableArray<BoundPropertySubpattern> properties, bool isExplicitNotNullTest, Symbol? variable, BoundExpression? variableAccess, TypeSymbol inputType, TypeSymbol narrowedType) 8158if (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)) 8170public 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) 8200public BoundListPattern Update(ImmutableArray<BoundPattern> subpatterns, bool hasSlice, BoundExpression? lengthAccess, BoundExpression? indexerAccess, BoundListPatternReceiverPlaceholder? receiverPlaceholder, BoundListPatternIndexPlaceholder? argumentPlaceholder, Symbol? variable, BoundExpression? variableAccess, TypeSymbol inputType, TypeSymbol narrowedType) 8202if (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)) 8214public BoundSlicePattern(SyntaxNode syntax, BoundPattern? pattern, BoundExpression? indexerAccess, BoundSlicePatternReceiverPlaceholder? receiverPlaceholder, BoundSlicePatternRangePlaceholder? argumentPlaceholder, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors = false) 8239public BoundSlicePattern Update(BoundPattern? pattern, BoundExpression? indexerAccess, BoundSlicePatternReceiverPlaceholder? receiverPlaceholder, BoundSlicePatternRangePlaceholder? argumentPlaceholder, TypeSymbol inputType, TypeSymbol narrowedType) 8241if (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)) 8253public BoundITuplePattern(SyntaxNode syntax, MethodSymbol getLengthMethod, MethodSymbol getItemMethod, ImmutableArray<BoundPositionalSubpattern> subpatterns, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors = false) 8275public BoundITuplePattern Update(MethodSymbol getLengthMethod, MethodSymbol getItemMethod, ImmutableArray<BoundPositionalSubpattern> subpatterns, TypeSymbol inputType, TypeSymbol narrowedType) 8277if (!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)) 8361public BoundPropertySubpatternMember(SyntaxNode syntax, BoundPropertySubpatternMember? receiver, Symbol? symbol, TypeSymbol type, bool hasErrors = false) 8374public TypeSymbol Type { get; } 8379public BoundPropertySubpatternMember Update(BoundPropertySubpatternMember? receiver, Symbol? symbol, TypeSymbol type) 8381if (receiver != this.Receiver || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(symbol, this.Symbol) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 8393public BoundTypePattern(SyntaxNode syntax, BoundTypeExpression declaredType, bool isExplicitNotNullTest, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors = false) 8411public BoundTypePattern Update(BoundTypeExpression declaredType, bool isExplicitNotNullTest, TypeSymbol inputType, TypeSymbol narrowedType) 8413if (declaredType != this.DeclaredType || isExplicitNotNullTest != this.IsExplicitNotNullTest || !TypeSymbol.Equals(inputType, this.InputType, TypeCompareKind.ConsiderEverything) || !TypeSymbol.Equals(narrowedType, this.NarrowedType, TypeCompareKind.ConsiderEverything)) 8425public BoundBinaryPattern(SyntaxNode syntax, bool disjunction, BoundPattern left, BoundPattern right, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors = false) 8446public BoundBinaryPattern Update(bool disjunction, BoundPattern left, BoundPattern right, TypeSymbol inputType, TypeSymbol narrowedType) 8448if (disjunction != this.Disjunction || left != this.Left || right != this.Right || !TypeSymbol.Equals(inputType, this.InputType, TypeCompareKind.ConsiderEverything) || !TypeSymbol.Equals(narrowedType, this.NarrowedType, TypeCompareKind.ConsiderEverything)) 8460public BoundNegatedPattern(SyntaxNode syntax, BoundPattern negated, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors = false) 8476public BoundNegatedPattern Update(BoundPattern negated, TypeSymbol inputType, TypeSymbol narrowedType) 8478if (negated != this.Negated || !TypeSymbol.Equals(inputType, this.InputType, TypeCompareKind.ConsiderEverything) || !TypeSymbol.Equals(narrowedType, this.NarrowedType, TypeCompareKind.ConsiderEverything)) 8490public BoundRelationalPattern(SyntaxNode syntax, BinaryOperatorKind relation, BoundExpression value, ConstantValue constantValue, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors = false) 8511public BoundRelationalPattern Update(BinaryOperatorKind relation, BoundExpression value, ConstantValue constantValue, TypeSymbol inputType, TypeSymbol narrowedType) 8513if (relation != this.Relation || value != this.Value || constantValue != this.ConstantValue || !TypeSymbol.Equals(inputType, this.InputType, TypeCompareKind.ConsiderEverything) || !TypeSymbol.Equals(narrowedType, this.NarrowedType, TypeCompareKind.ConsiderEverything)) 8525public BoundDiscardExpression(SyntaxNode syntax, NullableAnnotation nullableAnnotation, bool isInferred, TypeSymbol? type, bool hasErrors) 8532public BoundDiscardExpression(SyntaxNode syntax, NullableAnnotation nullableAnnotation, bool isInferred, TypeSymbol? type) 8539public new TypeSymbol? Type => base.Type; 8546public BoundDiscardExpression Update(NullableAnnotation nullableAnnotation, bool isInferred, TypeSymbol? type) 8548if (nullableAnnotation != this.NullableAnnotation || isInferred != this.IsInferred || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 8560public BoundThrowExpression(SyntaxNode syntax, BoundExpression expression, TypeSymbol? type, bool hasErrors = false) 8574public BoundThrowExpression Update(BoundExpression expression, TypeSymbol? type) 8576if (expression != this.Expression || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 8598public new TypeSymbol? Type => base.Type; 8671public new TypeSymbol? Type => base.Type; 8758public BoundExpressionWithNullability(SyntaxNode syntax, BoundExpression expression, NullableAnnotation nullableAnnotation, TypeSymbol? type, bool hasErrors = false) 8769public new TypeSymbol? Type => base.Type; 8775public BoundExpressionWithNullability Update(BoundExpression expression, NullableAnnotation nullableAnnotation, TypeSymbol? type) 8777if (expression != this.Expression || nullableAnnotation != this.NullableAnnotation || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 8789public BoundWithExpression(SyntaxNode syntax, BoundExpression receiver, MethodSymbol? cloneMethod, BoundObjectInitializerExpressionBase initializerExpression, TypeSymbol type, bool hasErrors = false) 8802public new TypeSymbol Type => base.Type!; 8810public BoundWithExpression Update(BoundExpression receiver, MethodSymbol? cloneMethod, BoundObjectInitializerExpressionBase initializerExpression, TypeSymbol type) 8812if (receiver != this.Receiver || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(cloneMethod, this.CloneMethod) || initializerExpression != this.InitializerExpression || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 10819TypeSymbol? type = this.VisitType(node.Type); 10825TypeSymbol? type = this.VisitType(node.Type); 10830TypeSymbol? type = this.VisitType(node.Type); 10835TypeSymbol? type = this.VisitType(node.Type); 10840TypeSymbol? type = this.VisitType(node.Type); 10845TypeSymbol? type = this.VisitType(node.Type); 10850TypeSymbol? type = this.VisitType(node.Type); 10855TypeSymbol? type = this.VisitType(node.Type); 10860TypeSymbol? type = this.VisitType(node.Type); 10865TypeSymbol? type = this.VisitType(node.Type); 10870TypeSymbol? type = this.VisitType(node.Type); 10875TypeSymbol? type = this.VisitType(node.Type); 10880TypeSymbol? type = this.VisitType(node.Type); 10885TypeSymbol? type = this.VisitType(node.Type); 10891TypeSymbol? type = this.VisitType(node.Type); 10897TypeSymbol? type = this.VisitType(node.Type); 10914TypeSymbol? type = this.VisitType(node.Type); 10919TypeSymbol? type = this.VisitType(node.Type); 10924TypeSymbol? type = this.VisitType(node.Type); 10930TypeSymbol? constrainedToTypeOpt = this.VisitType(node.ConstrainedToTypeOpt); 10931TypeSymbol? type = this.VisitType(node.Type); 10941TypeSymbol? constrainedToTypeOpt = this.VisitType(node.ConstrainedToTypeOpt); 10942TypeSymbol? type = this.VisitType(node.Type); 10948TypeSymbol? type = this.VisitType(node.Type); 10954TypeSymbol? type = this.VisitType(node.Type); 10959TypeSymbol? constrainedToTypeOpt = this.VisitType(node.ConstrainedToTypeOpt); 10960TypeSymbol? type = this.VisitType(node.Type); 10966TypeSymbol? type = this.VisitType(node.Type); 10973TypeSymbol? type = this.VisitType(node.Type); 10980TypeSymbol? type = this.VisitType(node.Type); 10986TypeSymbol? type = this.VisitType(node.Type); 10992TypeSymbol? type = this.VisitType(node.Type); 10998TypeSymbol? type = this.VisitType(node.Type); 11004TypeSymbol? type = this.VisitType(node.Type); 11011TypeSymbol? type = this.VisitType(node.Type); 11018TypeSymbol? type = this.VisitType(node.Type); 11025TypeSymbol? type = this.VisitType(node.Type); 11032TypeSymbol? constrainedToTypeOpt = this.VisitType(node.ConstrainedToTypeOpt); 11033TypeSymbol? type = this.VisitType(node.Type); 11044TypeSymbol? type = this.VisitType(node.Type); 11051TypeSymbol? type = this.VisitType(node.Type); 11058TypeSymbol? type = this.VisitType(node.Type); 11067TypeSymbol? type = this.VisitType(node.Type); 11074TypeSymbol? type = this.VisitType(node.Type); 11082TypeSymbol? type = this.VisitType(node.Type); 11090TypeSymbol? naturalTypeOpt = this.VisitType(node.NaturalTypeOpt); 11091TypeSymbol? type = this.VisitType(node.Type); 11098TypeSymbol? type = this.VisitType(node.Type); 11104TypeSymbol? type = this.VisitType(node.Type); 11110TypeSymbol? type = this.VisitType(node.Type); 11123TypeSymbol? type = this.VisitType(node.Type); 11129TypeSymbol? type = this.VisitType(node.Type); 11140TypeSymbol? type = this.VisitType(node.Type); 11145TypeSymbol? type = this.VisitType(node.Type); 11150TypeSymbol? type = this.VisitType(node.Type); 11155TypeSymbol? type = this.VisitType(node.Type); 11160TypeSymbol? type = this.VisitType(node.Type); 11165TypeSymbol? type = this.VisitType(node.Type); 11170TypeSymbol? type = this.VisitType(node.Type); 11175TypeSymbol? type = this.VisitType(node.Type); 11180TypeSymbol? type = this.VisitType(node.Type); 11185TypeSymbol? type = this.VisitType(node.Type); 11190TypeSymbol? type = this.VisitType(node.Type); 11195TypeSymbol? type = this.VisitType(node.Type); 11200TypeSymbol? type = this.VisitType(node.Type); 11205TypeSymbol? type = this.VisitType(node.Type); 11211TypeSymbol? type = this.VisitType(node.Type); 11218TypeSymbol? type = this.VisitType(node.Type); 11227TypeSymbol? type = this.VisitType(node.Type); 11233TypeSymbol? type = this.VisitType(node.Type); 11239TypeSymbol? type = this.VisitType(node.Type); 11245TypeSymbol? type = this.VisitType(node.Type); 11250TypeSymbol? type = this.VisitType(node.Type); 11256TypeSymbol? type = this.VisitType(node.Type); 11264TypeSymbol? elementPointerType = this.VisitType(node.ElementPointerType); 11265TypeSymbol? type = this.VisitType(node.Type); 11436TypeSymbol? exceptionTypeOpt = this.VisitType(node.ExceptionTypeOpt); 11441TypeSymbol? type = this.VisitType(node.Type); 11446TypeSymbol? type = this.VisitType(node.Type); 11451TypeSymbol? type = this.VisitType(node.Type); 11456TypeSymbol? type = this.VisitType(node.Type); 11461TypeSymbol? type = this.VisitType(node.Type); 11466TypeSymbol? type = this.VisitType(node.Type); 11471TypeSymbol? type = this.VisitType(node.Type); 11476TypeSymbol? type = this.VisitType(node.Type); 11482TypeSymbol? type = this.VisitType(node.Type); 11487TypeSymbol? type = this.VisitType(node.Type); 11504TypeSymbol? type = this.VisitType(node.Type); 11529TypeSymbol? type = this.VisitType(node.Type); 11537TypeSymbol? naturalTypeOpt = this.VisitType(node.NaturalTypeOpt); 11538TypeSymbol? type = this.VisitType(node.Type); 11570TypeSymbol? type = this.VisitType(node.Type); 11576TypeSymbol? type = this.VisitType(node.Type); 11607TypeSymbol? type = this.VisitType(node.Type); 11632TypeSymbol? indexerType = this.VisitType(node.IndexerType); 11642TypeSymbol? sliceType = this.VisitType(node.SliceType); 11666TypeSymbol? type = this.VisitType(node.Type); 11673TypeSymbol? type = this.VisitType(node.Type); 11680TypeSymbol? type = this.VisitType(node.Type); 11686TypeSymbol? type = this.VisitType(node.Type); 11693TypeSymbol? type = this.VisitType(node.Type); 11700TypeSymbol? type = this.VisitType(node.Type); 11708TypeSymbol? type = this.VisitType(node.Type); 11713TypeSymbol? type = this.VisitType(node.Type); 11720TypeSymbol? type = this.VisitType(node.Type); 11726TypeSymbol? type = this.VisitType(node.Type); 11732TypeSymbol? type = this.VisitType(node.Type); 11739TypeSymbol? type = this.VisitType(node.Type); 11746TypeSymbol? type = this.VisitType(node.Type); 11753TypeSymbol? type = this.VisitType(node.Type); 11759TypeSymbol? type = this.VisitType(node.Type); 11766TypeSymbol? type = this.VisitType(node.Type); 11772TypeSymbol? type = this.VisitType(node.Type); 11783TypeSymbol? type = this.VisitType(node.Type); 11788TypeSymbol? type = this.VisitType(node.Type); 11804TypeSymbol? type = this.VisitType(node.Type); 11811TypeSymbol? type = this.VisitType(node.Type); 11818TypeSymbol? type = this.VisitType(node.Type); 11824TypeSymbol? type = this.VisitType(node.Type); 11831TypeSymbol? type = this.VisitType(node.Type); 11837TypeSymbol? receiverType = this.VisitType(node.ReceiverType); 11838TypeSymbol? type = this.VisitType(node.Type); 11843TypeSymbol? receiverType = this.VisitType(node.ReceiverType); 11844TypeSymbol? type = this.VisitType(node.Type); 11851TypeSymbol? type = this.VisitType(node.Type); 11858TypeSymbol? type = this.VisitType(node.Type); 11865TypeSymbol? type = this.VisitType(node.Type); 11870TypeSymbol? type = this.VisitType(node.Type); 11877TypeSymbol? type = this.VisitType(node.Type); 11882TypeSymbol? type = this.VisitType(node.Type); 11888TypeSymbol? type = this.VisitType(node.Type); 11894TypeSymbol? type = this.VisitType(node.Type); 11901TypeSymbol? type = this.VisitType(node.Type); 11907TypeSymbol? type = this.VisitType(node.Type); 11914TypeSymbol? elementType = this.VisitType(node.ElementType); 11915TypeSymbol? type = this.VisitType(node.Type); 11922TypeSymbol? elementType = this.VisitType(node.ElementType); 11923TypeSymbol? type = this.VisitType(node.Type); 11929TypeSymbol? type = this.VisitType(node.Type); 11934TypeSymbol? type = this.VisitType(node.Type); 11940TypeSymbol? type = this.VisitType(node.Type); 11946TypeSymbol? type = this.VisitType(node.Type); 11953TypeSymbol? type = this.VisitType(node.Type); 11964TypeSymbol? type = this.VisitType(node.Type); 11971TypeSymbol? type = this.VisitType(node.Type); 11978TypeSymbol? type = this.VisitType(node.Type); 11985TypeSymbol? type = this.VisitType(node.Type); 11990TypeSymbol? type = this.VisitType(node.Type); 11999TypeSymbol? type = this.VisitType(node.Type); 12010TypeSymbol? type = this.VisitType(node.Type); 12016TypeSymbol? type = this.VisitType(node.Type); 12022TypeSymbol? type = this.VisitType(node.Type); 12027TypeSymbol? type = this.VisitType(node.Type); 12032TypeSymbol? type = this.VisitType(node.Type); 12040TypeSymbol? type = this.VisitType(node.Type); 12048TypeSymbol? type = this.VisitType(node.Type); 12054TypeSymbol? inputType = this.VisitType(node.InputType); 12055TypeSymbol? narrowedType = this.VisitType(node.NarrowedType); 12060TypeSymbol? inputType = this.VisitType(node.InputType); 12061TypeSymbol? narrowedType = this.VisitType(node.NarrowedType); 12068TypeSymbol? inputType = this.VisitType(node.InputType); 12069TypeSymbol? narrowedType = this.VisitType(node.NarrowedType); 12078TypeSymbol? inputType = this.VisitType(node.InputType); 12079TypeSymbol? narrowedType = this.VisitType(node.NarrowedType); 12090TypeSymbol? inputType = this.VisitType(node.InputType); 12091TypeSymbol? narrowedType = this.VisitType(node.NarrowedType); 12100TypeSymbol? inputType = this.VisitType(node.InputType); 12101TypeSymbol? narrowedType = this.VisitType(node.NarrowedType); 12107TypeSymbol? inputType = this.VisitType(node.InputType); 12108TypeSymbol? narrowedType = this.VisitType(node.NarrowedType); 12125TypeSymbol? type = this.VisitType(node.Type); 12131TypeSymbol? inputType = this.VisitType(node.InputType); 12132TypeSymbol? narrowedType = this.VisitType(node.NarrowedType); 12139TypeSymbol? inputType = this.VisitType(node.InputType); 12140TypeSymbol? narrowedType = this.VisitType(node.NarrowedType); 12146TypeSymbol? inputType = this.VisitType(node.InputType); 12147TypeSymbol? narrowedType = this.VisitType(node.NarrowedType); 12153TypeSymbol? inputType = this.VisitType(node.InputType); 12154TypeSymbol? narrowedType = this.VisitType(node.NarrowedType); 12159TypeSymbol? type = this.VisitType(node.Type); 12165TypeSymbol? type = this.VisitType(node.Type); 12171TypeSymbol? type = this.VisitType(node.Type); 12177TypeSymbol? type = this.VisitType(node.Type); 12182TypeSymbol? type = this.VisitType(node.Type); 12201TypeSymbol? type = this.VisitType(node.Type); 12208TypeSymbol? type = this.VisitType(node.Type); 12215private readonly ImmutableDictionary<BoundExpression, (NullabilityInfo Info, TypeSymbol? Type)> _updatedNullabilities; 12219public NullabilityRewriter(ImmutableDictionary<BoundExpression, (NullabilityInfo Info, TypeSymbol? Type)> updatedNullabilities, NullableWalker.SnapshotManager? snapshotManager, ImmutableDictionary<Symbol, Symbol>.Builder remappedSymbols) 12252if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12267if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12284if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12298if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12310if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12322if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12334if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12346if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12358if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12370if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12382if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12394if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12406if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12418if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12433if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12451if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12469if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12483if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12495if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12508TypeSymbol? constrainedToTypeOpt = GetUpdatedSymbol(node, node.ConstrainedToTypeOpt); 12513if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12528TypeSymbol? constrainedToTypeOpt = GetUpdatedSymbol(node, node.ConstrainedToTypeOpt); 12537if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12554if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12571if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12586TypeSymbol? constrainedToTypeOpt = GetUpdatedSymbol(node, node.ConstrainedToTypeOpt); 12589if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12606if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12624if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12642if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12660if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12677if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12694if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12712if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12731if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12749if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12772if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12790if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12808if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12828if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12846if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12865if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12879TypeSymbol? naturalTypeOpt = GetUpdatedSymbol(node, node.NaturalTypeOpt); 12885if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12903if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12920if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12937if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12964if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12982if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12999if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13017if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13035if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13049if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13061if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13073if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13085if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13097if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13109if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13121if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13133if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13149if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13167if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13181if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13196if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13214if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13234if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13251if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13269if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13287if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13301if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13316if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13330TypeSymbol elementPointerType = GetUpdatedSymbol(node, node.ElementPointerType); 13337if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13462TypeSymbol? exceptionTypeOpt = GetUpdatedSymbol(node, node.ExceptionTypeOpt); 13472if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13484if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13496if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13508if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13520if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13532if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13547if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13564if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13582if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13599if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13613if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13639if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13653TypeSymbol? naturalTypeOpt = GetUpdatedSymbol(node, node.NaturalTypeOpt); 13659if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13701TypeSymbol indexerType = GetUpdatedSymbol(node, node.IndexerType); 13712TypeSymbol sliceType = GetUpdatedSymbol(node, node.SliceType); 13734if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13753if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13772if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13789if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13808if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13826if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13846if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13860if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13876if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13896if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13914if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13934if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13953if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13972if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13989if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14009if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14026if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14049if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14063if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14078if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14096if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14115if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14132if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14150if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14165TypeSymbol receiverType = GetUpdatedSymbol(node, node.ReceiverType); 14169if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14183TypeSymbol receiverType = GetUpdatedSymbol(node, node.ReceiverType); 14186if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14204if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14223if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14242if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14256if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14273if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14290if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14307if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14325if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14343if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14360if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14374TypeSymbol elementType = GetUpdatedSymbol(node, node.ElementType); 14379if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14393TypeSymbol elementType = GetUpdatedSymbol(node, node.ElementType); 14398if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14416if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14433if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14451if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14469if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14489if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14507if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14526if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14545if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14562if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14583if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14600if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14617if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14634if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14648if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14660if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14677if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14696if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14710TypeSymbol inputType = GetUpdatedSymbol(node, node.InputType); 14711TypeSymbol narrowedType = GetUpdatedSymbol(node, node.NarrowedType); 14718TypeSymbol inputType = GetUpdatedSymbol(node, node.InputType); 14719TypeSymbol narrowedType = GetUpdatedSymbol(node, node.NarrowedType); 14726TypeSymbol inputType = GetUpdatedSymbol(node, node.InputType); 14727TypeSymbol narrowedType = GetUpdatedSymbol(node, node.NarrowedType); 14737TypeSymbol inputType = GetUpdatedSymbol(node, node.InputType); 14738TypeSymbol narrowedType = GetUpdatedSymbol(node, node.NarrowedType); 14749TypeSymbol inputType = GetUpdatedSymbol(node, node.InputType); 14750TypeSymbol narrowedType = GetUpdatedSymbol(node, node.NarrowedType); 14762TypeSymbol inputType = GetUpdatedSymbol(node, node.InputType); 14763TypeSymbol narrowedType = GetUpdatedSymbol(node, node.NarrowedType); 14775TypeSymbol inputType = GetUpdatedSymbol(node, node.InputType); 14776TypeSymbol narrowedType = GetUpdatedSymbol(node, node.NarrowedType); 14797TypeSymbol inputType = GetUpdatedSymbol(node, node.InputType); 14798TypeSymbol narrowedType = GetUpdatedSymbol(node, node.NarrowedType); 14805TypeSymbol inputType = GetUpdatedSymbol(node, node.InputType); 14806TypeSymbol narrowedType = GetUpdatedSymbol(node, node.NarrowedType); 14814TypeSymbol inputType = GetUpdatedSymbol(node, node.InputType); 14815TypeSymbol narrowedType = GetUpdatedSymbol(node, node.NarrowedType); 14822TypeSymbol inputType = GetUpdatedSymbol(node, node.InputType); 14823TypeSymbol narrowedType = GetUpdatedSymbol(node, node.NarrowedType); 14830if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14845if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14863if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14881if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14898if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14924if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14943if (_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)
158TypeSymbol 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)
59private readonly Dictionary<TypeSymbol, FieldSymbol> _awaiterFields; 92_awaiterFields = new Dictionary<TypeSymbol, FieldSymbol>(Symbols.SymbolEqualityComparer.IgnoringDynamicTupleNamesAndNullability); 100private FieldSymbol GetAwaiterField(TypeSymbol awaiterType) 352TypeSymbol type = VisitType(node.Type); 451TypeSymbol awaiterFieldType = awaiterTemp.Type.IsVerifierReference() 471(TypeSymbol.Equals(awaiterField.Type, awaiterTemp.Type, TypeCompareKind.ConsiderEverything2)) 503TypeSymbol.Equals(awaiterTemp.Type, awaiterField.Type, TypeCompareKind.ConsiderEverything2) 597private 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 (33)
300if (!TypeSymbol.Equals(index.Type, _int32Type, TypeCompareKind.ConsiderEverything2)) 318if (!TypeSymbol.Equals(index.Type, _int32Type, TypeCompareKind.ConsiderEverything2)) 421private BoundExpression VisitBinaryOperator(BinaryOperatorKind opKind, MethodSymbol methodOpt, TypeSymbol type, BoundExpression left, BoundExpression right) 444var promotedType = PromotedType(enumOperand.Type.StrippedType().GetEnumUnderlyingType()); 482private BoundExpression VisitAndPromoteEnumOperand(BoundExpression operand, TypeSymbol promotedType, bool isChecked) 501private BoundExpression MakeBinary(MethodSymbol methodOpt, TypeSymbol type, bool isLifted, bool requiresLifted, string opName, BoundExpression loweredLeft, BoundExpression loweredRight) 506ExprFactory(opName, loweredLeft, loweredRight, _bound.Literal(isLifted && !TypeSymbol.Equals(methodOpt.ReturnType, type, TypeCompareKind.ConsiderEverything2)), 511private TypeSymbol PromotedType(TypeSymbol underlying) 530private BoundExpression Demote(BoundExpression node, TypeSymbol type, bool isChecked) 540var promotedType = e.IsNullableType() ? _nullableType.Construct(PromotedType(e.GetNullableUnderlyingType())) : PromotedType(e); 541if (!TypeSymbol.Equals(promotedType, type, TypeCompareKind.ConsiderEverything2)) 550private BoundExpression ConvertIndex(BoundExpression expr, TypeSymbol oldType, TypeSymbol newType) 632var operandType = node.Operand.Type; 633var strippedOperandType = operandType.StrippedType(); 634var conversionInputType = method.Parameters[0].Type; 635var isLifted = !TypeSymbol.Equals(operandType, conversionInputType, TypeCompareKind.ConsiderEverything2) && TypeSymbol.Equals(strippedOperandType, conversionInputType, TypeCompareKind.ConsiderEverything2); 637!TypeSymbol.Equals(strippedOperandType, ((node.ConversionKind == ConversionKind.ExplicitUserDefined) ? conversionInputType : conversionInputType.StrippedType()), TypeCompareKind.ConsiderEverything2); 638var resultType = (isLifted && method.ReturnType.IsNonNullableValueType() && node.Type.IsNullableType()) ? 664var intermediate = nullable.TypeArgumentsWithAnnotationsNoUseSiteDiagnostics[0].Type; 675private BoundExpression Convert(BoundExpression operand, TypeSymbol oldType, TypeSymbol newType, bool isChecked, bool isExplicit) 677return (TypeSymbol.Equals(oldType, newType, TypeCompareKind.ConsiderEverything2) && !isExplicit) ? operand : Convert(operand, newType, isChecked); 680private BoundExpression Convert(BoundExpression expr, TypeSymbol type, bool isChecked) 685private BoundExpression DelegateCreation(BoundExpression receiver, MethodSymbol method, TypeSymbol delegateType, bool requiresInstanceReceiver) 784ImmutableArray.Create<TypeSymbol>(underlyingDelegateType), 808TypeSymbol lambdaParamType = node.LeftPlaceholder.Type; 817private BoundExpression MakeConversionLambda(Conversion conversion, TypeSymbol fromType, TypeSymbol toType) 1081var promotedType = PromotedType(arg.Type.StrippedType().GetEnumUnderlyingType()); 1100private BoundExpression ExprFactory(string name, ImmutableArray<TypeSymbol> typeArgs, params BoundExpression[] arguments)
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 && 849private 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)
321TypeSymbol? 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)
50Debug.Assert(node.ApplicableMethods.All(m => !m.RequiresInstanceReceiver && TypeSymbol.Equals(m.ContainingType, firstContainer, TypeCompareKind.ConsiderEverything2))); 935var receiverType = receiverTemp.Type; 1419private BoundExpression? CreateArrayEmptyCallIfAvailable(SyntaxNode syntax, TypeSymbol elementType)
Lowering\LocalRewriter\LocalRewriter_CollectionExpression.cs (16)
42var collectionTypeKind = conversion.GetCollectionExpressionTypeKind(out var elementType, out _, out _); 188private bool ShouldUseAddRangeOrToListMethod(TypeSymbol spreadType, TypeSymbol targetEnumerableType, MethodSymbol? getEnumeratorMethod) 243private BoundExpression VisitArrayOrSpanCollectionExpression(BoundCollectionExpression node, CollectionExpressionTypeKind collectionTypeKind, TypeSymbol collectionType, TypeWithAnnotations elementType) 321Debug.Assert(TypeSymbol.Equals(array.Type, spanConstructor.Parameters[0].Type, TypeCompareKind.AllIgnoreOptions)); 325private BoundExpression VisitCollectionInitializerCollectionExpression(BoundCollectionExpression node, TypeSymbol collectionType) 501internal static bool IsAllocatingRefStructCollectionExpression(BoundCollectionExpressionBase node, CollectionExpressionTypeKind collectionKind, TypeSymbol? elementType, CSharpCompilation compilation) 510internal static bool ShouldUseRuntimeHelpersCreateSpan(BoundCollectionExpressionBase node, TypeSymbol elementType) 657var spreadTypeOriginalDefinition = spreadExpression.Type!.OriginalDefinition; 666var spanType = CallAsSpanMethod(spreadExpression, asSpanMethod).Type!.OriginalDefinition; 675bool tryGetToArrayMethod(TypeSymbol spreadTypeOriginalDefinition, WellKnownType wellKnownType, WellKnownMember wellKnownMember, [NotNullWhen(true)] out MethodSymbol? toArrayMethod) 677if (TypeSymbol.Equals(spreadTypeOriginalDefinition, this._compilation.GetWellKnownType(wellKnownType), TypeCompareKind.AllIgnoreOptions)) 747var elementType = ((ArrayTypeSymbol)arrayTemp.Type).ElementType; 807private bool TryGetSpanConversion(TypeSymbol type, bool writableOnly, out MethodSymbol? asSpanMethod) 855var type = expression.Type; 1081var 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 (61)
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) 643private void EnsureParamCollectionAttributeExists(SyntaxNode node, TypeSymbol delegateType) 656private static bool NeedsCheckedConversionInExpressionTree(TypeSymbol? source, TypeSymbol target, bool explicitCastInCode) 665SpecialType GetUnderlyingSpecialType(TypeSymbol type) => 690private BoundExpression MakeConversionNode(BoundExpression rewrittenOperand, TypeSymbol rewrittenType, bool @checked, bool acceptFailingConversion = false, bool markAsChecked = false) 710TypeSymbol rewrittenType, 743TypeSymbol rewrittenType, 777if (!TypeSymbol.Equals(rewrittenOperand.Type, conversion.BestUserDefinedConversionAnalysis.FromType, TypeCompareKind.ConsiderEverything2)) 787if (!TypeSymbol.Equals(rewrittenOperand.Type, conversion.Method.GetParameterType(0), TypeCompareKind.ConsiderEverything2)) 796TypeSymbol userDefinedConversionRewrittenType = conversion.Method.ReturnType; 816if (!TypeSymbol.Equals(userDefined.Type, conversion.BestUserDefinedConversionAnalysis.ToType, TypeCompareKind.ConsiderEverything2)) 825if (!TypeSymbol.Equals(userDefined.Type, rewrittenType, TypeCompareKind.ConsiderEverything2)) 942TypeSymbol rewrittenType) 951TypeSymbol? rewrittenOperandType = rewrittenOperand.Type; 998TypeSymbol rewrittenType) 1002TypeSymbol rewrittenOperandType = rewrittenOperand.Type; 1007TypeSymbol typeFrom = rewrittenOperandType.StrippedType(); 1008TypeSymbol typeTo = rewrittenType.StrippedType(); 1009if (!TypeSymbol.Equals(typeFrom, typeTo, TypeCompareKind.ConsiderEverything2) && (typeFrom.SpecialType == SpecialType.System_Decimal || typeTo.SpecialType == SpecialType.System_Decimal)) 1012TypeSymbol typeFromUnderlying = typeFrom; 1013TypeSymbol typeToUnderlying = typeTo; 1049TypeSymbol type) 1110TypeSymbol type) 1143TypeSymbol type) 1183TypeSymbol type) 1214Debug.Assert(TypeSymbol.Equals(seq.Type, conditional.Type, TypeCompareKind.ConsiderEverything2)); 1215Debug.Assert(TypeSymbol.Equals(conditional.Type, conditional.Consequence.Type, TypeCompareKind.ConsiderEverything2)); 1216Debug.Assert(TypeSymbol.Equals(conditional.Type, conditional.Alternative.Type, TypeCompareKind.ConsiderEverything2)); 1245TypeSymbol rewrittenType) 1251var parameterType = conversion.Method.GetParameterType(0); 1278Debug.Assert(TypeSymbol.Equals(result.Type, rewrittenType, TypeCompareKind.ConsiderEverything2)); 1282private BoundExpression MakeLiftedUserDefinedConversionConsequence(BoundCall call, TypeSymbol resultType) 1286Debug.Assert(resultType.IsNullableType() && TypeSymbol.Equals(resultType.GetNullableUnderlyingType(), call.Method.ReturnType, TypeCompareKind.ConsiderEverything2)); 1299TypeSymbol rewrittenType) 1389TypeSymbol rewrittenType) 1396TypeSymbol source = rewrittenOperand.Type; 1397TypeSymbol target = rewrittenType; 1438public static SpecialMember GetIntPtrConversionMethod(TypeSymbol source, TypeSymbol target) 1443TypeSymbol t0 = target.StrippedType(); 1444TypeSymbol s0 = source.StrippedType(); 1554private static SpecialMember DecimalConversionMethod(TypeSymbol typeFrom, TypeSymbol typeTo) 1598private BoundExpression RewriteDecimalConversion(SyntaxNode syntax, BoundExpression operand, TypeSymbol fromType, TypeSymbol toType, bool @checked, bool isImplicit, ConstantValue? constantValueOpt) 1626static TypeSymbol get64BitType(CSharpCompilation compilation, bool signed) => compilation.GetSpecialType(signed ? SpecialType.System_Int64 : SpecialType.System_UInt64); 1629private BoundExpression RewriteDecimalConversionCore(SyntaxNode syntax, BoundExpression operand, TypeSymbol fromType, TypeSymbol toType, bool isImplicit, ConstantValue? constantValueOpt) 1647Debug.Assert(TypeSymbol.Equals(method.ReturnType, toType, TypeCompareKind.ConsiderEverything2)); 1655private Conversion TryMakeConversion(SyntaxNode syntax, Conversion conversion, TypeSymbol fromType, TypeSymbol toType, bool @checked) 1756private Conversion TryMakeConversion(SyntaxNode syntax, TypeSymbol fromType, TypeSymbol toType, bool @checked) 1767private 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, 479TypeSymbol awaitExpressionType = disposeAwaitableInfoOpt.GetResult?.ReturnType ?? _compilation.DynamicType; 497private BoundExpression ConvertReceiverForInvocation(CSharpSyntaxNode syntax, BoundExpression receiver, MethodSymbol method, Conversion receiverConversion, TypeSymbol convertedReceiverType) 614TypeSymbol intType = _compilation.GetSpecialType(SpecialType.System_Int32); 615TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean); 786TypeSymbol inlineArrayType = boundArrayVar.Type; 915TypeSymbol intType = _compilation.GetSpecialType(SpecialType.System_Int32); 916TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean); 1065TypeSymbol intType = _compilation.GetSpecialType(SpecialType.System_Int32); 1066TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean); 1234private static BoundLocal MakeBoundLocal(CSharpSyntaxNode syntax, LocalSymbol local, TypeSymbol type) 1254private 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 (4)
44private BoundExpression MakeImplicitConversionForInterpolatedString(BoundExpression rewrittenOperand, TypeSymbol rewrittenType) 101TypeSymbol localType = trailingParameter.Type; 353var stringType = node.Type; 368private 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 ? 481TypeSymbol 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 (8)
69private Dictionary<TypeSymbol, ArrayBuilder<StateMachineFieldSymbol>>? _lazyAvailableReusableHoistedFields; 203Debug.Assert(TypeSymbol.Equals(frameClass, result.Type, TypeCompareKind.ConsiderEverything2)); 437private bool MightContainReferences(TypeSymbol type) 451private StateMachineFieldSymbol GetOrAllocateReusableHoistedField(TypeSymbol type, out bool reused, LocalSymbol local = null) 481_lazyAvailableReusableHoistedFields = new Dictionary<TypeSymbol, ArrayBuilder<StateMachineFieldSymbol>>(Symbols.SymbolEqualityComparer.IgnoringDynamicTupleNamesAndNullability); 539var type = TypeMap.SubstituteType(local.Type).Type; 541Debug.Assert(TypeSymbol.Equals(type, replacement.Type, TypeCompareKind.ConsiderEverything2)); 660TypeSymbol 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)); 183var 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 (57)
107ImmutableArray<TypeSymbol> typeArgs = default(ImmutableArray<TypeSymbol>), 139internal override bool IsAccessibleHelper(Symbol symbol, TypeSymbol accessThroughType, out bool failedThroughTypeCheck, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, ConsList<TypeSymbol> basesBeingResolved) 185Debug.Assert(TopLevelMethod is null || TypeSymbol.Equals(TopLevelMethod.ContainingType, CurrentType, TypeCompareKind.ConsiderEverything2)); 194TypeSymbol.Equals(CurrentFunction.ContainingType, CurrentType, TypeCompareKind.ConsiderEverything2)); 229public StateMachineFieldSymbol StateMachineField(TypeSymbol type, string name, bool isPublic = false, bool isThis = false) 237public StateMachineFieldSymbol StateMachineField(TypeSymbol type, string name, SynthesizedLocalKind synthesizedKind, int slotIndex) 245public StateMachineFieldSymbol StateMachineField(TypeSymbol type, string name, LocalSlotDebugInfo slotDebugInfo, int slotIndex) 282public BoundBadExpression BadExpression(TypeSymbol type) 633TypeSymbol type, 655TypeSymbol type, 675public ParameterSymbol SynthesizedParameter(TypeSymbol type, string name, MethodSymbol? container = null, int ordinal = 0) 680public BoundBinaryOperator Binary(BinaryOperatorKind kind, TypeSymbol type, BoundExpression left, BoundExpression right) 685public BoundAsOperator As(BoundExpression operand, TypeSymbol type) 690public BoundIsOperator Is(BoundExpression operand, TypeSymbol type) 777public BoundLiteral Literal(ConstantValue value, TypeSymbol type) 836public BoundExpression StaticCall(TypeSymbol receiver, string name, bool disallowExpandedNonArrayParams, params BoundExpression[] args) 841public BoundExpression StaticCall(TypeSymbol receiver, string name, bool disallowExpandedNonArrayParams, ImmutableArray<BoundExpression> args, bool ignoreNormalFormIfHasValidParamsParameter) 847public BoundExpression StaticCall(BinderFlags flags, TypeSymbol receiver, string name, bool disallowExpandedNonArrayParams, ImmutableArray<TypeSymbol> typeArgs, params BoundExpression[] args) 852public BoundExpression StaticCall(TypeSymbol receiver, MethodSymbol method, params BoundExpression[] args) 950public BoundExpression Conditional(BoundExpression condition, BoundExpression consequence, BoundExpression alternative, TypeSymbol type, bool isRef = false) 958Debug.Assert(TypeSymbol.Equals(valueTypeReceiver.Type, referenceTypeReceiver.Type, TypeCompareKind.ConsiderEverything2)); 1073public BoundSequence Sequence(BoundExpression[] sideEffects, BoundExpression result, TypeSymbol? type = null) 1076var resultType = type ?? result.Type; 1268public BoundExpression ThrowExpression(BoundExpression thrown, TypeSymbol type) 1273public BoundExpression Null(TypeSymbol type) 1285public static BoundExpression Null(TypeSymbol type, SyntaxNode syntax) 1294public BoundTypeExpression Type(TypeSymbol type) 1299public BoundExpression Typeof(WellKnownType type, TypeSymbol systemType) 1304public BoundExpression Typeof(TypeSymbol type, TypeSymbol systemType) 1320Debug.Assert(TypeSymbol.Equals(systemType, getTypeFromHandle.ReturnType, TypeCompareKind.AllIgnoreOptions)); 1330public BoundExpression Typeof(TypeWithAnnotations type, TypeSymbol systemType) 1335public ImmutableArray<BoundExpression> TypeOfs(ImmutableArray<TypeWithAnnotations> typeArguments, TypeSymbol systemType) 1346public BoundExpression Sizeof(TypeSymbol type) 1420public BoundExpression InstrumentationPayloadRoot(int analysisKind, TypeSymbol payloadType) 1451public BoundExpression MethodInfo(MethodSymbol method, TypeSymbol systemReflectionMethodInfo) 1486private MethodSymbol GetMethodFromHandleMethod(NamedTypeSymbol methodContainer, TypeSymbol systemReflectionMethodOrConstructorInfo) 1518public BoundExpression Convert(TypeSymbol type, BoundExpression arg, bool allowBoxingByRefLikeTypeParametersToObject = false) 1522if (TypeSymbol.Equals(type, arg.Type, TypeCompareKind.ConsiderEverything2)) 1548public BoundExpression Convert(TypeSymbol type, BoundExpression arg, Conversion conversion, bool isChecked = false) 1552if (conversion.Method is { } && !TypeSymbol.Equals(conversion.Method.Parameters[0].Type, arg.Type, TypeCompareKind.ConsiderEverything2)) 1575public BoundExpression ArrayOrEmpty(TypeSymbol elementType, BoundExpression[] elements) 1587public BoundExpression ArrayOrEmpty(TypeSymbol elementType, ImmutableArray<BoundExpression> elements) 1602public BoundExpression Array(TypeSymbol elementType, ImmutableArray<BoundExpression> elements) 1611public BoundExpression Array(TypeSymbol elementType, BoundExpression length) 1621internal BoundExpression Default(TypeSymbol type) 1626internal static BoundExpression Default(TypeSymbol type, SyntaxNode syntax) 1666internal BoundExpression NullOrDefault(TypeSymbol typeSymbol) 1671internal static BoundExpression NullOrDefault(TypeSymbol typeSymbol, SyntaxNode syntax) 1732var type = argument.Type; 1802TypeSymbol exprType = rewrittenExpr.Type; 1811TypeSymbol boolType = Compilation.GetSpecialType(CodeAnalysis.SpecialType.System_Boolean); 1825TypeSymbol objectType = SpecialType(CodeAnalysis.SpecialType.System_Object); 1864TypeSymbol 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) ?? 2213TypeSymbol? naturalType = boundTupleExpression switch 2485TypeSymbol inputType = boundConstantPattern.InputType; 2486TypeSymbol narrowedType = boundConstantPattern.NarrowedType; 2496TypeSymbol inputType = boundRelationalPattern.InputType; 2497TypeSymbol 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)
96var fieldType = field?.NonPointerType(); 186TypeSymbol fieldType = field.NonPointerType(); 236internal 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)
667private static bool HaveSameTypeConstraints(TypeParameterSymbol typeParameter1, TypeMap? typeMap1, TypeParameterSymbol typeParameter2, TypeMap? typeMap2, IEqualityComparer<TypeSymbol> comparer) 684var substitutedTypes1 = new HashSet<TypeSymbol>(comparer); 685var substitutedTypes2 = new HashSet<TypeSymbol>(comparer); 714private static bool AreConstraintTypesSubset(HashSet<TypeSymbol> constraintTypes1, HashSet<TypeSymbol> constraintTypes2, TypeParameterSymbol typeParameter2) 716foreach (var constraintType in constraintTypes1) 744private 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, 1079ParamInfo<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; 2776private 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)
563var 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!; 1898static bool needsTupleElementNamesAttribute(TypeSymbol type) 1905var resultType = type.VisitType( 2391var type = field.NonPointerType(); 2428if (member is TypeSymbol) 2691return (!TypeSymbol.Equals(oldInstance, t, TypeCompareKind.AllNullableIgnoreOptions)) && ReferenceEquals(tOriginal, top); 2940Debug.Assert(!nonTypeMembers.Any(static s => s is TypeSymbol)); 3907var 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) 1864bool fieldSupported = TypeSymbol.IsInlineArrayElementFieldSupported(elementField); 1869TypeSymbol returnType = conversion.ReturnType; 1870TypeSymbol 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)
66TypeSymbol? explicitInterfaceType; 95TypeSymbol? explicitInterfaceType,
Symbols\Source\SourcePropertySymbolBase.cs (5)
53private readonly TypeSymbol _explicitInterfaceType; 81TypeSymbol? explicitInterfaceType, 837TypeSymbol.CheckModifierMismatchOnImplementingMember(this.ContainingType, this, explicitlyImplementedProperty, isExplicit: true, diagnostics); 995else if (TypeSymbol.HaveInitOnlyMismatch(thisAccessor, otherAccessor)) 1654var 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)
68private 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\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 (166)
17public static bool ImplementsInterface(this TypeSymbol subType, TypeSymbol superInterface, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 21if (@interface.IsInterface && TypeSymbol.Equals(@interface, superInterface, TypeCompareKind.ConsiderEverything2)) 29public static bool CanBeAssignedNull(this TypeSymbol type) 34public static bool CanContainNull(this TypeSymbol type) 40public static bool CanBeConst(this TypeSymbol typeSymbol) 60public static bool IsTypeParameterDisallowingAnnotationInCSharp8(this TypeSymbol type) 81public static bool IsPossiblyNullableReferenceTypeTypeParameter(this TypeSymbol type) 86public static bool IsNonNullableValueType(this TypeSymbol typeArgument) 96public static bool IsVoidType(this TypeSymbol type) 101public static bool IsNullableTypeOrTypeParameter(this TypeSymbol? type) 130public static bool IsNullableType(this TypeSymbol type) 135public static bool IsValidNullableTypeArgument(this TypeSymbol type) 143public static TypeSymbol GetNullableUnderlyingType(this TypeSymbol type) 148public static bool IsNullableType(this TypeSymbol? type, [NotNullWhen(true)] out TypeSymbol? underlyingType) 161public static TypeWithAnnotations GetNullableUnderlyingTypeWithAnnotations(this TypeSymbol type) 170public static TypeSymbol StrippedType(this TypeSymbol type) 175public static TypeSymbol EnumUnderlyingTypeOrSelf(this TypeSymbol type) 180public static bool IsNativeIntegerOrNullableThereof(this TypeSymbol? type) 185public static bool IsObjectType(this TypeSymbol type) 190public static bool IsStringType(this TypeSymbol type) 195public static bool IsCharType(this TypeSymbol type) 200public static bool IsIntegralType(this TypeSymbol type) 205public static NamedTypeSymbol? GetEnumUnderlyingType(this TypeSymbol? type) 210public static bool IsEnumType(this TypeSymbol type) 216public static bool IsValidEnumType(this TypeSymbol type) 229public static bool IsValidAttributeParameterType(this TypeSymbol type, CSharpCompilation compilation) 240public static TypedConstantKind GetAttributeParameterTypedConstantKind(this TypeSymbol type, CSharpCompilation compilation) 304public static bool IsValidExtensionParameterType(this TypeSymbol type) 317public static bool IsInterfaceType(this TypeSymbol type) 323public static bool IsClassType(this TypeSymbol type) 329public static bool IsStructType(this TypeSymbol type) 335public static bool IsErrorType(this TypeSymbol type) 346public static bool IsDynamic(this TypeSymbol type) 351public static bool IsTypeParameter(this TypeSymbol type) 357public static bool IsArray(this TypeSymbol type) 363public static bool IsSZArray(this TypeSymbol type) 369internal static bool IsArrayInterface(this TypeSymbol type, out TypeWithAnnotations typeArgument) 389public static bool IsFunctionPointer(this TypeSymbol type) 394public static bool IsPointerOrFunctionPointer(this TypeSymbol type) 407internal static ImmutableArray<NamedTypeSymbol> GetAllInterfacesOrEffectiveInterfaces(this TypeSymbol type) 428public static NamedTypeSymbol? GetDelegateType(this TypeSymbol? type) 439public static TypeSymbol? GetDelegateOrFunctionPointerType(this TypeSymbol? type) 441return (TypeSymbol?)GetDelegateType(type) ?? type as FunctionPointerTypeSymbol; 448public static bool IsExpressionTree(this TypeSymbol type) 457public static bool IsNonGenericExpressionType(this TypeSymbol type) 467public static bool IsGenericOrNonGenericExpressionType(this TypeSymbol _type, out bool isGenericType) 507public static bool IsPossibleArrayGenericInterface(this TypeSymbol type) 530internal static bool IsErrorOrRefLikeOrAllowsRefLikeType(this TypeSymbol type) 535internal static bool IsRefLikeOrAllowsRefLikeType(this TypeSymbol type) 558public static bool IsDelegateType(this TypeSymbol type) 564public static ImmutableArray<ParameterSymbol> DelegateParameters(this TypeSymbol type) 574public static ImmutableArray<ParameterSymbol> DelegateOrFunctionPointerParameters(this TypeSymbol type) 587public static bool TryGetElementTypesWithAnnotationsIfTupleType(this TypeSymbol type, out ImmutableArray<TypeWithAnnotations> elementTypes) 600public static MethodSymbol? DelegateInvokeMethod(this TypeSymbol type) 611public static ConstantValue? GetDefaultValue(this TypeSymbol type) 659public static SpecialType GetSpecialTypeSafe(this TypeSymbol? type) 664public static bool IsAtLeastAsVisibleAs(this TypeSymbol type, Symbol sym, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 667var result = type.VisitType((type1, symbol, unused) => IsTypeLessVisibleThan(type1, symbol, ref localUseSiteInfo), sym, 673private static bool IsTypeLessVisibleThan(TypeSymbol type, Symbol sym, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 697public static TypeSymbol? VisitType<T>( 698this TypeSymbol type, 699Func<TypeSymbol, T, bool, bool> predicate, 725public static TypeSymbol? VisitType<T>( 727TypeSymbol? type, 729Func<TypeSymbol, T, bool, bool>? typePredicate, 746TypeSymbol current = type ?? (useDefaultType ? typeWithAnnotationsOpt.DefaultType : typeWithAnnotationsOpt.Type); 762var result = VisitType(default, containingType, typeWithAnnotationsPredicate, typePredicate, arg, canDigThroughNullable, useDefaultType, visitCustomModifiers); 795var result = VisitType( 845(TypeWithAnnotations nextTypeWithAnnotations, TypeSymbol? nextType) = getNextIterationElements(fields[i].TypeWithAnnotations, canDigThroughNullable); 846var result = VisitType( 876(TypeWithAnnotations nextTypeWithAnnotations, TypeSymbol? nextType) = getNextIterationElements(typeArguments[i], canDigThroughNullable); 877var result = VisitType( 907var result = visitFunctionPointerType((FunctionPointerTypeSymbol)current, typeWithAnnotationsPredicate, typePredicate, arg, useDefaultType, canDigThroughNullable, visitCustomModifiers, out next); 925static (TypeWithAnnotations, TypeSymbol?) getNextIterationElements(TypeWithAnnotations type, bool canDigThroughNullable) 928static 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) 937var result = VisitType( 955(TypeWithAnnotations nextTypeWithAnnotations, TypeSymbol? nextType) = getNextIterationElements(currentPointer.Parameters[i].TypeWithAnnotations, canDigThroughNullable); 1157public static bool IsUnboundGenericType(this TypeSymbol type) 1173public static bool ContainsTypeParameter(this TypeSymbol type, TypeParameterSymbol? parameter = null) 1175var result = type.VisitType(s_containsTypeParameterPredicate, parameter); 1179private static readonly Func<TypeSymbol, TypeParameterSymbol?, bool, bool> s_containsTypeParameterPredicate = 1180(type, parameter, unused) => type.TypeKind == TypeKind.TypeParameter && (parameter is null || TypeSymbol.Equals(type, parameter, TypeCompareKind.ConsiderEverything2)); 1182public static bool ContainsTypeParameter(this TypeSymbol type, MethodSymbol parameterContainer) 1186var result = type.VisitType(s_isTypeParameterWithSpecificContainerPredicate, parameterContainer); 1190private static readonly Func<TypeSymbol, Symbol, bool, bool> s_isTypeParameterWithSpecificContainerPredicate = 1193public static bool ContainsTypeParameters(this TypeSymbol type, HashSet<TypeParameterSymbol> parameters) 1195var result = type.VisitType(s_containsTypeParametersPredicate, parameters); 1199private static readonly Func<TypeSymbol, HashSet<TypeParameterSymbol>, bool, bool> s_containsTypeParametersPredicate = 1202public static bool ContainsMethodTypeParameter(this TypeSymbol type) 1204var result = type.VisitType(s_containsMethodTypeParameterPredicate, null); 1208private static readonly Func<TypeSymbol, object?, bool, bool> s_containsMethodTypeParameterPredicate = 1214public static bool ContainsDynamic(this TypeSymbol type) 1216var result = type.VisitType(s_containsDynamicPredicate, null, canDigThroughNullable: true); 1220private static readonly Func<TypeSymbol, object?, bool, bool> s_containsDynamicPredicate = (type, unused1, unused2) => type.TypeKind == TypeKind.Dynamic; 1222internal static bool ContainsNativeIntegerWrapperType(this TypeSymbol type) 1224var result = type.VisitType((type, unused1, unused2) => type.IsNativeIntegerWrapperType, (object?)null, canDigThroughNullable: true); 1233internal static bool ContainsErrorType(this TypeSymbol type) 1235var result = type.VisitType((type, unused1, unused2) => type.IsErrorType(), (object?)null, canDigThroughNullable: true); 1242internal static bool ContainsTuple(this TypeSymbol type) => 1243type.VisitType((TypeSymbol t, object? _1, bool _2) => t.IsTupleType, null) is object; 1248internal static bool ContainsTupleNames(this TypeSymbol type) => 1249type.VisitType((TypeSymbol t, object? _1, bool _2) => !t.TupleElementNames.IsDefault, null) is object; 1254internal static bool ContainsFunctionPointer(this TypeSymbol type) => 1255type.VisitType((TypeSymbol t, object? _, bool _) => t.IsFunctionPointer(), null) is object; 1257internal static bool ContainsPointer(this TypeSymbol type) => 1258type.VisitType((TypeSymbol t, object? _, bool _) => t.TypeKind is TypeKind.Pointer or TypeKind.FunctionPointer, null) is object; 1275internal static TypeSymbol? GetNonErrorGuess(this TypeSymbol type) 1277var result = ExtendedErrorTypeSymbol.ExtractNonErrorType(type); 1286internal static TypeKind GetNonErrorTypeKindGuess(this TypeSymbol type) 1296internal static bool IsValidV6SwitchGoverningType(this TypeSymbol type, bool isTargetTypeOfUserDefinedOp = false) 1341internal static bool IsSpanChar(this TypeSymbol type) 1352internal static bool IsReadOnlySpanChar(this TypeSymbol type) 1363internal static bool IsSpanOrReadOnlySpanChar(this TypeSymbol type) 1381internal static bool IsRestrictedType(this TypeSymbol type, 1397public static bool IsIntrinsicType(this TypeSymbol type) 1424public static bool IsPartial(this TypeSymbol type) 1429public static bool HasFileLocalTypes(this TypeSymbol type) 1431var foundType = type.VisitType(predicate: (type, _, _) => type is NamedTypeSymbol { IsFileLocal: true }, arg: (object?)null); 1444public static bool IsPointerType(this TypeSymbol type) 1449internal static int FixedBufferElementSizeInBytes(this TypeSymbol type) 1455internal static bool IsValidVolatileFieldType(this TypeSymbol type) 1489public static bool MarkCheckedIfNecessary(this TypeSymbol type, ref HashSet<TypeSymbol> checkedTypes) 1493checkedTypes = new HashSet<TypeSymbol>(); 1499internal static bool IsVoidPointer(this TypeSymbol type) 1508internal static bool IsPrimitiveRecursiveStruct(this TypeSymbol t) 1592public static TypeSymbol AsDynamicIfNoPia(this TypeSymbol type, NamedTypeSymbol containingType) 1594return type.TryAsDynamicIfNoPia(containingType, out TypeSymbol? result) ? result : type; 1597public static bool TryAsDynamicIfNoPia(this TypeSymbol type, NamedTypeSymbol containingType, [NotNullWhen(true)] out TypeSymbol? result) 1617internal static bool IsVerifierReference(this TypeSymbol type) 1625internal static bool IsVerifierValue(this TypeSymbol type) 1778internal static bool IsNonGenericTaskType(this TypeSymbol type, CSharpCompilation compilation) 1796internal static bool IsGenericTaskType(this TypeSymbol type, CSharpCompilation compilation) 1809internal static bool IsIAsyncEnumerableType(this TypeSymbol type, CSharpCompilation compilation) 1819internal static bool IsIAsyncEnumeratorType(this TypeSymbol type, CSharpCompilation compilation) 1839internal static bool IsCustomTaskType(this NamedTypeSymbol type, [NotNullWhen(true)] out TypeSymbol? builderArgument) 1856internal static TypeSymbol NormalizeTaskTypes(this TypeSymbol type, CSharpCompilation compilation) 1865private static bool NormalizeTaskTypesInType(CSharpCompilation compilation, ref TypeSymbol type) 1904var type = typeWithAnnotations.Type; 2069internal static bool IsWellKnownTypeInAttribute(this TypeSymbol typeSymbol) 2072internal static bool IsWellKnownTypeRequiresLocationAttribute(this TypeSymbol typeSymbol) 2075internal static bool IsWellKnownTypeUnmanagedType(this TypeSymbol typeSymbol) 2078internal static bool IsWellKnownTypeIsExternalInit(this TypeSymbol typeSymbol) 2081internal static bool IsWellKnownTypeOutAttribute(this TypeSymbol typeSymbol) => typeSymbol.IsWellKnownInteropServicesTopLevelType("OutAttribute"); 2084internal static bool IsWellKnownTypeLock(this TypeSymbol typeSymbol) 2090private static bool IsWellKnownInteropServicesTopLevelType(this TypeSymbol typeSymbol, string name) 2100private static bool IsWellKnownCompilerServicesTopLevelType(this TypeSymbol typeSymbol, string name) 2110internal static bool IsCompilerServicesTopLevelType(this TypeSymbol typeSymbol) 2113internal static bool IsWellKnownSetsRequiredMembersAttribute(this TypeSymbol type) 2116internal static bool IsWellKnownINumberBaseType(this TypeSymbol type) 2123internal static bool IsWellKnownDiagnosticsCodeAnalysisTopLevelType(this TypeSymbol typeSymbol) 2126private static bool IsContainedInNamespace(this TypeSymbol typeSymbol, string outerNS, string midNS, string? innerNS = null) 2159internal static int TypeToIndex(this TypeSymbol type) 2184TypeSymbol underlyingType = type.GetNullableUnderlyingType(); 2213internal 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)
231var f1Type = ((FieldSymbol)(classX.ChildSymbol("f1"))).Type; 232var f2Type = ((FieldSymbol)(classX.ChildSymbol("f2"))).Type; 233var f3Type = ((FieldSymbol)(classX.ChildSymbol("f3"))).Type; 234var f4Type = ((FieldSymbol)(classX.ChildSymbol("f4"))).Type; 235var f5Type = ((FieldSymbol)(classX.ChildSymbol("f5"))).Type; 236var f6Type = ((FieldSymbol)(classX.ChildSymbol("f6"))).Type; 237var f7Type = ((FieldSymbol)(classX.ChildSymbol("f7"))).Type; 238var f8Type = ((FieldSymbol)(classX.ChildSymbol("f8"))).Type; 239var f9Type = ((FieldSymbol)(classX.ChildSymbol("f9"))).Type; 240var f10Type = ((FieldSymbol)(classX.ChildSymbol("f10"))).Type; 241var g1Type = ((FieldSymbol)(classI.ChildSymbol("g1"))).Type; 242var g2Type = ((FieldSymbol)(classI.ChildSymbol("g2"))).Type;
Symbols\SymbolErrorTests.cs (2)
16902var fieldType = fieldSym.Type; 16939var 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;