7 types derived from TypeSymbol
Microsoft.CodeAnalysis.CSharp (7)
Symbols\ArrayTypeSymbol.cs (1)
21internal abstract partial class ArrayTypeSymbol : TypeSymbol, IArrayTypeSymbolInternal
Symbols\DynamicTypeSymbol.cs (1)
15internal sealed partial class DynamicTypeSymbol : TypeSymbol
Symbols\FunctionPointers\FunctionPointerTypeSymbol.cs (1)
17internal sealed partial class FunctionPointerTypeSymbol : TypeSymbol
Symbols\FunctionTypeSymbol.cs (1)
35internal sealed class FunctionTypeSymbol : TypeSymbol
Symbols\NamedTypeSymbol.cs (1)
25internal abstract partial class NamedTypeSymbol : TypeSymbol, INamedTypeSymbolInternal
Symbols\PointerTypeSymbol.cs (1)
19internal sealed partial class PointerTypeSymbol : TypeSymbol
Symbols\TypeParameterSymbol.cs (1)
21internal abstract partial class TypeParameterSymbol : TypeSymbol, ITypeParameterSymbolInternal
5450 references to TypeSymbol
Microsoft.CodeAnalysis.CSharp (4762)
Binder\Binder.cs (4)
796TypeSymbol? throughTypeOpt = null) 804TypeSymbol throughTypeOpt, 807ConsList<TypeSymbol>? basesBeingResolved = null) 877TypeSymbol getType()
Binder\Binder.IdentifierUsedAsValueFinder.cs (2)
211TypeSymbol type, 253TypeSymbol type,
Binder\Binder.NamespaceOrTypeOrAliasSymbolWithAnnotations.cs (3)
30Debug.Assert(!(symbol is TypeSymbol)); 58var type = symbol as TypeSymbol;
Binder\Binder.QueryUnboundLambdaState.cs (1)
58public override void GenerateAnonymousFunctionConversionError(BindingDiagnosticBag diagnostics, TypeSymbol targetType)
Binder\Binder.ValueChecks.cs (6)
1214TypeSymbol.Equals( 1679? TypeSymbol.Equals(fieldSymbol.ContainingType, containing.ContainingType, TypeCompareKind.AllIgnoreOptions) 1681: TypeSymbol.Equals(fieldSymbol.ContainingType.OriginalDefinition, containing.ContainingType.OriginalDefinition, TypeCompareKind.AllIgnoreOptions))) 2012var accessThroughType = this.GetAccessThroughType(receiver); 2061var accessThroughType = this.GetAccessThroughType(receiver); 5673private SignatureOnlyMethodSymbol GetInlineArrayConversionEquivalentSignatureMethod(BoundExpression inlineArray, TypeSymbol resultType, out ImmutableArray<BoundExpression> arguments, out ImmutableArray<RefKind> refKinds)
Binder\Binder.WithQueryLambdaParametersBinder.cs (1)
105LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\Binder_AnonymousTypes.cs (3)
88TypeSymbol fieldType = GetAnonymousTypeFieldType(boundExpressions[i], fieldInitializer, diagnostics, ref hasError); 211private TypeSymbol GetAnonymousTypeFieldType(BoundExpression expression, CSharpSyntaxNode errorSyntax, BindingDiagnosticBag diagnostics, ref bool hasError) 214TypeSymbol? expressionType = expression.Type;
Binder\Binder_Attributes.cs (11)
551TypeSymbol namedArgumentType; 609private TypeSymbol BindNamedAttributeArgumentType(AttributeArgumentSyntax namedArgument, Symbol namedArgumentNameSymbol, NamedTypeSymbol attributeType, BindingDiagnosticBag diagnostics) 613return (TypeSymbol)namedArgumentNameSymbol; 622TypeSymbol? namedArgumentType = null; 731!((TypeSymbol)reorderedArgument.TypeInternal!).Equals(parameter.Type, TypeCompareKind.AllIgnoreOptions)) 877private TypedConstant VisitArrayCollectionExpression(TypeSymbol type, BoundCollectionExpression collection, BindingDiagnosticBag diagnostics, ref bool attrHasErrors, bool curArgumentHasErrors) 912var type = node.Type; 914var operandType = operand.Type; 939var typeOfArgument = (TypeSymbol?)node.SourceType.Type; 1017var type = node.Type;
Binder\Binder_Await.cs (12)
41TypeSymbol awaitExpressionType = (info.GetResult ?? info.RuntimeAsyncAwaitCall?.Method)?.ReturnType ?? (hasErrors ? CreateErrorType() : Compilation.DynamicType); 87var type = expression.Type; 281Debug.Assert(TypeSymbol.Equals(expression.Type, getAwaiterArgument.Type, TypeCompareKind.ConsiderEverything)); 317TypeSymbol awaiterType = getAwaiter.Type!; 441var unsubstitutedReturnType = method.ReturnType; 469static bool isValidConversion(TypeSymbol exprType, MethodSymbol method, SyntaxNode node, BindingDiagnosticBag diagnostics, Binder @this, out Conversion conversion) 487bool getRuntimeAwaitAwaiter(TypeSymbol awaiterType, out BoundCall? runtimeAwaitAwaiterCall, out BoundAwaitableValuePlaceholder? placeholder, SyntaxNode syntax, BindingDiagnosticBag diagnostics) 629private bool GetIsCompletedProperty(TypeSymbol awaiterType, SyntaxNode node, TypeSymbol awaitedExpressionType, BindingDiagnosticBag diagnostics, [NotNullWhen(true)] out PropertySymbol? isCompletedProperty) 672private bool AwaiterImplementsINotifyCompletion(TypeSymbol awaiterType, SyntaxNode node, BindingDiagnosticBag diagnostics) 696private bool GetGetResultMethod(BoundExpression awaiterExpression, SyntaxNode node, TypeSymbol awaitedExpressionType, BindingDiagnosticBag diagnostics, out MethodSymbol? getResultMethod, [NotNullWhen(true)] out BoundExpression? getAwaiterGetResultCall) 698var awaiterType = awaiterExpression.Type;
Binder\Binder_Constraints.cs (4)
462var possibleFileType = containingSymbol switch 464TypeSymbol typeSymbol => typeSymbol, 466MethodSymbol method => (TypeSymbol)method.ContainingSymbol, 562TypeSymbol type = typeWithAnnotations.Type;
Binder\Binder_Conversions.cs (74)
22TypeSymbol destination, 35TypeSymbol destination, 47TypeSymbol destination, 60TypeSymbol destination, 102TypeSymbol destination, 211TypeSymbol? type = source.Type; 306void reportUseSiteDiagnostics(SyntaxNode syntax, Conversion conversion, BoundExpression source, TypeSymbol destination, BindingDiagnosticBag diagnostics) 320void ensureAllUnderlyingConversionsChecked(SyntaxNode syntax, BoundExpression source, Conversion conversion, bool wasCompilerGenerated, TypeSymbol destination, BindingDiagnosticBag diagnostics) 413void checkConstraintLanguageVersionAndRuntimeSupportForConversion(SyntaxNode syntax, Conversion conversion, BoundExpression source, TypeSymbol destination, BindingDiagnosticBag diagnostics) 531TypeSymbol sourceForCastUp = source.Type.IsSpan() 580internal static MethodSymbol? TryFindImplicitOperatorFromArray(TypeSymbol type) 590internal static MethodSymbol? TryFindImplicitOperatorFromSpan(TypeSymbol spanType, TypeSymbol readonlySpanType) 600private static MethodSymbol? TryFindImplicitOperator<TArg>(TypeSymbol type, TArg arg, 613internal static bool NeedsSpanCastUp(TypeSymbol source, TypeSymbol destination) 619var sourceElementType = ((NamedTypeSymbol)source).TypeArgumentsWithAnnotationsNoUseSiteDiagnostics[0].Type; 620var destinationElementType = ((NamedTypeSymbol)destination).TypeArgumentsWithAnnotationsNoUseSiteDiagnostics[0].Type; 630internal static MethodSymbol? TryFindCastUpMethod(TypeSymbol source, TypeSymbol destination) 658internal static MethodSymbol? TryFindAsSpanCharMethod(CSharpCompilation compilation, TypeSymbol readOnlySpanType) 692private static MethodSymbol? TryFindSingleMethod<TArg>(TypeSymbol type, string name, TArg arg, Func<TArg, MethodSymbol, bool> predicate) 713private BoundExpression BindUnconvertedInterpolatedExpressionToFormattableStringFactory(BoundUnconvertedInterpolatedString unconvertedSource, TypeSymbol destination, BindingDiagnosticBag diagnostics) 735private static void CheckInlineArrayTypeIsSupported(SyntaxNode syntax, TypeSymbol inlineArrayType, TypeSymbol elementType, BindingDiagnosticBag diagnostics) 748SyntaxNode syntax, BoundUnconvertedObjectCreationExpression node, Conversion conversion, bool isCast, TypeSymbol destination, 782TypeSymbol type, AnalyzedArguments arguments, BindingDiagnosticBag diagnostics) 815TypeSymbol targetType, 826var collectionTypeKind = conversion.GetCollectionExpressionTypeKind(out var elementType, out MethodSymbol? constructor, out bool isExpanded); 863collectionBuilderMethod = GetAndValidateCollectionBuilderMethod(syntax, namedType, diagnostics, out var updatedElementType); 992BoundNode bindSpreadElement(BoundCollectionExpressionSpreadElement element, TypeSymbol elementType, Conversion elementConversion, BindingDiagnosticBag diagnostics) 1020private bool HasCollectionInitializerTypeInProgress(SyntaxNode syntax, TypeSymbol targetType) 1042out TypeSymbol? elementType) 1045bool result = namedType.HasCollectionBuilderAttribute(out TypeSymbol? builderType, out string? methodName); 1083internal BoundExpression BindCollectionExpressionConstructor(SyntaxNode syntax, TypeSymbol targetType, MethodSymbol? constructor, BindingDiagnosticBag diagnostics) 1113internal bool HasCollectionExpressionApplicableConstructor(SyntaxNode syntax, TypeSymbol targetType, out MethodSymbol? constructor, out bool isExpanded, BindingDiagnosticBag diagnostics, bool isParamsModifierValidation = false) 1245internal bool HasCollectionExpressionApplicableAddMethod(SyntaxNode syntax, TypeSymbol targetType, out ImmutableArray<MethodSymbol> addMethods, BindingDiagnosticBag diagnostics) 1498TypeSymbol? receiverType = methodGroup.ReceiverOpt.Type; 1535TypeSymbol secondArgumentType = (constructed ?? member).Parameters[1].Type; 1695internal bool TryGetCollectionIterationType(SyntaxNode syntax, TypeSymbol collectionType, out TypeWithAnnotations iterationType) 1718TypeSymbol targetType, 1749TypeSymbol targetType, 1778var elementType = elementTypeWithAnnotations.Type; 1839TypeSymbol elementTypeOriginalDefinition, 1840TypeSymbol? builderType, 1899var spanTypeArg = ((NamedTypeSymbol)methodWithTargetTypeParameters.Parameters[0].Type).TypeArgumentsWithAnnotationsNoUseSiteDiagnostics[0].Type; 1930TypeSymbol destination, 1971private BoundExpression ConvertSwitchExpression(BoundUnconvertedSwitchExpression source, TypeSymbol destination, Conversion? conversionIfTargetTyped, BindingDiagnosticBag diagnostics, bool hasErrors = false) 2004TypeSymbol destination, 2070TypeSymbol conversionParameterType = conversion.BestUserDefinedConversionAnalysis.Operator.GetParameterType(0); 2074!TypeSymbol.Equals(conversion.BestUserDefinedConversionAnalysis.FromType, conversionParameterType, TypeCompareKind.ConsiderEverything2)) 2090TypeSymbol conversionReturnType = conversion.BestUserDefinedConversionAnalysis.Operator.ReturnType; 2091TypeSymbol conversionToType = conversion.BestUserDefinedConversionAnalysis.ToType; 2095!TypeSymbol.Equals(conversionToType, conversionReturnType, TypeCompareKind.ConsiderEverything2)) 2110if (conversionToType.IsNullableType() && TypeSymbol.Equals(conversionToType.GetNullableUnderlyingType(), conversionReturnType, TypeCompareKind.ConsiderEverything2)) 2169private BoundExpression CreateFunctionTypeConversion(SyntaxNode syntax, BoundExpression source, Conversion conversion, bool isCast, ConversionGroup? conversionGroup, TypeSymbol destination, BindingDiagnosticBag diagnostics) 2217private BoundExpression CreateAnonymousFunctionConversion(SyntaxNode syntax, BoundExpression source, Conversion conversion, bool isCast, ConversionGroup? conversionGroup, TypeSymbol destination, BindingDiagnosticBag diagnostics) 2244private BoundExpression CreateMethodGroupConversion(SyntaxNode syntax, BoundExpression source, Conversion conversion, bool isCast, ConversionGroup? conversionGroup, TypeSymbol destination, BindingDiagnosticBag diagnostics) 2266private static void CheckParameterModifierMismatchMethodConversion(SyntaxNode syntax, MethodSymbol lambdaOrMethod, TypeSymbol targetType, bool invokedAsExtensionMethod, BindingDiagnosticBag diagnostics) 2314private static void CheckLambdaConversion(LambdaSymbol lambdaSymbol, TypeSymbol targetType, BindingDiagnosticBag diagnostics) 2402private BoundExpression CreateStackAllocConversion(SyntaxNode syntax, BoundExpression source, Conversion conversion, bool isCast, ConversionGroup? conversionGroup, TypeSymbol destination, BindingDiagnosticBag diagnostics) 2407var elementType = boundStackAlloc.ElementType; 2408TypeSymbol stackAllocType; 2430private BoundExpression CreateTupleLiteralConversion(SyntaxNode syntax, BoundTupleLiteral sourceTuple, Conversion conversion, bool isCast, ConversionGroup? conversionGroup, TypeSymbol destination, BindingDiagnosticBag diagnostics) 2436var destinationWithoutNullable = destination; 2506if (!TypeSymbol.Equals(sourceTuple.Type, destination, TypeCompareKind.ConsiderEverything2)) 2814internal bool MethodIsCompatibleWithDelegateOrFunctionPointer(BoundExpression? receiverOpt, bool isExtensionMethod, MethodSymbol method, TypeSymbol delegateType, Location errorLocation, BindingDiagnosticBag diagnostics) 2886var methodReturnType = method.ReturnType; 2887var delegateReturnType = delegateOrFuncPtrMethod.ReturnType; 2933static bool hasConversion(TypeKind targetKind, Conversions conversions, TypeSymbol source, TypeSymbol destination, 3003TypeSymbol delegateOrFuncPtrType, 3099TypeSymbol destination, 3200TypeSymbol destination,
Binder\Binder_Crefs.cs (7)
498TypeSymbol returnType = BindCrefParameterOrReturnType(syntax.Type, syntax, diagnostics); 502symbol.Kind != SymbolKind.Method || TypeSymbol.Equals(((MethodSymbol)symbol).ReturnType, returnType, TypeCompareKind.ConsiderEverything2), returnType); 620if (containerType.Name == memberName && (hasParameterList || containerType.Arity == 0 || !TypeSymbol.Equals(this.ContainingType, containerType.OriginalDefinition, TypeCompareKind.ConsiderEverything2))) 751private static bool ContainsNestedTypeOfUnconstructedGenericType(TypeSymbol type) 1144TypeSymbol type = BindCrefParameterOrReturnType(parameter.Type, (MemberCrefSyntax)parameterListSyntax.Parent, diagnostics); 1155private TypeSymbol BindCrefParameterOrReturnType(TypeSyntax typeSyntax, MemberCrefSyntax memberCrefSyntax, BindingDiagnosticBag diagnostics) 1175TypeSymbol type = parameterOrReturnTypeBinder.BindType(typeSyntax, localDiagnostics).Type;
Binder\Binder_Deconstruct.cs (11)
128var type = boundRHS.Type ?? voidType; 159TypeSymbol returnType = hasErrors ? CreateErrorType() : lhsTuple.Type!; 220TypeSymbol? mergedTupleType = MakeMergedTupleType(checkedVariables, (BoundTupleLiteral)boundRHS, syntax, hadErrors ? null : diagnostics); 243TypeSymbol type, 251ImmutableArray<TypeSymbol> tupleOrDeconstructedTypes; 349private void SetInferredTypes(ArrayBuilder<DeconstructionVariable> variables, ImmutableArray<TypeSymbol> foundTypes, BindingDiagnosticBag diagnostics) 367private BoundExpression SetInferredType(BoundExpression expression, TypeSymbol type, BindingDiagnosticBag diagnostics) 471private TypeSymbol? MakeMergedTupleType(ArrayBuilder<DeconstructionVariable> lhsVariables, BoundTupleLiteral rhsLiteral, CSharpSyntaxNode syntax, BindingDiagnosticBag? diagnostics) 481TypeSymbol? mergedType = element.Type; 856var type = declTypeWithAnnotations.Type; 951Debug.Assert(TypeSymbol.Equals(declTypeWithAnnotations.Type, fieldType.Type, TypeCompareKind.ConsiderEverything2));
Binder\Binder_Expressions.cs (124)
217TypeSymbol resultType = expr.Type; 282internal BoundExpression BindToTypeForErrorRecovery(BoundExpression expression, TypeSymbol type = null) 287internal BoundExpression BindToTypeForErrorRecovery(BoundExpression expression, BindingDiagnosticBag diagnostics, TypeSymbol type = null) 315var commonType = expr.Type; 333TypeSymbol type = op.Type; 498TypeSymbol varType, 596TypeSymbol exprType = expr.Type; 876internal virtual BoundSwitchExpressionArm BindSwitchExpressionArm(SwitchExpressionArmSyntax node, TypeSymbol switchGoverningType, BindingDiagnosticBag diagnostics) 1253TypeSymbol typedReferenceType = this.Compilation.GetSpecialType(SpecialType.System_TypedReference); 1277TypeSymbol typedReferenceType = GetSpecialType(SpecialType.System_TypedReference, diagnostics, node); 1301TypeSymbol typedReferenceType = this.Compilation.GetSpecialType(SpecialType.System_TypedReference); 1302TypeSymbol typeType = this.GetWellKnownType(WellKnownType.System_Type, diagnostics, node); 1343TypeSymbol runtimeArgumentHandleType = GetSpecialType(SpecialType.System_RuntimeArgumentHandle, diagnostics, node); 1407TypeSymbol type = typeWithAnnotations.Type; 1435var type = typeWithAnnotations.Type; 1460TypeSymbol type = typeWithAnnotations.Type; 1577internal static bool CheckManagedAddr(CSharpCompilation compilation, TypeSymbol type, Location location, BindingDiagnosticBag diagnostics, bool errorForManaged = false) 1592internal static bool CheckManagedAddr(CSharpCompilation compilation, TypeSymbol type, ManagedKind managedKind, Location location, BindingDiagnosticBag diagnostics, bool errorForManaged = false) 1616internal static ConstantValue GetConstantSizeOf(TypeSymbol type) 1627TypeSymbol type = typeWithAnnotations.Type; 2032private bool IsBadLocalOrParameterCapture(Symbol symbol, TypeSymbol type, RefKind refKind) 2065TypeSymbol type = BindResultTypeForLocalVariableReference(node, localSymbol, diagnostics, out isNullableUnknown, out isTypeError); 2170return new BoundTypeExpression(node, null, (TypeSymbol)symbol, hasErrors: isError); 2198TypeSymbol typeSymbol => new BoundTypeExpression(node, alias, typeSymbol, hasErrors: isError), 2213private TypeSymbol BindResultTypeForLocalVariableReference(SimpleNameSyntax node, LocalSymbol localSymbol, BindingDiagnosticBag diagnostics, out bool isNullableUnknown, out bool isError) 2216TypeSymbol type; 2437TypeSymbol hostObjectType = Compilation.GetHostObjectTypeSymbol(); 2542var type = symbol as TypeSymbol; 2613TypeSymbol baseType = this.ContainingType is null ? null : this.ContainingType.BaseTypeNoUseSiteDiagnostics; 2645TypeSymbol targetType = targetTypeWithAnnotations.Type; 2651!TypeSymbol.Equals(targetType.GetNullableUnderlyingType(), operand.Type, TypeCompareKind.ConsiderEverything2)) 2669TypeSymbol intType = GetSpecialType(SpecialType.System_Int32, diagnostics, node); 2670TypeSymbol indexType = GetWellKnownType(WellKnownType.System_Index, diagnostics, node); 2706TypeSymbol rangeType = GetWellKnownType(WellKnownType.System_Range, diagnostics, node); 2777TypeSymbol indexType = GetWellKnownType(WellKnownType.System_Index, diagnostics, operand); 2807TypeSymbol targetType = targetTypeWithAnnotations.Type; 2828TypeSymbol targetType) 2965var targetElementType = targetElementTypesWithAnnotations[i].Type; 3237var type = declType.Type; 3337TypeSymbol fieldType = expressionVariableField.GetFieldType(this.FieldsBeingBound).Type; 3351internal static void CheckRestrictedTypeInAsyncMethod(Symbol containingSymbol, TypeSymbol type, BindingDiagnosticBag diagnostics, SyntaxNode syntax) 3724TypeSymbol handlerType, 3842TypeSymbol placeholderType; 4190TypeSymbol bestType = BestTypeInferrer.InferBestType(boundInitializerExpressions, this.Conversions, ref useSiteInfo, out _); 4217TypeSymbol bestType = BestTypeInferrer.InferBestType(boundInitializerExpressions, this.Conversions, ref useSiteInfo, out _); 4345TypeSymbol elemType = type.ElementType; 4583TypeSymbol type = GetStackAllocType(node, elementType, diagnostics, out bool hasErrors); 4666private TypeSymbol GetStackAllocType(SyntaxNode node, TypeWithAnnotations elementTypeWithAnnotations, BindingDiagnosticBag diagnostics, out bool hasErrors) 4726TypeSymbol type, 4727TypeSymbol elementType, 4906TypeSymbol constructorReturnType = constructor.ReturnType; 5031TypeSymbol constructorReturnType, 5264var type = typeWithAnnotations.Type; 5265var originalType = type; 5372var collectionType = enumeratorInfo.CollectionType; 5584private BoundExpression BindClassCreationExpression(ObjectCreationExpressionSyntax node, NamedTypeSymbol type, string typeName, BindingDiagnosticBag diagnostics, TypeSymbol initializerType = null) 5657private BoundExpression MakeBadExpressionForObjectCreation(ObjectCreationExpressionSyntax node, TypeSymbol type, AnalyzedArguments analyzedArguments, BindingDiagnosticBag diagnostics, bool wasCompilerGenerated = false) 5663private BoundExpression MakeBadExpressionForObjectCreation(SyntaxNode node, TypeSymbol type, AnalyzedArguments analyzedArguments, InitializerExpressionSyntax? initializerOpt, SyntaxNode? typeSyntax, BindingDiagnosticBag diagnostics, bool wasCompilerGenerated = false) 5683TypeSymbol type, 5715TypeSymbol type, 5737TypeSymbol initializerType, 5907var initializerType = implicitReceiver.Type; 6310TypeSymbol initializerType, 6364private bool CollectionInitializerTypeImplementsIEnumerable(TypeSymbol initializerType, CSharpSyntaxNode node, BindingDiagnosticBag diagnostics) 6402TypeSymbol initializerType, 6746TypeSymbol initializerTypeOpt = null, 6841TypeSymbol initializerTypeOpt, 6927TypeSymbol initializerTypeOpt, 6981private BoundObjectInitializerExpressionBase MakeBoundInitializerOpt(SyntaxNode typeNode, NamedTypeSymbol type, InitializerExpressionSyntax initializerSyntaxOpt, TypeSymbol initializerTypeOpt, BindingDiagnosticBag diagnostics) 7034Debug.Assert(TypeSymbol.Equals(interfaceType.ComImportCoClass, coClassType, TypeCompareKind.ConsiderEverything2)); 7432TypeSymbol type = null; 7518TypeSymbol pointedAtType; 7594TypeSymbol leftType = null; 7628if (TypeSymbol.Equals(boundType.Type, leftType, TypeCompareKind.AllIgnoreOptions)) 7653private bool IsPotentialColorColorReceiver(IdentifierNameSyntax id, TypeSymbol type) 7658TypeSymbol.Equals(BindNamespaceOrType(id, BindingDiagnosticBag.Discarded).Type, type, TypeCompareKind.AllIgnoreOptions); 7762TypeSymbol leftType = boundLeft.Type; 7977TypeSymbol leftType, 8170var leftType = boundLeft.Type; 8253private void LookupInstanceMember(LookupResult lookupResult, TypeSymbol leftType, bool leftIsBaseReference, string rightName, int rightArity, bool invoked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 8327private bool WouldUsingSystemFindExtension(TypeSymbol receiver, string methodName) 8339private bool ImplementsWinRTAsyncInterface(TypeSymbol type) 8344private bool IsWinRTAsyncInterface(TypeSymbol type) 8353TypeSymbol.Equals(namedType, Compilation.GetWellKnownType(WellKnownType.Windows_Foundation_IAsyncAction), TypeCompareKind.ConsiderEverything2) || 8354TypeSymbol.Equals(namedType, Compilation.GetWellKnownType(WellKnownType.Windows_Foundation_IAsyncActionWithProgress_T), TypeCompareKind.ConsiderEverything2) || 8355TypeSymbol.Equals(namedType, Compilation.GetWellKnownType(WellKnownType.Windows_Foundation_IAsyncOperation_T), TypeCompareKind.ConsiderEverything2) || 8356TypeSymbol.Equals(namedType, Compilation.GetWellKnownType(WellKnownType.Windows_Foundation_IAsyncOperationWithProgress_T2), TypeCompareKind.ConsiderEverything2); 8415private TypeSymbol GetNonMethodMemberType(Symbol symbolOpt) 8417TypeSymbol resultType = null; 8617TypeSymbol? returnType, 8697TypeSymbol? returnType, 8807TypeSymbol? returnType, 8827TypeSymbol? receiverType = left.Type; 9012TypeSymbol receiverType = receiver.Type; 9081TypeSymbol fieldType = fieldSymbol.GetFieldType(this.FieldsBeingBound).Type; 9104private TypeSymbol GetAdjustedTypeForEnumMemberReference(FieldSymbol fieldSymbol, TypeSymbol fieldType) 9182Debug.Assert(symbol is not TypeSymbol); 9230return !symbol.IsStatic && !(symbol is TypeSymbol) && 9512if (!TypeSymbol.IsInlineArrayElementFieldSupported(elementField)) 9537{ Code: (int)ErrorCode.ERR_BadIndexLHS, Arguments: [TypeSymbol type] } && type.Equals(expr.Type, TypeCompareKind.ConsiderEverything)) 9674TypeSymbol resultType; 9715if (TypeSymbol.Equals(convertedIndex.Type, compilation.GetWellKnownType(WellKnownType.System_Index), TypeCompareKind.AllIgnoreOptions)) 9766var exprType = expr.Type; 9847TypeSymbol resultType = indexOrRangeWellknownType == WellKnownType.System_Range 9943TypeSymbol type = GetWellKnownType(wellKnownType, ref useSiteInfo); 9965TypeSymbol type = GetSpecialType(specialType, attemptDiagnostics, node); 9978private BoundExpression TryImplicitConversionToArrayIndex(BoundExpression expr, TypeSymbol targetType, SyntaxNode node, BindingDiagnosticBag diagnostics) 10022TypeSymbol pointedAtType = pointerType.PointedAtType; 10388var argType = argument.Type; 10390TypeSymbol.Equals(argType, Compilation.GetWellKnownType(WellKnownType.System_Index), TypeCompareKind.ConsiderEverything) ? ThreeState.True : 10391TypeSymbol.Equals(argType, Compilation.GetWellKnownType(WellKnownType.System_Range), TypeCompareKind.ConsiderEverything) ? ThreeState.False : 10653TypeSymbol receiverType, 10704TypeSymbol propertyType = GetCommonTypeOrReturnType(propertyGroup) ?? CreateErrorType(); 10731TypeSymbol returnType = null, 10755TypeSymbol returnType = null, 10787TypeSymbol returnType = null, 10858TypeSymbol returnType = null, 11429internal static bool ReportDelegateInvokeUseSiteDiagnostic(BindingDiagnosticBag diagnostics, TypeSymbol possibleDelegateType, 11485var receiverType = receiver.Type; 11494var accessType = access.Type; 11630var receiverType = receiver.Type; 11661var receiverType = receiver.Type;
Binder\Binder_Initializers.cs (3)
147Debug.Assert((ContainingMemberOrLambda is TypeSymbol containing && TypeSymbol.Equals(containing, fieldSymbol.ContainingType, TypeCompareKind.ConsiderEverything2)) || //should be the binder for the type 261var submissionResultType = scriptInitializer.ResultType;
Binder\Binder_InterpolatedString.cs (6)
336TypeSymbol destination, 519Func<BoundUnconvertedInterpolatedString, int, (ImmutableArray<ImmutableArray<BoundExpression>>, TypeSymbol), BoundExpression> interpolationFactory = 521Func<BoundBinaryOperator, BoundExpression, BoundExpression, (ImmutableArray<ImmutableArray<BoundExpression>>, TypeSymbol), BoundExpression> binaryOperatorFactory = 528static BoundInterpolatedString createInterpolation(BoundUnconvertedInterpolatedString expression, int i, (ImmutableArray<ImmutableArray<BoundExpression>> AppendCalls, TypeSymbol _) arg) 540static BoundBinaryOperator createBinaryOperator(BoundBinaryOperator original, BoundExpression left, BoundExpression right, (ImmutableArray<ImmutableArray<BoundExpression>> _, TypeSymbol @string) arg) 674TypeSymbol objectType = GetSpecialType(SpecialType.System_Object, diagnostics, syntax);
Binder\Binder_Invocation.cs (23)
276TypeSymbol objType = GetSpecialType(SpecialType.System_Object, diagnostics, node); 1090if (call.ReceiverOpt.Type.IsRestrictedType() && !call.Method.ContainingType.IsInterface && !TypeSymbol.Equals(call.Method.ContainingType, call.ReceiverOpt.Type, TypeCompareKind.ConsiderEverything2)) 1210var returnType = methodResult.Member.ReturnType; 1429var parameterType = parameter.Type; 1666TypeSymbol parameterType = parameter.Type; 1735TypeSymbol constantType = Compilation.GetSpecialType(defaultConstantValue.SpecialType); 1836TypeSymbol collectionType = paramsParameter.Type; 1841TypeSymbol int32Type = GetSpecialType(SpecialType.System_Int32, diagnostics, node); 1906TypeSymbol.Equals(containingMethod.ContainingType, method.ContainingType, TypeCompareKind.ConsiderEverything) && 2074var returnType = GetCommonTypeOrReturnType(methods) ?? new ExtendedErrorTypeSymbol(this.Compilation, string.Empty, arity: 0, errorInfo: null); 2075var methodContainer = (object)receiver != null && (object)receiver.Type != null 2180var parameterType = GetCorrespondingParameterType(analyzedArguments, i, parameterList); 2204var candidateType = getCorrespondingParameterType(i); 2251TypeSymbol getCorrespondingParameterType(int i) 2254TypeSymbol candidateType = null; 2257var parameterType = GetCorrespondingParameterType(analyzedArguments, i, parameterList); 2285private static TypeSymbol GetCorrespondingParameterType(AnalyzedArguments analyzedArguments, int i, ImmutableArray<ParameterSymbol> parameterList) 2317TypeSymbol returnType = new ExtendedErrorTypeSymbol(this.Compilation, string.Empty, arity: 0, errorInfo: null); 2318var methodContainer = expr.Type ?? this.ContainingType; 2329private static TypeSymbol GetCommonTypeOrReturnType<TMember>(ImmutableArray<TMember> members) 2332TypeSymbol type = null; 2335TypeSymbol returnType = members[i].GetTypeOrReturnType().Type; 2340else if (!TypeSymbol.Equals(type, returnType, TypeCompareKind.ConsiderEverything2))
Binder\Binder_Lambda.cs (1)
304var type = returnType.Type;
Binder\Binder_Lookup.cs (80)
32ConsList<TypeSymbol> basesBeingResolved, 67private Binder LookupSymbolsWithFallback(LookupResult result, string name, int arity, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, ConsList<TypeSymbol> basesBeingResolved = null, LookupOptions options = LookupOptions.Default) 88LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 122LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 136ConsList<TypeSymbol> basesBeingResolved, 154private void LookupMembersWithFallback(LookupResult result, NamespaceOrTypeSymbol nsOrType, string name, int arity, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, ConsList<TypeSymbol> basesBeingResolved = null, LookupOptions options = LookupOptions.Default) 170protected void LookupMembersInternal(LookupResult result, NamespaceOrTypeSymbol nsOrType, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 181this.LookupMembersInType(result, (TypeSymbol)nsOrType, name, arity, basesBeingResolved, options, originalBinder, diagnose, ref useSiteInfo); 252protected void LookupMembersInType(LookupResult result, TypeSymbol type, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 293private void LookupMembersInErrorType(LookupResult result, ErrorTypeSymbol errorType, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 302TypeSymbol candidateType = errorType.CandidateSymbols.First() as TypeSymbol; 328protected void LookupMembersInSubmissions(LookupResult result, TypeSymbol submissionClass, CompilationUnitSyntax declarationSyntax, bool inUsings, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, 477ConsList<TypeSymbol> basesBeingResolved, 544ConsList<TypeSymbol> basesBeingResolved, 837protected static void LookupMembersWithoutInheritance(LookupResult result, TypeSymbol type, string name, int arity, 838LookupOptions options, Binder originalBinder, TypeSymbol accessThroughType, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, ConsList<TypeSymbol> basesBeingResolved) 854TypeSymbol type, 857ConsList<TypeSymbol> basesBeingResolved, 869TypeSymbol type, 872ConsList<TypeSymbol> basesBeingResolved, 875TypeSymbol accessThroughType, 882TypeSymbol currentType = type; 1050TypeSymbol.Equals(iFaceOriginal, idictSymbol, TypeCompareKind.ConsiderEverything2) || 1053TypeSymbol.Equals(iFaceOriginal, iroDictSymbol, TypeCompareKind.ConsiderEverything2) || 1055TypeSymbol.Equals(iFaceOriginal, iListSymbol, TypeCompareKind.ConsiderEverything2) || 1056TypeSymbol.Equals(iFaceOriginal, iCollectionSymbol, TypeCompareKind.ConsiderEverything2) || 1057TypeSymbol.Equals(iFaceOriginal, inccSymbol, TypeCompareKind.ConsiderEverything2) || 1058TypeSymbol.Equals(iFaceOriginal, inpcSymbol, TypeCompareKind.ConsiderEverything2); 1062private static Symbol GetNearestOtherSymbol(ConsList<TypeSymbol> list, TypeSymbol type) 1064TypeSymbol other = type; 1066for (; list != null && list != ConsList<TypeSymbol>.Empty; list = list.Tail) 1068if (TypeSymbol.Equals(list.Head, type.OriginalDefinition, TypeCompareKind.ConsiderEverything2)) 1070if (TypeSymbol.Equals(other, type, TypeCompareKind.ConsiderEverything2) && list.Tail != null && list.Tail != ConsList<TypeSymbol>.Empty) 1091ConsList<TypeSymbol> basesBeingResolved, 1094TypeSymbol accessThroughType, 1103((options & LookupOptions.NamespacesOrTypesOnly) == 0 || !(current.IsSingleViable && TypeSymbol.Equals(current.SingleSymbolOrDefault.ContainingType, type, TypeCompareKind.AllIgnoreOptions)))) // The nested type will shadow everything from bases 1110private static ImmutableArray<NamedTypeSymbol> GetBaseInterfaces(NamedTypeSymbol type, ConsList<TypeSymbol> basesBeingResolved, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1163static void addAllInterfaces(NamedTypeSymbol @interface, HashSet<NamedTypeSymbol> visited, ArrayBuilder<NamedTypeSymbol> result, ConsList<TypeSymbol> basesBeingResolved, ConsList<NamedTypeSymbol> cycleGuard) 1194ConsList<TypeSymbol> basesBeingResolved, 1197TypeSymbol accessThroughType, 1224private void LookupMembersInInterface(LookupResult current, NamedTypeSymbol type, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1242private void LookupMembersInTypeParameter(LookupResult current, TypeParameterSymbol typeParameter, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1261private static bool IsDerivedType(NamedTypeSymbol baseType, NamedTypeSymbol derivedType, ConsList<TypeSymbol> basesBeingResolved, CSharpCompilation compilation, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1263Debug.Assert(!TypeSymbol.Equals(baseType, derivedType, TypeCompareKind.ConsiderEverything2)); 1269if (TypeSymbol.Equals(b, baseType, TypeCompareKind.ConsiderEverything2)) return true; 1282if (TypeSymbol.Equals(b, baseType, TypeCompareKind.ConsiderEverything2)) 1298private void MergeHidingLookupResults(LookupResult resultHiding, LookupResult resultHidden, ConsList<TypeSymbol> basesBeingResolved, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1369if ((options & LookupOptions.NamespacesOrTypesOnly) != 0 && nsOrType is TypeSymbol) 1393if ((options & LookupOptions.NamespacesOrTypesOnly) != 0 && nsOrType is TypeSymbol) 1459internal SingleLookupResult CheckViability(Symbol symbol, int arity, LookupOptions options, TypeSymbol accessThroughType, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, ConsList<TypeSymbol> basesBeingResolved = null) 1490(unwrappedSymbol is not TypeSymbol && IsInstance(unwrappedSymbol) || !(unwrappedSymbol.IsAbstract || unwrappedSymbol.IsVirtual))) 1657internal bool CanAddLookupSymbolInfo(Symbol symbol, LookupOptions options, LookupSymbolsInfo info, TypeSymbol accessThroughType, AliasSymbol aliasSymbol = null) 1709private static TypeSymbol RefineAccessThroughType(LookupOptions options, TypeSymbol accessThroughType) 1745internal bool IsAccessible(Symbol symbol, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, TypeSymbol accessThroughType = null, ConsList<TypeSymbol> basesBeingResolved = null) 1764internal bool IsAccessible(Symbol symbol, TypeSymbol accessThroughType, out bool failedThroughTypeCheck, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, ConsList<TypeSymbol> basesBeingResolved = null) 1776/// Should only be called by <see cref="IsAccessible(Symbol, TypeSymbol, out bool, ref CompoundUseSiteInfo{AssemblySymbol}, ConsList{TypeSymbol})"/>, 1779internal virtual bool IsAccessibleHelper(Symbol symbol, TypeSymbol accessThroughType, out bool failedThroughTypeCheck, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, ConsList<TypeSymbol> basesBeingResolved) 1806TypeSymbol type = null; 1937this.AddMemberLookupSymbolsInfoInType(result, (TypeSymbol)nsOrType, options, originalBinder); 1941private void AddMemberLookupSymbolsInfoInType(LookupSymbolsInfo result, TypeSymbol type, LookupOptions options, Binder originalBinder) 1965protected void AddMemberLookupSymbolsInfoInSubmissions(LookupSymbolsInfo result, TypeSymbol scriptClass, bool inUsings, LookupOptions options, Binder originalBinder) 2038private static void AddMemberLookupSymbolsInfoWithoutInheritance(LookupSymbolsInfo result, TypeSymbol type, LookupOptions options, Binder originalBinder, TypeSymbol accessThroughType) 2050private void AddWinRTMembersLookupSymbolsInfo(LookupSymbolsInfo result, NamedTypeSymbol type, LookupOptions options, Binder originalBinder, TypeSymbol accessThroughType) 2065private void AddMemberLookupSymbolsInfoInClass(LookupSymbolsInfo result, TypeSymbol type, LookupOptions options, Binder originalBinder, TypeSymbol accessThroughType) 2096private void AddMemberLookupSymbolsInfoInInterface(LookupSymbolsInfo result, TypeSymbol type, LookupOptions options, Binder originalBinder, TypeSymbol accessThroughType)
Binder\Binder_Operators.cs (73)
271var leftType = left.Type; 344var leftType = left.Type; 387var leftType = left.Type; 438var leftType = left.Type; 564TypeSymbol getResultType(ExpressionSyntax node, TypeSymbol leftType, BindingDiagnosticBag diagnostics) 702TypeSymbol delegateType = left.Type; 721TypeSymbol type; 782TypeSymbol type = operand.Type; 956TypeSymbol leftType = left.Type; 957TypeSymbol rightType = right.Type; 1070TypeSymbol resultType = signature.ReturnType; 1199TypeSymbol leftType = left.Type; 1200TypeSymbol rightType = right.Type; 1386bool isReadOnlySpanOfByte(TypeSymbol? type) 1603var type = left.Type; 1660TypeSymbol parameterType = userDefinedOperator.Parameters[0].Type; 1774bool typesAreSame = TypeSymbol.Equals(signature.LeftType, signature.RightType, TypeCompareKind.ConsiderEverything2) && TypeSymbol.Equals(signature.LeftType, signature.ReturnType, TypeCompareKind.ConsiderEverything2); 1776bool typeMatchesContainer = TypeSymbol.Equals(signature.ReturnType.StrippedType(), t, TypeCompareKind.ConsiderEverything2) || 1932if (!TypeSymbol.Equals(signature.LeftType, signature.RightType, TypeCompareKind.AllIgnoreOptions) || 1933!TypeSymbol.Equals(signature.LeftType, signature.ReturnType, TypeCompareKind.AllIgnoreOptions)) 2023private TypeSymbol GetBinaryOperatorErrorType(BinaryOperatorKind kind, BindingDiagnosticBag diagnostics, CSharpSyntaxNode node) 2399static bool isNuint(TypeSymbol type) 2641internal static TypeSymbol GetEnumType(BinaryOperatorKind kind, BoundExpression left, BoundExpression right) 2693TypeSymbol resultTypeSymbol, 2706TypeSymbol enumType = GetEnumType(kind, left, right); 2707TypeSymbol underlyingType = enumType.GetEnumUnderlyingType()!; 2717TypeSymbol operandType = (operandSpecialType == underlyingType.SpecialType) ? 2753TypeSymbol resultType = kind == BinaryOperatorKind.EnumSubtraction ? underlyingType : enumType; 2768TypeSymbol resultTypeSymbol, 3284var operandType = operand.Type; 3438var operandType = operand.Type; 3528var operandType = operand.Type; 3655TypeSymbol getResultType(ExpressionSyntax node, TypeSymbol operandType, InstanceUserDefinedIncrementUsageMode mode, BindingDiagnosticBag diagnostics) 3779private ArrayBuilder<MethodSymbol>? LookupUserDefinedInstanceOperators(TypeSymbol lookupInType, string? checkedName, string ordinaryName, int parameterCount, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 3976private bool CheckConstraintLanguageVersionAndRuntimeSupportForOperator(SyntaxNode node, MethodSymbol? methodOpt, bool isUnsignedRightShift, TypeSymbol? constrainedToTypeOpt, BindingDiagnosticBag diagnostics) 4067TypeSymbol pointedAtType; 4074private static void BindPointerIndirectionExpressionInternal(CSharpSyntaxNode node, BoundExpression operand, BindingDiagnosticBag diagnostics, out TypeSymbol pointedAtType, out bool hasErrors) 4131TypeSymbol operandType = operand.Type; 4153TypeSymbol pointerType = new PointerTypeSymbol(TypeWithAnnotations.Create(operandType)); 4394var resultType = signature.ReturnType; 4451TypeSymbol resultTypeSymbol, 4795private bool IsOperatorErrors(CSharpSyntaxNode node, TypeSymbol operandType, BoundTypeExpression typeExpression, BindingDiagnosticBag diagnostics) 4797var targetType = typeExpression.Type; 4824var resultType = (TypeSymbol)GetSpecialType(SpecialType.System_Boolean, diagnostics, node); 4866var targetType = typeExpression.Type; 4925var operandType = operand.Type; 4946TypeSymbol targetType = targetTypeWithAnnotations.Type; 4956TypeSymbol operandType, 4957TypeSymbol targetType, 4991TypeSymbol operandType, 4992TypeSymbol targetType, 5298TypeSymbol targetType = targetTypeWithAnnotations.Type; 5301var resultType = targetType; 5402var operandType = operand.Type; 5453TypeSymbol operandType, 5454TypeSymbol targetType, 5515TypeSymbol operandType, 5516TypeSymbol targetType, 5546internal static ConstantValue GetAsOperatorConstantResult(TypeSymbol operandType, TypeSymbol targetType, ConversionKind conversionKind, ConstantValue operandConstantValue) 5614TypeSymbol optLeftType = leftOperand.Type; // "A" 5615TypeSymbol optRightType = rightOperand.Type; // "B" 5617TypeSymbol optLeftType0 = isLeftNullable ? // "A0" 5790TypeSymbol leftType = leftOperand.Type; 5806var underlyingLeftType = leftType.GetNullableUnderlyingType(); 5909TypeSymbol? bestType = BestTypeInferrer.InferBestTypeForConditionalOperator(trueExpr, falseExpr, this.Conversions, out bool hadMultipleCandidates, ref useSiteInfo); 5949TypeSymbol trueType = trueExpr.Type; 5950TypeSymbol falseType = falseExpr.Type; 5952TypeSymbol type;
Binder\Binder_Patterns.cs (70)
25TypeSymbol? expressionType = expression.Type; 50TypeSymbol boolType, 177TypeSymbol inputType, 203TypeSymbol inputType, 215TypeSymbol inputType, 239TypeSymbol sliceType; 272TypeSymbol inputType, 273TypeSymbol elementType, 302TypeSymbol inputType, 309TypeSymbol elementType; 312TypeSymbol narrowedType = inputType.StrippedType(); 358private bool IsCountableAndIndexable(SyntaxNode node, TypeSymbol inputType, out PropertySymbol? lengthProperty) 366private bool BindLengthAndIndexerForListPattern(SyntaxNode node, TypeSymbol inputType, BindingDiagnosticBag diagnostics, 413private static BoundPattern BindDiscardPattern(DiscardPatternSyntax node, TypeSymbol inputType, BindingDiagnosticBag diagnostics) 421TypeSymbol inputType, 431TypeSymbol inputType, 439var convertedType = convertedExpression.Type ?? inputType; 465private bool ShouldBlockINumberBaseConversion(Conversion patternConversion, TypeSymbol inputType) 510TypeSymbol inputType, 538TypeSymbol inputType, 556TypeSymbol inputType, 572var strippedInputType = inputType.StrippedType(); 600TypeSymbol inputType, 735TypeSymbol inputType, 736TypeSymbol patternType, 816TypeSymbol expressionType, 817TypeSymbol patternType, 850TypeSymbol inputType, 865TypeSymbol inputType, 940TypeSymbol inputType, 961internal static bool IsZeroElementTupleType(TypeSymbol type) 970TypeSymbol inputType, 986TypeSymbol declType = declTypeWithAnnotations.Type; 1079TypeSymbol elementType = isError ? CreateErrorType() : outPlaceholders[i].Type; 1167TypeSymbol declType, 1184TypeSymbol elementType = isError ? CreateErrorType() : elementTypesWithAnnotations[i].Type; 1209TypeSymbol declType, 1247TypeSymbol declType, 1296bool hasBaseInterface(TypeSymbol type, NamedTypeSymbol possibleBaseInterface) 1330TypeSymbol inputType, 1356TypeSymbol inputType, 1389var strippedInputType = inputType.StrippedType(); 1434TypeSymbol elementType = isError ? CreateErrorType() : outPlaceholders[i].Type; 1457TypeSymbol elementType = isError ? CreateErrorType() : elementTypes[i].Type; 1472TypeSymbol inputType, 1486TypeSymbol memberType; 1505TypeSymbol receiverType = member.Receiver?.Type ?? inputType; 1522TypeSymbol inputType, ExpressionSyntax expr, BindingDiagnosticBag diagnostics, ref bool hasErrors) 1541TypeSymbol memberType = symbol switch 1552TypeSymbol inputType, 1624TypeSymbol inputType, 1637TypeSymbol inputType, 1645var type = value.Type ?? inputType; 1707internal static BinaryOperatorKind RelationalOperatorType(TypeSymbol type) => type.SpecialType switch 1730TypeSymbol inputType, 1744TypeSymbol inputType, 1765var narrowedTypeCandidates = ArrayBuilder<TypeSymbol>.GetInstance(2); 1790TypeSymbol inputType, 1791ArrayBuilder<TypeSymbol> narrowedTypeCandidates, 1805var narrowedType = leastSpecificType(node, narrowedTypeCandidates, diagnostics) ?? inputType; 1809TypeSymbol? leastSpecificType(SyntaxNode node, ArrayBuilder<TypeSymbol> candidates, BindingDiagnosticBag diagnostics) 1813TypeSymbol? bestSoFar = candidates[0]; 1817TypeSymbol candidate = candidates[i]; 1823TypeSymbol candidate = candidates[i]; 1824TypeSymbol? spoiler = lessSpecificCandidate(candidate, bestSoFar, ref useSiteInfo); 1840TypeSymbol? lessSpecificCandidate(TypeSymbol bestSoFar, TypeSymbol possiblyLessSpecificCandidate, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1875static void collectCandidates(BoundPattern pat, ArrayBuilder<TypeSymbol> candidates)
Binder\Binder_Query.cs (1)
832private 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 (37)
237TypeSymbol elementType = GetIteratorElementType().Type; 407var type = boundExpr.Type; 1027TypeSymbol initializerType = initializerOpt?.Type; 1227private bool IsValidFixedVariableInitializer(TypeSymbol declType, ref BoundExpression initializerOpt, BindingDiagnosticBag diagnostics) 1237TypeSymbol initializerType = initializerOpt.Type; 1246TypeSymbol elementType; 1360TypeSymbol elementType, 1361TypeSymbol declType, 1370TypeSymbol pointerType = new PointerTypeSymbol(TypeWithAnnotations.Create(elementType)); 1464var inferredType = op2.Type; 1529TypeSymbol type; 1814TypeSymbol.Equals(sourceProperty.ContainingType, fromMember.ContainingType, TypeCompareKind.AllIgnoreOptions) && 1845private TypeSymbol GetAccessThroughType(BoundExpression receiver) 1866TypeSymbol destinationType, 1961internal BoundExpression GenerateConversionForAssignment(TypeSymbol targetType, BoundExpression expression, BindingDiagnosticBag diagnostics, ConversionForAssignmentFlags flags = ConversionForAssignmentFlags.None) 1964internal BoundExpression GenerateConversionForAssignment(TypeSymbol targetType, BoundExpression expression, BindingDiagnosticBag diagnostics, out Conversion conversion, ConversionForAssignmentFlags flags = ConversionForAssignmentFlags.None) 2044UnboundLambda anonymousFunction, TypeSymbol targetType) 2236var lambdaParameterType = anonymousFunction.ParameterType(i); 2243var delegateParameterType = delegateParameters[i].Type; 2277Conversion conversion, TypeSymbol sourceType, TypeSymbol targetType, ConstantValue sourceConstantValueOpt = null) 2328else if (TypeSymbol.Equals(sourceType, targetType, TypeCompareKind.ConsiderEverything2)) 2349TypeSymbol targetType) 2478var sourceType = operand.Type; 2567var targetElementType = targetElementTypes[i].Type; 3012protected virtual TypeSymbol GetCurrentReturnType(out RefKind refKind) 3019TypeSymbol returnType = symbol.ReturnType; 3054TypeSymbol retType = GetCurrentReturnType(out sigRefKind); 3146var requiredType = IsEffectivelyGenericTaskReturningAsyncMethod() 3177TypeSymbol returnType) 3226&& TypeSymbol.Equals(argument.Type, this.GetCurrentReturnType(out unusedRefKind), TypeCompareKind.ConsiderEverything2)) 3286TypeSymbol type = null; 3305TypeSymbol effectiveType = type.EffectiveType(ref useSiteInfo); 3335var previousType = previousBlock.ExceptionTypeOpt; 3359else if (TypeSymbol.Equals(previousType, Compilation.GetWellKnownType(WellKnownType.System_Exception), TypeCompareKind.ConsiderEverything2) && 3382Debug.Assert(local.Type.IsErrorType() || (TypeSymbol.Equals(local.Type, type, TypeCompareKind.ConsiderEverything2))); 3497var returnType = GetCurrentReturnType(out returnRefKind);
Binder\Binder_Symbols.cs (33)
186/// Otherwise, call <see cref="Binder.BindTypeOrAlias(ExpressionSyntax, BindingDiagnosticBag, ConsList{TypeSymbol}, bool)"/> instead. 261var type = UnwrapAlias(symbol, diagnostics, syntax) as TypeSymbol; 303internal TypeWithAnnotations BindType(ExpressionSyntax syntax, BindingDiagnosticBag diagnostics, ConsList<TypeSymbol> basesBeingResolved = null, bool suppressUseSiteDiagnostics = false) 312internal TypeWithAnnotations BindType(ExpressionSyntax syntax, BindingDiagnosticBag diagnostics, out AliasSymbol alias, ConsList<TypeSymbol> basesBeingResolved = null) 321internal NamespaceOrTypeOrAliasSymbolWithAnnotations BindTypeOrAlias(ExpressionSyntax syntax, BindingDiagnosticBag diagnostics, ConsList<TypeSymbol> basesBeingResolved = null, bool suppressUseSiteDiagnostics = false) 329(symbol.IsAlias && UnwrapAliasNoDiagnostics(symbol.Symbol, basesBeingResolved) is TypeSymbol)) 384internal NamespaceOrTypeOrAliasSymbolWithAnnotations BindNamespaceOrTypeSymbol(ExpressionSyntax syntax, BindingDiagnosticBag diagnostics, ConsList<TypeSymbol> basesBeingResolved = null) 394internal NamespaceOrTypeOrAliasSymbolWithAnnotations BindNamespaceOrTypeSymbol(ExpressionSyntax syntax, BindingDiagnosticBag diagnostics, ConsList<TypeSymbol> basesBeingResolved, bool suppressUseSiteDiagnostics) 408/// <see cref="BindQualifiedName(ExpressionSyntax, SimpleNameSyntax, BindingDiagnosticBag, ConsList{TypeSymbol}, bool)"/> 417internal NamespaceOrTypeOrAliasSymbolWithAnnotations BindNamespaceOrTypeOrAliasSymbol(ExpressionSyntax syntax, BindingDiagnosticBag diagnostics, ConsList<TypeSymbol> basesBeingResolved, bool suppressUseSiteDiagnostics) 640ConsList<TypeSymbol> basesBeingResolved, 685private TypeSymbol BindTupleType(TupleTypeSyntax syntax, BindingDiagnosticBag diagnostics, ConsList<TypeSymbol> basesBeingResolved) 829ConsList<TypeSymbol> basesBeingResolved, 856ConsList<TypeSymbol> basesBeingResolved, 920if (aliasTarget is TypeSymbol type) 1093private static Symbol UnwrapAliasNoDiagnostics(Symbol symbol, ConsList<TypeSymbol> basesBeingResolved = null) 1103private NamespaceOrTypeOrAliasSymbolWithAnnotations UnwrapAlias(in NamespaceOrTypeOrAliasSymbolWithAnnotations symbol, BindingDiagnosticBag diagnostics, SyntaxNode syntax, ConsList<TypeSymbol> basesBeingResolved = null) 1114private NamespaceOrTypeOrAliasSymbolWithAnnotations UnwrapAlias(in NamespaceOrTypeOrAliasSymbolWithAnnotations symbol, out AliasSymbol alias, BindingDiagnosticBag diagnostics, SyntaxNode syntax, ConsList<TypeSymbol> basesBeingResolved = null) 1125private Symbol UnwrapAlias(Symbol symbol, BindingDiagnosticBag diagnostics, SyntaxNode syntax, ConsList<TypeSymbol> basesBeingResolved = null) 1131private Symbol UnwrapAlias(Symbol symbol, out AliasSymbol alias, BindingDiagnosticBag diagnostics, SyntaxNode syntax, ConsList<TypeSymbol> basesBeingResolved = null) 1140var type = result as TypeSymbol; 1162ConsList<TypeSymbol> basesBeingResolved, 1270ConsList<TypeSymbol> basesBeingResolved, 1346private ImmutableArray<TypeWithAnnotations> BindTypeArguments(SeparatedSyntaxList<TypeSyntax> typeArguments, BindingDiagnosticBag diagnostics, ConsList<TypeSymbol> basesBeingResolved = null) 1358private TypeWithAnnotations BindTypeArgument(TypeSyntax typeArgument, BindingDiagnosticBag diagnostics, ConsList<TypeSymbol> basesBeingResolved = null) 1543ArrayBuilder<Symbol> members, TypeSymbol receiverType, 1622ConsList<TypeSymbol> basesBeingResolved, 1654ConsList<TypeSymbol> basesBeingResolved, 2317var 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; 126private void PrepareBoolConversionAndTruthOperator(TypeSymbol type, BinaryExpressionSyntax node, BinaryOperatorKind binaryOperator, BindingDiagnosticBag diagnostics, 132TypeSymbol boolean = GetSpecialType(SpecialType.System_Boolean, diagnostics, node); 198TypeSymbol dynamicType = hasError ? CreateErrorType() : Compilation.DynamicType; 258TypeSymbol leftTupleType = MakeConvertedType(operators.SelectAsArray(o => o.LeftConvertedTypeOpt), node.Left, leftParts, leftNames, isNullable, compilation, diagnostics); 259TypeSymbol rightTupleType = MakeConvertedType(operators.SelectAsArray(o => o.RightConvertedTypeOpt), node.Right, rightParts, rightNames, isNullable, compilation, diagnostics); 332internal static BoundExpression GiveTupleTypeToDefaultLiteralIfNeeded(BoundExpression expr, TypeSymbol targetType) 363TypeSymbol type = expr.Type; 390TypeSymbol tupleType = expr.Type.StrippedType(); 402private TypeSymbol MakeConvertedType(ImmutableArray<TypeSymbol> convertedTypes, CSharpSyntaxNode syntax, 406foreach (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)
418bool isDerivedType(TypeSymbol possibleDerived, TypeSymbol possibleBase) 443TypeSymbol? type = declaration.DeclaredType?.Type; 470TypeSymbol type = typePattern.DeclaredType.Type; 497TypeSymbol type, 504TypeSymbol inputType = input.Type.StrippedType(); // since a null check has already been done 569var inputType = recursive.DeclaredType?.Type ?? input.Type.StrippedType(); 756var type = rel.Value.Type ?? input.Type; 775private TypeSymbol ErrorType(string name = "") 1584TypeSymbol expressionType, 1585TypeSymbol patternType, 1593static bool isRuntimeSimilar(TypeSymbol expressionType, TypeSymbol patternType) 1600TypeSymbol e1 = array1.ElementType.EnumUnderlyingTypeOrSelf(); 1601TypeSymbol e2 = array2.ElementType.EnumUnderlyingTypeOrSelf();
Binder\DecisionDagBuilder_CheckOrReachability.cs (9)
625/// It is turned back into a BoundPattern by <see cref="GetResult(TypeSymbol)"/>. 707internal static BoundPattern Rewrite(BoundPattern pattern, TypeSymbol inputType) 719private BoundPattern GetResult(TypeSymbol inputType) 734TypeSymbol narrowedType = narrowedTypeForBinary(left, right, disjunction); 767static TypeSymbol narrowedTypeForBinary(BoundPattern resultLeft, BoundPattern resultRight, bool resultDisjunction) 769TypeSymbol narrowedType; 970private static BoundPattern WithInputTypeCheckIfNeeded(BoundPattern pattern, TypeSymbol inputType) 1007var narrowedType = constantPattern.ConstantValue.IsNull ? inputType : constantPattern.NarrowedType; 1397private static BoundDiscardPattern MakeDiscardPattern(SyntaxNode syntax, TypeSymbol inputType)
Binder\ExecutableCodeBinder.cs (1)
140var returnType = iterator.ReturnType;
Binder\ForEachEnumeratorInfo.cs (5)
18public readonly TypeSymbol CollectionType; 25public TypeSymbol ElementType => ElementTypeWithAnnotations.Type; 57TypeSymbol collectionType, 105public TypeSymbol CollectionType; 110public TypeSymbol ElementType => ElementTypeWithAnnotations.Type;
Binder\ForEachLoopBinder.cs (28)
539TypeSymbol getEnumeratorType = getEnumeratorMethod.ReturnType; 613var awaitableType = builder.PatternDisposeInfo is null 641TypeSymbol collectionType, 718TypeSymbol collectionExprType = collectionExpr.Type; 795TypeSymbol collectionExprType = collectionExpr.Type; 863if (!TypeSymbol.IsInlineArrayElementFieldSupported(elementField)) 937TypeSymbol collectionExprType = collectionExpr.Type; 977var unwrappedCollectionExprType = unwrappedCollectionExpr.Type; 1065private EnumeratorResult SatisfiesIEnumerableInterfaces(SyntaxNode collectionSyntax, ref ForEachEnumeratorInfo.Builder builder, BoundExpression collectionExpr, bool isAsync, BindingDiagnosticBag diagnostics, TypeSymbol unwrappedCollectionExprType) 1125TypeSymbol enumeratorType = specificGetEnumeratorMethod.ReturnType; 1199TypeSymbol enumeratorType = builder.GetEnumeratorInfo.Method.ReturnType; 1264bool implementsInterface(TypeSymbol collectionType, TypeSymbol enumeratorType, bool isAsync, BindingDiagnosticBag diagnostics) 1288private ForEachEnumeratorInfo.Builder GetDefaultEnumeratorInfo(SyntaxNode syntax, ForEachEnumeratorInfo.Builder builder, BindingDiagnosticBag diagnostics, TypeSymbol collectionExprType) 1297(TypeSymbol)DynamicTypeSymbol.Instance : 1315TypeSymbol.Equals(builder.GetEnumeratorInfo.Method.ReturnType, this.Compilation.GetSpecialType(SpecialType.System_Collections_IEnumerator), TypeCompareKind.ConsiderEverything2)); 1362private MethodArgumentInfo FindForEachPatternMethod(SyntaxNode syntax, SyntaxNode collectionSyntax, TypeSymbol patternType, string methodName, LookupResult lookupResult, bool warningsOnly, BindingDiagnosticBag diagnostics, bool isAsync) 1429private MethodArgumentInfo PerformForEachPatternOverloadResolution(SyntaxNode syntax, SyntaxNode collectionSyntax, TypeSymbol patternType, ArrayBuilder<MethodSymbol> candidateMethods, bool warningsOnly, BindingDiagnosticBag diagnostics, bool isAsync) 1634TypeSymbol enumeratorType = getEnumeratorMethod.ReturnType; 1747private void ReportEnumerableWarning(SyntaxNode collectionSyntax, BindingDiagnosticBag diagnostics, TypeSymbol enumeratorType, Symbol patternMemberCandidate) 1758internal static bool IsIEnumerable(TypeSymbol type) 1760switch (((TypeSymbol)type.OriginalDefinition).SpecialType) 1770private bool IsIAsyncEnumerable(TypeSymbol type) 1789TypeSymbol type, 1826TypeSymbol type, bool isAsync, CSharpCompilation compilation, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, 1863TypeSymbol.Equals(@interface, result, TypeCompareKind.IgnoreTupleNames)) 1876internal static bool IsIEnumerableT(TypeSymbol type, bool isAsync, CSharpCompilation compilation) 1896private 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) 114LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\InMethodBinder.cs (10)
129TypeSymbol returnType = _methodSymbol.ReturnType; 147RefKind refKind, TypeSymbol returnType, Location errorLocation, BindingDiagnosticBag diagnostics) 151TypeSymbol originalDefinition = returnType.OriginalDefinition; 168if (TypeSymbol.Equals(originalDefinition, compilation.GetWellKnownType(WellKnownType.System_Collections_Generic_IAsyncEnumerable_T), TypeCompareKind.ConsiderEverything) || 169TypeSymbol.Equals(originalDefinition, compilation.GetWellKnownType(WellKnownType.System_Collections_Generic_IAsyncEnumerator_T), TypeCompareKind.ConsiderEverything)) 178internal static bool IsAsyncStreamInterface(CSharpCompilation compilation, RefKind refKind, TypeSymbol returnType) 182TypeSymbol originalDefinition = returnType.OriginalDefinition; 184if (TypeSymbol.Equals(originalDefinition, compilation.GetWellKnownType(WellKnownType.System_Collections_Generic_IAsyncEnumerable_T), TypeCompareKind.ConsiderEverything) || 185TypeSymbol.Equals(originalDefinition, compilation.GetWellKnownType(WellKnownType.System_Collections_Generic_IAsyncEnumerator_T), TypeCompareKind.ConsiderEverything)) 195LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\InSubmissionClassBinder.cs (1)
48LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\LocalScopeBinder.cs (1)
422LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\LockBinder.cs (6)
14using LockTypeInfo = (MethodSymbol EnterScopeMethod, TypeSymbol ScopeType, MethodSymbol ScopeDisposeMethod); 40TypeSymbol? exprType = expr.Type; 75internal static LockTypeInfo? TryFindLockTypeInfo(TypeSymbol lockType, BindingDiagnosticBag diagnostics, SyntaxNode syntax) 86var scopeType = enterScopeMethod.ReturnType; 88!TypeSymbol.Equals(scopeType.ContainingType, lockType, TypeCompareKind.ConsiderEverything)) 110private static MethodSymbol? TryFindPublicVoidParameterlessMethod(TypeSymbol type, string name)
Binder\LockOrUsingBinder.cs (1)
78protected BoundExpression BindTargetExpression(BindingDiagnosticBag diagnostics, Binder originalBinder, TypeSymbol targetTypeOpt = null)
Binder\NameofBinder.cs (1)
60internal override void LookupSymbolsInSingleBinder(LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\PatternExplainer.cs (5)
681private static string SampleValueString(IValueSet remainingValues, TypeSymbol type, bool requireExactType, ref bool unnamedEnumValue) 712var underlyingType = type.EnumUnderlyingTypeOrSelf(); 731private static string ValueString(ConstantValue value, TypeSymbol type, bool requireExactType) 738static bool typeHasExactTypeLiteral(TypeSymbol type) => type.SpecialType switch 754private static string PrimitiveValueString(ConstantValue value, TypeSymbol type)
Binder\Semantics\AccessCheck.cs (21)
41TypeSymbol throughTypeOpt = null) 55TypeSymbol throughTypeOpt, 58ConsList<TypeSymbol> basesBeingResolved = null) 136TypeSymbol throughTypeOpt, 140ConsList<TypeSymbol> basesBeingResolved = null) 223private static bool IsNamedTypeAccessible(NamedTypeSymbol type, Symbol within, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, ConsList<TypeSymbol> basesBeingResolved = null) 301TypeSymbol throughTypeOpt, 305ConsList<TypeSymbol> basesBeingResolved = null) 346TypeSymbol throughTypeOpt, 350ConsList<TypeSymbol> basesBeingResolved = null) 418TypeSymbol throughTypeOpt, 423ConsList<TypeSymbol> basesBeingResolved = null) 461var originalThroughTypeOpt = (object)throughTypeOpt == null ? null : throughTypeOpt.OriginalDefinition as TypeSymbol; 545this TypeSymbol type, 549ConsList<TypeSymbol> basesBeingResolved = null) 565var current = type; 586var next = current.GetNextBaseTypeNoUseSiteDiagnostics(basesBeingResolved, compilation, ref visited); 593current = (TypeSymbol)next.OriginalDefinition; 636static void getBaseInterfaces(TypeSymbol derived, ArrayBuilder<NamedTypeSymbol> baseInterfaces, PooledHashSet<NamedTypeSymbol> interfacesLookedAt, ConsList<TypeSymbol> basesBeingResolved)
Binder\Semantics\BestTypeInferrer.cs (22)
51public static TypeSymbol? InferBestType( 68IEqualityComparer<TypeSymbol> comparer = conversions.IncludeNullability ? Symbols.SymbolEqualityComparer.ConsiderEverything : Symbols.SymbolEqualityComparer.IgnoringNullable; 69HashSet<TypeSymbol> candidateTypes = new HashSet<TypeSymbol>(comparer); 73TypeSymbol? type = expr.GetTypeOrFunctionType(); 96var builder = ArrayBuilder<TypeSymbol>.GetInstance(candidateTypes.Count); 98var result = GetBestType(builder, conversions, ref useSiteInfo); 116public static TypeSymbol? InferBestTypeForConditionalOperator( 132ArrayBuilder<TypeSymbol> candidateTypes = ArrayBuilder<TypeSymbol>.GetInstance(); 177internal static TypeSymbol? GetBestType( 178ArrayBuilder<TypeSymbol> types, 197TypeSymbol? best = null; 201TypeSymbol? type = checkType(types[i]); 213var better = Better(best, type, conversions, ref useSiteInfo); 236TypeSymbol? type = checkType(types[i]); 241TypeSymbol? better = Better(best, type, conversions, ref useSiteInfo); 250static TypeSymbol? checkType(TypeSymbol type) => 259private static TypeSymbol? Better( 260TypeSymbol type1, 261TypeSymbol? type2,
Binder\Semantics\Conversions\Conversion.cs (4)
110CollectionExpressionTypeKind collectionExpressionTypeKind, TypeSymbol elementType, 124internal readonly TypeSymbol ElementType; 130CollectionExpressionTypeKind collectionExpressionTypeKind, TypeSymbol elementType, 547internal CollectionExpressionTypeKind GetCollectionExpressionTypeKind(out TypeSymbol? elementType, out MethodSymbol? constructor, out bool isExpanded)
Binder\Semantics\Conversions\ConversionEasyOut.cs (2)
72public static ConversionKind ClassifyConversion(TypeSymbol source, TypeSymbol target)
Binder\Semantics\Conversions\Conversions.cs (11)
44public override Conversion GetMethodGroupDelegateConversion(BoundMethodGroup source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 131protected override Conversion GetInterpolatedStringConversion(BoundExpression source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 153return (TypeSymbol.Equals(destination, Compilation.GetWellKnownType(WellKnownType.System_IFormattable), TypeCompareKind.ConsiderEverything) || 154TypeSymbol.Equals(destination, Compilation.GetWellKnownType(WellKnownType.System_FormattableString), TypeCompareKind.ConsiderEverything)) 161TypeSymbol targetType, 166var elementType = elementTypeWithAnnotations.Type; 220Conversion convertElement(BoundNode element, TypeSymbol elementType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 232TypeSymbol targetType, 278private static (MethodSymbol, bool isFunctionPointer, CallingConventionInfo callingConventionInfo) GetDelegateInvokeOrFunctionPointerMethodIfAvailable(TypeSymbol type) 300public static bool ReportDelegateOrFunctionPointerMethodGroupDiagnostics(Binder binder, BoundMethodGroup expr, TypeSymbol targetType, BindingDiagnosticBag diagnostics) 507public override Conversion GetStackAllocConversion(BoundStackAllocArrayCreation sourceExpression, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\Semantics\Conversions\ConversionsBase.cs (211)
67public abstract Conversion GetMethodGroupDelegateConversion(BoundMethodGroup source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo); 71public abstract Conversion GetStackAllocConversion(BoundStackAllocArrayCreation sourceExpression, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo); 75protected abstract Conversion GetInterpolatedStringConversion(BoundExpression source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo); 78protected abstract Conversion GetCollectionExpressionConversion(BoundUnconvertedCollectionExpression source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo); 98public Conversion ClassifyImplicitConversionFromExpression(BoundExpression sourceExpression, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 104var sourceType = sourceExpression.Type; 169public Conversion ClassifyImplicitConversionFromType(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 204public Conversion ClassifyImplicitConversionFromTypeWhenNeitherOrBothFunctionTypes(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 234public Conversion ClassifyConversionFromExpressionType(TypeSymbol source, TypeSymbol destination, bool isChecked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 248private static bool TryGetVoidConversion(TypeSymbol source, TypeSymbol destination, out Conversion conversion) 283public Conversion ClassifyConversionFromExpression(BoundExpression sourceExpression, TypeSymbol destination, bool isChecked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, bool forCast = false) 317public Conversion ClassifyConversionFromType(TypeSymbol source, TypeSymbol destination, bool isChecked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, bool forCast = false) 375private Conversion ClassifyConversionFromExpressionForCast(BoundExpression source, TypeSymbol destination, bool isChecked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 429private Conversion ClassifyConversionFromTypeForCast(TypeSymbol source, TypeSymbol destination, bool isChecked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 488public static Conversion FastClassifyConversion(TypeSymbol source, TypeSymbol target) 499public Conversion ClassifyBuiltInConversion(TypeSymbol source, TypeSymbol destination, bool isChecked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 529public Conversion ClassifyStandardConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 541public Conversion ClassifyStandardConversion(BoundExpression sourceExpression, TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 605private Conversion ClassifyStandardImplicitConversion(BoundExpression sourceExpression, TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 695private Conversion ClassifyStandardImplicitConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 701Conversion classifyConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 763private Conversion ClassifyImplicitBuiltInConversionSlow(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 782private Conversion GetImplicitUserDefinedConversion(BoundExpression sourceExpression, TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 788private Conversion GetImplicitUserDefinedConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 793private Conversion ClassifyExplicitBuiltInOnlyConversion(TypeSymbol source, TypeSymbol destination, bool isChecked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, bool forCast) 872private Conversion GetExplicitUserDefinedConversion(BoundExpression sourceExpression, TypeSymbol source, TypeSymbol destination, bool isChecked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 878private Conversion GetExplicitUserDefinedConversion(TypeSymbol source, TypeSymbol destination, bool isChecked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 883private Conversion DeriveStandardExplicitFromOppositeStandardImplicitConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 916var strippedSource = source.StrippedType(); 917var strippedDestination = destination.StrippedType(); 950public bool IsBaseInterface(TypeSymbol baseType, TypeSymbol derivedType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 985public bool IsBaseClass(TypeSymbol derivedType, TypeSymbol baseType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 996for (TypeSymbol b = derivedType.BaseTypeWithDefinitionUseSiteDiagnostics(ref useSiteInfo); (object)b != null; b = b.BaseTypeWithDefinitionUseSiteDiagnostics(ref useSiteInfo)) 1029private Conversion ClassifyImplicitBuiltInConversionFromExpression(BoundExpression sourceExpression, TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1159private Conversion GetImplicitCollectionExpressionConversion(BoundUnconvertedCollectionExpression collectionExpression, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1171if (destination.IsNullableType(out var underlyingDestination)) 1184private Conversion GetSwitchExpressionConversion(BoundExpression source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1213private Conversion GetConditionalExpressionConversion(BoundExpression source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1231private static Conversion ClassifyNullLiteralConversion(BoundExpression source, TypeSymbol destination) 1270private static Conversion ClassifyImplicitConstantExpressionConversion(BoundExpression source, TypeSymbol destination) 1283if (destination.IsNullableType(out var underlyingDestination) && 1293private Conversion ClassifyImplicitTupleLiteralConversion(BoundTupleLiteral source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1307if (destination.IsNullableType(out var underlyingDestination)) 1319private Conversion ClassifyExplicitTupleLiteralConversion(BoundTupleLiteral source, TypeSymbol destination, bool isChecked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, bool forCast) 1335if (destination.IsNullableType(out var underlyingDestination)) 1349internal static bool HasImplicitConstantExpressionConversion(BoundExpression source, TypeSymbol destination) 1401private Conversion ClassifyExplicitOnlyConversionFromExpression(BoundExpression sourceExpression, TypeSymbol destination, bool isChecked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, bool forCast) 1419var sourceType = sourceExpression.Type; 1441private static bool HasImplicitEnumerationConversion(BoundExpression source, TypeSymbol destination) 1467private static LambdaConversionResult IsAnonymousFunctionCompatibleWithDelegate(UnboundLambda anonymousFunction, TypeSymbol type, CSharpCompilation compilation, bool isTargetExpressionTree) 1603var delegateType = type.TypeArgumentsWithAnnotationsNoUseSiteDiagnostics[0].Type; 1617internal bool IsAssignableFromMulticastDelegate(TypeSymbol type, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1624public static LambdaConversionResult IsAnonymousFunctionCompatibleWithType(UnboundLambda anonymousFunction, TypeSymbol type, CSharpCompilation compilation) 1641private static bool HasAnonymousFunctionConversion(BoundExpression source, TypeSymbol destination, CSharpCompilation compilation) 1654internal static CollectionExpressionTypeKind GetCollectionExpressionTypeKind(CSharpCompilation compilation, TypeSymbol destination, out TypeWithAnnotations elementType) 1698static bool implementsSpecialInterface(CSharpCompilation compilation, TypeSymbol targetType, SpecialType specialInterface) 1706internal static bool IsSpanOrListType(CSharpCompilation compilation, TypeSymbol targetType, WellKnownType spanType, [NotNullWhen(true)] out TypeWithAnnotations elementType) 1719internal Conversion ClassifyImplicitUserDefinedConversionForV6SwitchGoverningType(TypeSymbol sourceType, out TypeSymbol switchGoverningType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1751internal Conversion GetCallerLineNumberConversion(TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1756TypeSymbol expectedAttributeType = corLibrary.GetSpecialType(SpecialType.System_Int32); 1776internal bool HasCallerLineNumberConversion(TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1781internal bool HasCallerInfoStringConversion(TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1783TypeSymbol expectedAttributeType = corLibrary.GetSpecialType(SpecialType.System_String); 1788public static bool HasIdentityConversion(TypeSymbol type1, TypeSymbol type2) 1793private static bool HasIdentityConversionInternal(TypeSymbol type1, TypeSymbol type2, bool includeNullability) 1815private bool HasIdentityConversionInternal(TypeSymbol type1, TypeSymbol type2) 1880var type = typeWithAnnotations.Type; 1910public Conversion ConvertExtensionMethodThisArg(TypeSymbol parameterType, TypeSymbol thisType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, bool isMethodGroupConversion) 1920public Conversion ClassifyImplicitExtensionMethodThisArgConversion(BoundExpression sourceExpressionOpt, TypeSymbol sourceType, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, bool isMethodGroupConversion) 2032private static ConversionKind GetNumericConversion(TypeSymbol source, TypeSymbol destination) 2054private static bool HasImplicitNumericConversion(TypeSymbol source, TypeSymbol destination) 2059private static bool HasExplicitNumericConversion(TypeSymbol source, TypeSymbol destination) 2097private static bool IsNumericType(TypeSymbol type) 2121private static bool HasSpecialIntPtrConversion(TypeSymbol source, TypeSymbol target) 2157var s0 = source.StrippedType(); 2158var t0 = target.StrippedType(); 2160TypeSymbol otherType; 2203static bool isIntPtrOrUIntPtr(TypeSymbol type) => 2207private static bool HasExplicitEnumerationConversion(TypeSymbol source, TypeSymbol destination) 2236private Conversion ClassifyImplicitNullableConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2252TypeSymbol unwrappedDestination = destination.GetNullableUnderlyingType(); 2253TypeSymbol unwrappedSource = source.StrippedType(); 2282private Conversion GetImplicitTupleLiteralConversion(BoundTupleLiteral source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2300private Conversion GetExplicitTupleLiteralConversion(BoundTupleLiteral source, TypeSymbol destination, bool isChecked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, bool forCast) 2320TypeSymbol destination, 2358private Conversion ClassifyImplicitTupleConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2377private Conversion ClassifyExplicitTupleConversion(TypeSymbol source, TypeSymbol destination, bool isChecked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, bool forCast) 2397TypeSymbol source, 2398TypeSymbol destination, 2431private Conversion ClassifyExplicitNullableConversion(TypeSymbol source, TypeSymbol destination, bool isChecked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, bool forCast) 2449TypeSymbol unwrappedSource = source.StrippedType(); 2450TypeSymbol unwrappedDestination = destination.StrippedType(); 2486private bool HasCovariantArrayConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2508public bool HasIdentityOrImplicitReferenceConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2521private static bool HasImplicitDynamicConversionFromExpression(TypeSymbol expressionType, TypeSymbol destination) 2530private static bool HasExplicitDynamicConversion(TypeSymbol source, TypeSymbol destination) 2540private bool HasArrayConversionToInterface(ArrayTypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2621internal bool HasImplicitReferenceConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2684private bool HasImplicitConversionToInterface(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2718private bool HasImplicitConversionFromArray(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2759private bool HasImplicitConversionFromDelegate(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2795private bool HasImplicitFunctionTypeConversion(FunctionTypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2806internal bool IsValidFunctionTypeConversionTarget(TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2849public bool HasImplicitTypeParameterConversion(TypeParameterSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2871private bool HasImplicitReferenceTypeParameterConversion(TypeParameterSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2914private bool HasImplicitEffectiveBaseConversion(TypeParameterSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2938private bool HasImplicitEffectiveInterfaceSetConversion(TypeParameterSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2943private bool HasVarianceCompatibleInterfaceInEffectiveInterfaceSet(TypeParameterSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2963private bool HasAnyBaseInterfaceConversion(TypeSymbol derivedType, TypeSymbol baseType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2968private bool ImplementsVarianceCompatibleInterface(TypeSymbol derivedType, TypeSymbol baseType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2994internal bool ImplementsVarianceCompatibleInterface(NamedTypeSymbol derivedType, TypeSymbol baseType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2996return ImplementsVarianceCompatibleInterface((TypeSymbol)derivedType, baseType, ref useSiteInfo); 2999internal bool HasImplicitConversionToOrImplementsVarianceCompatibleInterface(TypeSymbol typeToCheck, NamedTypeSymbol targetInterfaceType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, out bool needSupportForRefStructInterfaces) 3019private bool IsRefLikeOrAllowsRefLikeTypeImplementingVarianceCompatibleInterface(TypeSymbol typeToCheck, NamedTypeSymbol targetInterfaceType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 3043if (expressionToCheck.Type is TypeSymbol typeToCheck && IsRefLikeOrAllowsRefLikeTypeImplementingVarianceCompatibleInterface(typeToCheck, targetInterfaceType, ref useSiteInfo)) 3067private bool HasInterfaceVarianceConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 3086private bool HasDelegateVarianceConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 3147if (!TypeSymbol.Equals(typeSymbol, destination.OriginalDefinition, TypeCompareKind.ConsiderEverything2)) 3170Debug.Assert(TypeSymbol.Equals(source.OriginalDefinition, destination.OriginalDefinition, TypeCompareKind.AllIgnoreOptions)); 3199TypeSymbol.Equals(destinationTypeArgument.Type, sourceTypeArgument.Type, TypeCompareKind.AllNullableIgnoreOptions) && 3248private bool HasImplicitBoxingTypeParameterConversion(TypeParameterSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 3302public bool HasBoxingConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 3363internal static bool HasImplicitPointerToVoidConversion(TypeSymbol source, TypeSymbol destination) 3374internal bool HasImplicitPointerConversion(TypeSymbol? source, TypeSymbol? destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 3431private bool HasIdentityOrReferenceConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 3454private bool HasExplicitReferenceConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 3528private bool HasExplicitReferenceTypeParameterConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 3580private bool HasUnboxingTypeParameterConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 3603if (TypeSymbol.Equals(type, source, TypeCompareKind.ConsiderEverything2)) 3631private bool HasExplicitDelegateConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 3662if (!TypeSymbol.Equals(source.OriginalDefinition, destination.OriginalDefinition, TypeCompareKind.ConsiderEverything2)) 3686var sourceArg = sourceTypeArguments[i].Type; 3687var destinationArg = destinationTypeArguments[i].Type; 3720private bool HasExplicitArrayConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 3781var specialDefinition = ((TypeSymbol)source.OriginalDefinition).SpecialType; 3789var sourceElement = ((NamedTypeSymbol)source).TypeArgumentWithDefinitionUseSiteDiagnostics(0, ref useSiteInfo).Type; 3790var destinationElement = destinationArray.ElementType; 3812private bool HasUnboxingConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 3880private static bool HasPointerToPointerConversion(TypeSymbol source, TypeSymbol destination) 3888private static bool HasPointerToIntegerConversion(TypeSymbol source, TypeSymbol destination) 3906private static bool HasIntegerToPointerConversion(TypeSymbol source, TypeSymbol destination) 3920private static bool IsIntegerTypeSupportingPointerConversions(TypeSymbol type) 3951private bool HasImplicitSpanConversion(TypeSymbol? source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 4014private bool HasExplicitSpanConversion(TypeSymbol? source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 4035private bool IgnoreUserDefinedSpanConversions(TypeSymbol? source, TypeSymbol? target)
Binder\Semantics\Conversions\TypeConversions.cs (4)
36public override Conversion GetMethodGroupDelegateConversion(BoundMethodGroup source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 48public override Conversion GetStackAllocConversion(BoundStackAllocArrayCreation sourceExpression, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 54protected override Conversion GetInterpolatedStringConversion(BoundExpression source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 60protected override Conversion GetCollectionExpressionConversion(BoundUnconvertedCollectionExpression source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\Semantics\Conversions\UserDefinedConversionAnalysis.cs (8)
21public readonly TypeSymbol FromType; 22public readonly TypeSymbol ToType; 35TypeSymbol fromType, 36TypeSymbol toType) 53TypeSymbol fromType, 54TypeSymbol toType) 72TypeSymbol fromType, 73TypeSymbol toType)
Binder\Semantics\Conversions\UserDefinedConversions.cs (2)
17public static void AddTypesParticipatingInUserDefinedConversion(ArrayBuilder<(NamedTypeSymbol ParticipatingType, TypeParameterSymbol? ConstrainedToTypeOpt)> result, TypeSymbol type, bool includeBaseTypes, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 114static void addFromClassOrStruct(ArrayBuilder<(NamedTypeSymbol ParticipatingType, TypeParameterSymbol? ConstrainedToTypeOpt)> result, bool excludeExisting, TypeSymbol type, bool includeBaseTypes, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\Semantics\Conversions\UserDefinedExplicitConversions.cs (28)
22TypeSymbol source, 23TypeSymbol target, 52TypeSymbol sx = MostSpecificSourceTypeForExplicitUserDefinedConversion(u, sourceExpression, source, ref useSiteInfo); 59TypeSymbol tx = MostSpecificTargetTypeForExplicitUserDefinedConversion(u, target, ref useSiteInfo); 74private static void ComputeUserDefinedExplicitConversionTypeSet(TypeSymbol source, TypeSymbol target, ArrayBuilder<(NamedTypeSymbol ParticipatingType, TypeParameterSymbol ConstrainedToTypeOpt)> d, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 87TypeSymbol source, 88TypeSymbol target, 130TypeSymbol source, 131TypeSymbol target, 143TypeSymbol source, 144TypeSymbol target, 271TypeSymbol convertsFrom = op.GetParameterType(0); 272TypeSymbol convertsTo = op.ReturnType; 323TypeSymbol nullableFrom = MakeNullableType(convertsFrom); 324TypeSymbol nullableTo = convertsTo.IsValidNullableTypeArgument() ? MakeNullableType(convertsTo) : convertsTo; 369private TypeSymbol MostSpecificSourceTypeForExplicitUserDefinedConversion( 372TypeSymbol source, 407if (u.Any(static (conv, source) => TypeSymbol.Equals(conv.FromType, source, TypeCompareKind.ConsiderEverything2), source)) 416var result = MostEncompassedType(u, isValid, conv => conv.FromType, ref inLambdaUseSiteInfo); 427private TypeSymbol MostSpecificTargetTypeForExplicitUserDefinedConversion( 429TypeSymbol target, 461if (u.Any(static (conv, target) => TypeSymbol.Equals(conv.ToType, target, TypeCompareKind.ConsiderEverything2), target)) 470var result = MostEncompassingType(u, isValid, conv => conv.ToType, ref inLambdaUseSiteInfo); 479private Conversion EncompassingExplicitConversion(BoundExpression expr, TypeSymbol a, TypeSymbol b, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 502private Conversion EncompassingExplicitConversion(TypeSymbol a, TypeSymbol b, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\Semantics\Conversions\UserDefinedImplicitConversions.cs (50)
27TypeSymbol source, 28TypeSymbol target, 96TypeSymbol sx = MostSpecificSourceTypeForImplicitUserDefinedConversion(u, source, ref useSiteInfo); 103TypeSymbol tx = MostSpecificTargetTypeForImplicitUserDefinedConversion(u, target, ref useSiteInfo); 118private static void ComputeUserDefinedImplicitConversionTypeSet(TypeSymbol s, TypeSymbol t, ArrayBuilder<(NamedTypeSymbol ParticipatingType, TypeParameterSymbol ConstrainedToTypeOpt)> d, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 144TypeSymbol source, 145TypeSymbol target, 283TypeSymbol source, 284TypeSymbol target, 300TypeSymbol convertsFrom = op.GetParameterType(0); 301TypeSymbol convertsTo = op.ReturnType; 348TypeSymbol nullableFrom = MakeNullableType(convertsFrom); 349TypeSymbol nullableTo = convertsTo.IsValidNullableTypeArgument() ? MakeNullableType(convertsTo) : convertsTo; 365private TypeSymbol MostSpecificSourceTypeForImplicitUserDefinedConversion(ImmutableArray<UserDefinedConversionAnalysis> u, TypeSymbol source, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 370if (u.Any(static (conv, source) => TypeSymbol.Equals(conv.FromType, source, TypeCompareKind.ConsiderEverything2), source)) 381private TypeSymbol MostSpecificTargetTypeForImplicitUserDefinedConversion(ImmutableArray<UserDefinedConversionAnalysis> u, TypeSymbol target, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 404if (u.Any(static (conv, target) => TypeSymbol.Equals(conv.ToType, target, TypeCompareKind.ConsiderEverything2), target)) 415if (!TypeSymbol.Equals(conv.FromType, conv.Operator.GetParameterType(0), TypeCompareKind.ConsiderEverything2)) 420if (!TypeSymbol.Equals(conv.ToType, conv.Operator.ReturnType, TypeCompareKind.ConsiderEverything2)) 428private static int? MostSpecificConversionOperator(TypeSymbol sx, TypeSymbol tx, ImmutableArray<UserDefinedConversionAnalysis> u) 430return MostSpecificConversionOperator(conv => TypeSymbol.Equals(conv.FromType, sx, TypeCompareKind.ConsiderEverything2) && TypeSymbol.Equals(conv.ToType, tx, TypeCompareKind.ConsiderEverything2), u); 575private bool IsEncompassedBy(BoundExpression aExpr, TypeSymbol a, TypeSymbol b, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 589private bool IsEncompassedBy(TypeSymbol a, TypeSymbol b, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 594private Conversion EncompassingImplicitConversion(BoundExpression aExpr, TypeSymbol a, TypeSymbol b, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 609private Conversion EncompassingImplicitConversion(TypeSymbol a, TypeSymbol b, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 689private TypeSymbol MostEncompassedType<T>( 691Func<T, TypeSymbol> extract, 697private TypeSymbol MostEncompassedType<T>( 700Func<T, TypeSymbol> extract, 731TypeSymbol leftType = extract(left); 732TypeSymbol rightType = extract(right); 733if (TypeSymbol.Equals(leftType, rightType, TypeCompareKind.ConsiderEverything2)) 751private TypeSymbol MostEncompassingType<T>( 753Func<T, TypeSymbol> extract, 759private TypeSymbol MostEncompassingType<T>( 762Func<T, TypeSymbol> extract, 770TypeSymbol leftType = extract(left); 771TypeSymbol rightType = extract(right); 772if (TypeSymbol.Equals(leftType, rightType, TypeCompareKind.ConsiderEverything2)) 885private NamedTypeSymbol MakeNullableType(TypeSymbol type) 894protected UserDefinedConversionResult AnalyzeImplicitUserDefinedConversionForV6SwitchGoverningType(TypeSymbol source, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\Semantics\Operators\BinaryOperatorEasyOut.cs (4)
255public static BinaryOperatorKind OpKind(BinaryOperatorKind kind, TypeSymbol left, TypeSymbol right) 288var leftType = left.Type; 294var rightType = right.Type;
Binder\Semantics\Operators\BinaryOperatorOverloadResolution.cs (43)
78TypeSymbol leftOperatorSourceOpt = left.Type?.StrippedType(); 79TypeSymbol rightOperatorSourceOpt = right.Type?.StrippedType(); 138var lookedInInterfaces = PooledDictionary<TypeSymbol, bool>.GetInstance(); 140TypeSymbol firstOperatorSourceOpt; 141TypeSymbol secondOperatorSourceOpt; 223TypeSymbol operatorSourceOpt, bool sourceIsInterface, 225Dictionary<TypeSymbol, bool> lookedInInterfaces, ArrayBuilder<BinaryOperatorAnalysisResult> candidates) 236TypeSymbol constrainedToTypeOpt = null; 318private void AddDelegateOperation(BinaryOperatorKind kind, TypeSymbol delegateType, 373var leftType = left.Type; 375var rightType = right.Type; 393TypeSymbol systemDelegateType = _binder.Compilation.GetSpecialType(SpecialType.System_Delegate); 465TypeSymbol delegateType = leftDelegate ? leftType : rightType; 477private void GetEnumOperation(BinaryOperatorKind kind, TypeSymbol enumType, BoundExpression right, ArrayBuilder<BinaryOperatorSignature> operators) 517bool isExactSubtraction = TypeSymbol.Equals(right.Type?.StrippedType(), underlying, TypeCompareKind.ConsiderEverything2); 621var leftType = left.Type; 627var rightType = right.Type; 790Conversion getOperandConversionForAllowByRefLikeNullCheck(bool isChecked, BoundExpression operand, TypeSymbol objectType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 860static bool equalsIgnoringNullable(TypeSymbol a, TypeSymbol b) => a.Equals(b, TypeCompareKind.AllNullableIgnoreOptions); 861static bool equalsIgnoringNullableAndDynamic(TypeSymbol a, TypeSymbol b) => a.Equals(b, TypeCompareKind.AllNullableIgnoreOptions | TypeCompareKind.IgnoreDynamic); 869TypeSymbol type0, 948TypeSymbol constrainedToTypeOpt, 989private static void GetDeclaredUserDefinedBinaryOperators(TypeSymbol? constrainedToTypeOpt, NamedTypeSymbol type, BinaryOperatorKind kind, string name, ArrayBuilder<BinaryOperatorSignature> operators) 997private static void GetDeclaredUserDefinedBinaryOperators(TypeSymbol? constrainedToTypeOpt, ArrayBuilder<MethodSymbol> typeOperators, BinaryOperatorKind kind, string name, ArrayBuilder<BinaryOperatorSignature> operators) 1012TypeSymbol leftOperandType = op.GetParameterType(0); 1013TypeSymbol rightOperandType = op.GetParameterType(1); 1014TypeSymbol resultType = op.ReturnType; 1020void AddLiftedUserDefinedBinaryOperators(TypeSymbol? constrainedToTypeOpt, BinaryOperatorKind kind, ArrayBuilder<BinaryOperatorSignature> operators) 1025TypeSymbol leftOperandType = op.GetParameterType(0); 1026TypeSymbol rightOperandType = op.GetParameterType(1); 1027TypeSymbol resultType = op.ReturnType; 1055private static LiftingResult UserDefinedBinaryOperatorCanBeLifted(TypeSymbol left, TypeSymbol right, TypeSymbol result, BinaryOperatorKind kind) 1084if (!TypeSymbol.Equals(left, right, TypeCompareKind.ConsiderEverything2)) return LiftingResult.NotLifted; 1374TypeSymbol op1Left, op1Right, op2Left, op2Right; 1409using var uninst1 = TemporaryArray<TypeSymbol>.Empty; 1410using var uninst2 = TemporaryArray<TypeSymbol>.Empty; 1548TypeSymbol leftOperandType = method.GetParameterType(0); 1549TypeSymbol rightOperandType = method.GetParameterType(1); 1550TypeSymbol resultType = method.ReturnType;
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 (14)
19private NamedTypeSymbol MakeNullable(TypeSymbol type) 189TypeSymbol operandType = method.GetParameterType(0); 190TypeSymbol resultType = method.ReturnType; 553var enumType = operand.Type; 650TypeSymbol declaringTypeOrTypeParameter, 659TypeSymbol constrainedToTypeOpt = declaringTypeOrTypeParameter as TypeParameterSymbol; 768TypeSymbol constrainedToTypeOpt, 809private static void GetDeclaredUserDefinedUnaryOperators(TypeSymbol? constrainedToTypeOpt, NamedTypeSymbol type, UnaryOperatorKind kind, string name, ArrayBuilder<UnaryOperatorSignature> operators) 817private static void GetDeclaredUserDefinedUnaryOperators(TypeSymbol? constrainedToTypeOpt, IEnumerable<MethodSymbol> typeOperators, UnaryOperatorKind kind, string name, ArrayBuilder<UnaryOperatorSignature> operators) 832TypeSymbol operandType = op.GetParameterType(0); 833TypeSymbol resultType = op.ReturnType; 839private void AddLiftedUserDefinedUnaryOperators(TypeSymbol? constrainedToTypeOpt, UnaryOperatorKind kind, ArrayBuilder<UnaryOperatorSignature> operators) 859TypeSymbol operandType = op.GetParameterType(0); 860TypeSymbol resultType = op.ReturnType;
Binder\Semantics\Operators\UnaryOperatorSignature.cs (8)
18public readonly TypeSymbol ConstrainedToTypeOpt; 19public readonly TypeSymbol OperandType; 20public readonly TypeSymbol ReturnType; 23public UnaryOperatorSignature(UnaryOperatorKind kind, TypeSymbol operandType, TypeSymbol returnType) 32public UnaryOperatorSignature(UnaryOperatorKind kind, TypeSymbol operandType, TypeSymbol returnType, MethodSymbol method, TypeSymbol constrainedToTypeOpt)
Binder\Semantics\OverloadResolution\MethodTypeInference.cs (50)
511TypeSymbol.Equals(typeParameter, _methodTypeParameters[ordinal], TypeCompareKind.ConsiderEverything2) && 560private TypeSymbol GetFixedDelegateOrFunctionPointer(TypeSymbol delegateOrFunctionPointerType) 670TypeSymbol targetType = target.Type; 1010private static bool DoesInputTypeContain(BoundExpression argument, TypeSymbol formalParameterType, TypeParameterSymbol typeParameter) 1016var delegateOrFunctionPointerType = formalParameterType.GetDelegateOrFunctionPointerType(); 1046private bool HasUnfixedParamInInputType(BoundExpression pSource, TypeSymbol pDest) 1065private static bool DoesOutputTypeContain(BoundExpression argument, TypeSymbol formalParameterType, 1072var delegateOrFunctionPointerType = formalParameterType.GetDelegateOrFunctionPointerType(); 1097var returnType = method.ReturnType; 1106private bool HasUnfixedParamInOutputType(BoundExpression argument, TypeSymbol formalParameterType) 1146var formalParameterType = _formalParameterTypes[iArg].Type; 1438private bool MethodGroupReturnTypeInference(Binder binder, BoundExpression source, TypeSymbol target, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1453var delegateOrFunctionPointerType = target.GetDelegateOrFunctionPointerType(); 1739private bool ExactSpanInference(TypeSymbol source, TypeSymbol target, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1766private static TypeWithAnnotations GetSpanElementType(TypeSymbol type) 1772private static TypeWithAnnotations GetSpanOrSZArrayElementType(TypeSymbol type) 1879if (!TypeSymbol.Equals(namedSource.OriginalDefinition, namedTarget.OriginalDefinition, TypeCompareKind.ConsiderEverything2)) 1946Debug.Assert(TypeSymbol.Equals(source.OriginalDefinition, target.OriginalDefinition, TypeCompareKind.ConsiderEverything2)); 2078private static TypeWithAnnotations GetMatchingElementType(ArrayTypeSymbol source, TypeSymbol target, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2113private bool LowerBoundArrayInference(TypeSymbol source, TypeSymbol target, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2151private bool LowerBoundSpanInference(TypeSymbol source, TypeSymbol target, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2194private bool LowerBoundConstructedInference(TypeSymbol source, TypeSymbol target, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2221TypeSymbol.Equals(constructedSource.OriginalDefinition, constructedTarget.OriginalDefinition, TypeCompareKind.ConsiderEverything2)) 2258private bool LowerBoundClassInference(TypeSymbol source, NamedTypeSymbol target, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2293if (TypeSymbol.Equals(sourceBase.OriginalDefinition, target.OriginalDefinition, TypeCompareKind.ConsiderEverything2)) 2303private bool LowerBoundInterfaceInference(TypeSymbol source, NamedTypeSymbol target, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2388Debug.Assert(TypeSymbol.Equals(source.OriginalDefinition, target.OriginalDefinition, TypeCompareKind.ConsiderEverything2)); 2427private bool LowerBoundFunctionPointerTypeInference(TypeSymbol source, TypeSymbol target, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2599var source = sourceWithAnnotations.Type; 2600var target = targetWithAnnotations.Type; 2621TypeSymbol.Equals(constructedSource.OriginalDefinition, target.OriginalDefinition, TypeCompareKind.ConsiderEverything2)) 2655private bool UpperBoundClassInference(NamedTypeSymbol source, TypeSymbol target, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2672if (TypeSymbol.Equals(targetBase.OriginalDefinition, source.OriginalDefinition, TypeCompareKind.ConsiderEverything2)) 2684private bool UpperBoundInterfaceInference(NamedTypeSymbol source, TypeSymbol target, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2738Debug.Assert(TypeSymbol.Equals(source.OriginalDefinition, target.OriginalDefinition, TypeCompareKind.ConsiderEverything2)); 2777private bool UpperBoundFunctionPointerTypeInference(TypeSymbol source, TypeSymbol target, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 3026static bool isExpressionType(TypeSymbol? type) 3042var source = sourceWithAnnotations.Type; 3043var destination = destinationWithAnnotations.Type; 3164if (TypeSymbol.Equals(currentInterface.OriginalDefinition, target.OriginalDefinition, TypeCompareKind.ConsiderEverything)) 3170else if (!TypeSymbol.Equals(matchingInterface, currentInterface, TypeCompareKind.ConsiderEverything)) 3311TypeSymbol source = argument.Type; 3356private static bool IsReallyAType(TypeSymbol? type)
Binder\Semantics\OverloadResolution\OverloadResolution.cs (76)
146TypeSymbol returnType = null, 194TypeSymbol returnType = null, 435TypeSymbol returnType, 851TypeSymbol returnType, 1324public static bool TryInferParamsCollectionIterationType(Binder binder, TypeSymbol type, out TypeWithAnnotations elementType) 1486bool typeArgumentsAccessible(ImmutableArray<TypeSymbol> typeArguments, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1488foreach (TypeSymbol arg in typeArguments) 1619private static bool IsLessDerivedThanAny<TMember>(int index, TypeSymbol type, ArrayBuilder<MemberResolutionResult<TMember>> results, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2177var type1 = getParameterTypeAndRefKind(i, m1.Result, m1LeastOverriddenParameters, m1.Result.ParamsElementTypeOpt, m1.LeastOverriddenMember, out RefKind parameter1RefKind); 2179var type2 = getParameterTypeAndRefKind(i, m2.Result, m2LeastOverriddenParameters, m2.Result.ParamsElementTypeOpt, m2.LeastOverriddenMember, out RefKind parameter2RefKind); 2195var type1Normalized = type1; 2196var type2Normalized = type2; 2319var type1 = getParameterTypeAndRefKind(i, m1.Result, m1LeastOverriddenParameters, m1.Result.ParamsElementTypeOpt, m1.LeastOverriddenMember, out _); 2321var type2 = getParameterTypeAndRefKind(i, m2.Result, m2LeastOverriddenParameters, m2.Result.ParamsElementTypeOpt, m2.LeastOverriddenMember, out _); 2323var type1Normalized = type1; 2324var type2Normalized = type2; 2463using (var uninst1 = TemporaryArray<TypeSymbol>.Empty) 2464using (var uninst2 = TemporaryArray<TypeSymbol>.Empty) 2551TypeSymbol t1 = m1LastParameter.Type; 2552TypeSymbol t2 = m2LastParameter.Type; 2568static TypeSymbol getParameterTypeAndRefKind(int i, MemberAnalysisResult memberResolutionResult, ImmutableArray<ParameterSymbol> parameters, 2575var type = parameter.Type; 2743private static BetterResult MoreSpecificType(ref TemporaryArray<TypeSymbol> t1, ref TemporaryArray<TypeSymbol> t2, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2775private static BetterResult MoreSpecificType(TypeSymbol t1, TypeSymbol t2, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2852using var allTypeArgs1 = TemporaryArray<TypeSymbol>.Empty; 2853using var allTypeArgs2 = TemporaryArray<TypeSymbol>.Empty; 2863private BetterResult BetterConversionFromExpression(BoundExpression node, TypeSymbol t1, TypeSymbol t2, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2879TypeSymbol t1, 2882TypeSymbol t2, 2933private BetterResult BetterConversionFromExpression(BoundExpression node, TypeSymbol t1, Conversion conv1, TypeSymbol t2, Conversion conv2, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, out bool okToDowngradeToNeither) 3042TypeSymbol t1, Conversion conv1, 3043TypeSymbol t2, Conversion conv2, 3046var kind1 = conv1.GetCollectionExpressionTypeKind(out TypeSymbol elementType1, out _, out _); 3047var kind2 = conv2.GetCollectionExpressionTypeKind(out TypeSymbol elementType2, out _, out _); 3076TypeSymbol t1, CollectionExpressionTypeKind kind1, TypeSymbol elementType1, ImmutableArray<Conversion> underlyingElementConversions1, 3077TypeSymbol t2, CollectionExpressionTypeKind kind2, TypeSymbol elementType2, ImmutableArray<Conversion> underlyingElementConversions2, 3183TypeSymbol t1, CollectionExpressionTypeKind kind1, TypeSymbol elementType1, 3184TypeSymbol t2, CollectionExpressionTypeKind kind2, TypeSymbol elementType2, 3214bool hasImplicitConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) => 3218private BetterResult BetterParamsCollectionType(TypeSymbol t1, TypeSymbol t2, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 3240private static bool IsSZArrayOrArrayInterface(TypeSymbol type, out TypeSymbol elementType) 3258private bool ExpressionMatchExactly(BoundExpression node, TypeSymbol t, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 3282TypeSymbol y; 3374private bool ExpressionMatchExactly(BoundTupleLiteral tupleSource, TypeSymbol targetType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 3445TypeSymbol type1, 3446TypeSymbol type2, 3461TypeSymbol type1, 3463TypeSymbol type2, 3473TypeSymbol type1, 3475TypeSymbol type2, 3573TypeSymbol r1 = invoke1.ReturnType; 3574TypeSymbol r2 = invoke2.ReturnType; 3649static bool isBetterSpanConversionTarget(TypeSymbol type1, TypeSymbol type2) 3654var type1Element = ((NamedTypeSymbol)type1).TypeArgumentsWithAnnotationsNoUseSiteDiagnostics[0].Type; 3655var type2Element = ((NamedTypeSymbol)type2).TypeArgumentsWithAnnotationsNoUseSiteDiagnostics[0].Type; 3677private bool CanDowngradeConversionFromLambdaToNeither(BetterResult currentResult, UnboundLambda lambda, TypeSymbol type1, TypeSymbol type2, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, bool fromTypeAnalysis) 3706TypeSymbol r1 = invoke1.ReturnType; 3707TypeSymbol r2 = invoke2.ReturnType; 3801private static bool IsSignedIntegralType(TypeSymbol type) 3822private static bool IsUnsignedIntegralType(TypeSymbol type) 4691TypeSymbol parameterType, 4724var argType = argument.Type; 4764private static bool TypeContainsTypeParameterFromContainer(Symbol container, TypeSymbol parameterType)
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (7)
220TypeSymbol delegateOrFunctionPointerType = null, 664TypeSymbol delegateOrFunctionPointerType) 715private bool HadReturnMismatch(Location location, BindingDiagnosticBag diagnostics, TypeSymbol delegateOrFunctionPointerType) 1086TypeSymbol formalParameterType = method.GetParameterType(result.Result.BadParameter); 1244TypeSymbol parameterType = unwrapIfParamsCollection(badArg, parameter, isLastParameter) is TypeSymbol t ? t : parameter.Type; 1358if (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); 150private TypeSymbol? InferResultType(ImmutableArray<BoundSwitchExpressionArm> switchCases, BindingDiagnosticBag diagnostics) 152var seenTypes = Symbols.SpecializedSymbolCollections.GetPooledSymbolHashSetInstance<TypeSymbol>(); 153var typesInOrder = ArrayBuilder<TypeSymbol>.GetInstance(); 156var type = @case.Value.Type; 165var commonType = BestTypeInferrer.GetBestType(typesInOrder, Conversions, ref useSiteInfo); 189TypeSymbol inputType = GetInputType(inputExpression); 201internal TypeSymbol GetInputType(BoundExpression? inputExpression = null)
Binder\UsingStatementBinder.cs (4)
111TypeSymbol? declarationTypeOpt = null; 113TypeSymbol? awaitableTypeOpt; 184bool bindDisposable(bool fromExpression, out MethodArgumentInfo? patternDisposeInfo, out TypeSymbol? awaitableType) 189TypeSymbol? type = fromExpression ? expressionOpt!.Type : declarationTypeOpt;
Binder\WithClassTypeParametersBinder.cs (2)
30internal override bool IsAccessibleHelper(Symbol symbol, TypeSymbol accessThroughType, out bool failedThroughTypeCheck, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, ConsList<TypeSymbol> basesBeingResolved)
Binder\WithExtensionParameterBinder.cs (1)
37LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\WithExternAliasesBinder.cs (1)
33LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\WithExternAndUsingAliasesBinder.cs (5)
34protected abstract ImmutableDictionary<string, AliasAndUsingDirective> GetUsingAliasesMap(ConsList<TypeSymbol>? basesBeingResolved); 37LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 84internal bool IsUsingAlias(string name, bool callerIsSemanticModel, ConsList<TypeSymbol>? basesBeingResolved) 151protected override ImmutableDictionary<string, AliasAndUsingDirective> GetUsingAliasesMap(ConsList<TypeSymbol>? basesBeingResolved) 255protected override ImmutableDictionary<string, AliasAndUsingDirective> GetUsingAliasesMap(ConsList<TypeSymbol>? basesBeingResolved)
Binder\WithLambdaParametersBinder.cs (2)
47protected override TypeSymbol GetCurrentReturnType(out RefKind refKind) 87LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\WithParametersBinder.cs (1)
46LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\WithPrimaryConstructorParametersBinder.cs (1)
64LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\WithTypeParametersBinder.cs (1)
38LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\WithUsingNamespacesAndTypesBinder.cs (6)
35internal abstract ImmutableArray<NamespaceOrTypeAndUsingDirective> GetUsings(ConsList<TypeSymbol>? basesBeingResolved); 176LookupResult result, string name, int arity, ConsList<TypeSymbol>? basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 327internal override ImmutableArray<NamespaceOrTypeAndUsingDirective> GetUsings(ConsList<TypeSymbol>? basesBeingResolved) 357internal override ImmutableArray<NamespaceOrTypeAndUsingDirective> GetUsings(ConsList<TypeSymbol>? basesBeingResolved) 362private Imports GetImports(ConsList<TypeSymbol>? basesBeingResolved) 391internal override ImmutableArray<NamespaceOrTypeAndUsingDirective> GetUsings(ConsList<TypeSymbol>? basesBeingResolved)
BoundTree\BoundBinaryOperator.UncommonData.cs (3)
50public static UncommonData? CreateIfNeeded(ConstantValue? constantValue, MethodSymbol? method, TypeSymbol? constrainedToType, ImmutableArray<MethodSymbol> originalUserDefinedOperatorsOpt) 62public readonly TypeSymbol? ConstrainedToType; 71private 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) 411internal TypeSymbol? ConstrainedToType => Data?.ConstrainedToType; 549TypeSymbol? changeTypeOpt = null)
BoundTree\BoundExpressionExtensions.cs (3)
131var type = node.Type; 154public static TypeSymbol? GetTypeOrFunctionType(this BoundExpression expr) 274TypeSymbol? receiverType = expressionOpt.Type;
BoundTree\BoundExpressionWithNullability.cs (1)
11public BoundExpressionWithNullability(SyntaxNode syntax, BoundExpression expression, NullableAnnotation nullableAnnotation, TypeSymbol? type)
BoundTree\BoundNullCoalescingAssignmentOperator.cs (2)
15var leftType = LeftOperand.Type; 21var nullableUnderlying = leftType.GetNullableUnderlyingType();
BoundTree\BoundObjectCreationExpression.cs (3)
14BoundObjectInitializerExpressionBase? initializerExpressionOpt, TypeSymbol type, bool hasErrors = false) 19ImmutableArray<int> argsToParamsOpt, BitVector defaultArguments, ConstantValue? constantValueOpt, BoundObjectInitializerExpressionBase? initializerExpressionOpt, TypeSymbol type) 26BitVector defaultArguments, ConstantValue? constantValueOpt, BoundObjectInitializerExpressionBase? initializerExpressionOpt, TypeSymbol type)
BoundTree\BoundSpillSequence.cs (1)
20TypeSymbol type,
BoundTree\BoundTreeRewriter.cs (4)
17public virtual TypeSymbol? VisitType(TypeSymbol? type) 146if (symbol is TypeSymbol type) 281var type = this.VisitType(binary.Type);
BoundTree\Constructors.cs (32)
30TypeSymbol type, 43TypeSymbol type, 54TypeSymbol typeSymbol) 100TypeSymbol type, 118TypeSymbol type) 309TypeSymbol type, 324TypeSymbol type) 335public static BoundConversion SynthesizedNonUserDefined(SyntaxNode syntax, BoundExpression operand, Conversion conversion, TypeSymbol type, ConstantValue? constantValueOpt = null) 363TypeSymbol type, 389TypeSymbol type, 414TypeSymbol? constrainedToTypeOpt, 417TypeSymbol type, 435TypeSymbol? constrainedToTypeOpt, 439TypeSymbol type, 448TypeSymbol? constrainedToTypeOpt, 452TypeSymbol type) 495public BoundTypeExpression(SyntaxNode syntax, AliasSymbol? aliasOpt, TypeSymbol type, bool hasErrors = false) 527TypeSymbol type, bool isRef = false, bool hasErrors = false) 535public BoundBadExpression(SyntaxNode syntax, LookupResultKind resultKind, ImmutableArray<Symbol?> symbols, ImmutableArray<BoundExpression> childBoundNodes, TypeSymbol type) 615public BoundDefaultExpression(SyntaxNode syntax, TypeSymbol type, bool hasErrors = false) 631public BoundAddressOfOperator(SyntaxNode syntax, BoundExpression operand, TypeSymbol type, bool hasErrors = false) 639public BoundDagTemp(SyntaxNode syntax, TypeSymbol type, BoundDagEvaluation? source) 658TypeSymbol type, 672TypeSymbol type) 684TypeSymbol? constrainedToTypeOpt, 686TypeSymbol type, 696TypeSymbol? constrainedToTypeOpt, 698TypeSymbol type) 709TypeSymbol? constrainedToTypeOpt, 715TypeSymbol type, 721public 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 (6)
94bool foundInfo = _updatedNullabilities.TryGetValue(currentBinary, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType); 96var type = foundInfo ? infoAndType.Type : currentBinary.Type; 158TypeSymbol inputType = GetUpdatedSymbol(currentBinary, currentBinary.InputType); 159TypeSymbol narrowedType = GetUpdatedSymbol(currentBinary, currentBinary.NarrowedType); 190if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 293if (_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)
85public BoundLambda(SyntaxNode syntax, UnboundLambda unboundLambda, BoundBlock body, ReadOnlyBindingDiagnostic<AssemblySymbol> diagnostics, Binder binder, TypeSymbol? delegateType, InferredLambdaReturnType inferredReturnType) 195internal static readonly TypeSymbol NoReturnExpression = new UnsupportedMetadataTypeSymbol(); 198BoundLambda node, Binder binder, TypeSymbol? delegateType, bool isAsync, ConversionsBase conversions) 205UnboundLambda node, Binder binder, TypeSymbol? delegateType, bool isAsync, ConversionsBase conversions) 215BoundNode node, Binder binder, TypeSymbol? delegateType, bool isAsync, ConversionsBase conversions, bool withDependencies) 260TypeSymbol? delegateType, 283var bestType = returns[0].expr.GetTypeOrFunctionType(); 304var bestType = BestTypeInferrer.InferBestType(returns.SelectAsArray(pair => pair.expr), conversions, ref useSiteInfo, out inferredFromFunctionType); 392var type = (expression is null) ? 507public void GenerateAnonymousFunctionConversionError(BindingDiagnosticBag diagnostics, TypeSymbol targetType) { Data.GenerateAnonymousFunctionConversionError(diagnostics, targetType); } 513public TypeSymbol ParameterType(int index) { return ParameterTypeWithAnnotations(index).Type; } 630public virtual void GenerateAnonymousFunctionConversionError(BindingDiagnosticBag diagnostics, TypeSymbol targetType) 649internal IEnumerable<TypeSymbol> InferredReturnTypes() 1091Debug.Assert(taskLikeReturnTypeOpt is null || ((object)taskLikeReturnTypeOpt == taskLikeReturnTypeOpt.ConstructedFrom && taskLikeReturnTypeOpt.IsCustomTaskType(out var builderArgument))); 1108!TypeSymbol.Equals(other.TaskLikeReturnTypeOpt, this.TaskLikeReturnTypeOpt, TypeCompareKind.ConsiderEverything2)) 1181if (delegateReturnType.IsCustomTaskType(out var builderType))
CodeGen\CodeGenerator.cs (2)
183var returnType = returnTypeWithAnnotations.Type; 363private void EmitSymbolToken(TypeSymbol symbol, SyntaxNode syntaxNode)
CodeGen\CodeGenerator_HasHome.cs (2)
68var type = expression.Type; 245if (!TypeSymbol.Equals(field.ContainingType, containingSymbol.ContainingSymbol as NamedTypeSymbol, TypeCompareKind.AllIgnoreOptions))
CodeGen\CodeGenerator_RefSafety.cs (4)
12/// <inheritdoc cref="MightEscapeTemporaryRefs(bool, TypeSymbol, RefKind, ParameterSymbol?, ImmutableArray{ParameterSymbol})"/> 23/// <inheritdoc cref="MightEscapeTemporaryRefs(bool, TypeSymbol, RefKind, ParameterSymbol?, ImmutableArray{ParameterSymbol})"/> 34/// <inheritdoc cref="MightEscapeTemporaryRefs(bool, TypeSymbol, RefKind, ParameterSymbol?, ImmutableArray{ParameterSymbol})"/> 63TypeSymbol returnType,
CodeGen\EmitAddress.cs (5)
134var type = expression.Type; 239var receiverType = expression.Type; 406var elementType = arrayAccess.Type; 504var receiverType = receiver.Type; 534private static bool BoxNonVerifierReferenceReceiver(TypeSymbol receiverType, AddressKind addressKind)
CodeGen\EmitArrayInitializer.cs (5)
225TypeSymbol type = init.Type.EnumUnderlyingTypeOrSelf(); 246private ArrayInitializerStyle ShouldEmitBlockInitializer(TypeSymbol elementType, ImmutableArray<BoundExpression> inits) 470TypeSymbol? elementType = null; 630bool tryEmitAsCachedArrayFromBlob(NamedTypeSymbol spanType, BoundExpression wrappedExpression, int elementCount, ImmutableArray<byte> data, ref ArrayTypeSymbol arrayType, TypeSymbol elementType) 680bool tryEmitAsCachedArrayOfConstants(BoundArrayCreation arrayCreation, ArrayTypeSymbol arrayType, TypeSymbol elementType, NamedTypeSymbol spanType, bool used, BoundExpression? inPlaceTarget, out bool avoidInPlace)
CodeGen\EmitConversion.cs (10)
16private static bool IsNumeric(TypeSymbol type) 139var fromType = conversion.Operand.Type; 142var toType = conversion.Type; 214var fromType = conversion.Operand.Type; 218var toType = conversion.Type; 239var resultType = conversion.Type; 290var fromType = conversion.Operand.Type; 299var toType = conversion.Type; 311private void EmitDelegateCreation(BoundExpression node, BoundExpression receiver, bool isExtensionMethod, MethodSymbol method, TypeSymbol delegateType, bool used) 377private MethodSymbol DelegateConstructor(SyntaxNode syntax, TypeSymbol delegateType)
CodeGen\EmitExpression.cs (41)
382var receiverType = expression.Type; 409var receiverType = receiver.Type; 819var thisType = thisRef.Type; 1027var elementType = arrayAccess.Type; 1181TypeSymbol fieldType = field.Type; 1330var type = expr.Type; 1437var parameterType = parameter.ParameterSymbol.Type; 1442private void EmitLoadIndirect(TypeSymbol type, SyntaxNode syntaxNode) 1656Debug.Assert(TypeSymbol.Equals(method.ContainingType, receiver.Type, TypeCompareKind.ConsiderEverything2)); 1733var parentCallReceiverType = call.Type; 1858var receiverType = receiver.Type; 1894Debug.Assert(TypeSymbol.Equals(receiverType, methodContainingType, TypeCompareKind.ObliviousNullableModifierMatchesAny)); 1944var receiverType = receiver.Type; 2050var receiverType = receiver.Type; 2113var receiverType = receiver.Type; 2630var rightType = right.Type; 3251var elementType = arrayType.ElementType; 3349private void EmitIndirectStore(TypeSymbol type, SyntaxNode syntaxNode) 3451var operandType = operand.Type; 3452var targetType = asOp.Type; 3470private void EmitDefaultValue(TypeSymbol type, bool used, SyntaxNode syntaxNode) 3514private void EmitConstantExpression(TypeSymbol type, ConstantValue constantValue, bool used, SyntaxNode syntaxNode) 3533private void EmitInitObj(TypeSymbol type, bool used, SyntaxNode syntaxNode) 3556TypeSymbol type = boundTypeOfOperator.SourceType.Type; 3564TypeSymbol type = boundSizeOfOperator.SourceType.Type; 3731if (!TypeSymbol.Equals(node.Type, getMethod.ReturnType, TypeCompareKind.ConsiderEverything2)) 3758if (!TypeSymbol.Equals(node.Type, getField.ReturnType, TypeCompareKind.ConsiderEverything2)) 3823var mergeTypeOfAlternative = StackMergeType(expr.Alternative); 3831else if (expr.Type.IsInterfaceType() && !TypeSymbol.Equals(expr.Type, mergeTypeOfAlternative, TypeCompareKind.ConsiderEverything2)) 3849var mergeTypeOfConsequence = StackMergeType(expr.Consequence); 3855else if (expr.Type.IsInterfaceType() && !TypeSymbol.Equals(expr.Type, mergeTypeOfConsequence, TypeCompareKind.ConsiderEverything2)) 3884var mergeTypeOfLeftValue = StackMergeType(expr.LeftOperand); 3892else if (expr.Type.IsInterfaceType() && !TypeSymbol.Equals(expr.Type, mergeTypeOfLeftValue, TypeCompareKind.ConsiderEverything2)) 3916var mergeTypeOfRightValue = StackMergeType(expr.RightOperand); 3942private TypeSymbol StackMergeType(BoundExpression expr) 4000private static bool IsVarianceCast(TypeSymbol to, TypeSymbol from) 4002if (TypeSymbol.Equals(to, from, TypeCompareKind.ConsiderEverything2)) 4020return (to.IsDelegateType() && !TypeSymbol.Equals(to, from, TypeCompareKind.ConsiderEverything2)) || 4024private void EmitStaticCast(TypeSymbol to, SyntaxNode syntax) 4044private void EmitBox(TypeSymbol type, SyntaxNode syntaxNode)
CodeGen\EmitOperators.cs (4)
458var comparandType = comparand.Type; 472var comparandType = comparand.Type; 647TypeSymbol enumType; 659Debug.Assert(TypeSymbol.Equals(expression.Left.Type, expression.Right.Type, TypeCompareKind.ConsiderEverything2));
CodeGen\EmitStackAllocInitializer.cs (7)
16private void EmitStackAlloc(TypeSymbol type, BoundArrayInitialization? inits, BoundExpression count) 27var elementType = (type.TypeKind == TypeKind.Pointer 75Debug.Assert(TypeSymbol.Equals(readOnlySpan.OriginalDefinition, _module.Compilation.GetWellKnownType(WellKnownType.System_ReadOnlySpan_T), TypeCompareKind.ConsiderEverything)); 129private ArrayInitializerStyle ShouldEmitBlockInitializerForStackAlloc(TypeSymbol elementType, ImmutableArray<BoundExpression> inits) 181private void EmitElementStackAllocInitializers(TypeSymbol elementType, ImmutableArray<BoundExpression> inits, bool includeConstants) 199private void EmitPointerElementAccess(BoundExpression init, TypeSymbol elementType, int elementTypeSizeInBytes, int index) 226private void EmitIntConstantOrSizeOf(BoundExpression init, TypeSymbol elementType, int elementTypeSizeInBytes)
CodeGen\EmitStatement.cs (12)
178var exprType = thrown.Type; 200private static bool CanPassToBrfalse(TypeSymbol ts) 252var nonConstType = nonConstOp.Type; 530var receiverType = receiver.Type; 610var conditionType = condition.Type; 1372TypeSymbol keyType) 1487void emitFinalDispatches(LengthBasedStringSwitchData lengthBasedSwitchInfo, LocalOrParameter keyTemp, TypeSymbol keyType, LabelSymbol fallThroughLabel, SyntaxNode syntaxNode) 1517TypeSymbol keyType) 1658private Cci.IMethodReference? GetLengthMethodRef(SyntaxNode syntaxNode, TypeSymbol keyType, bool isReadOnlySpan, bool isSpanOrReadOnlySpan) 1682private Microsoft.Cci.IMethodReference? GetIndexerRef(SyntaxNode syntaxNode, TypeSymbol keyType, bool isReadOnlySpan, bool isSpanOrReadOnlySpan) 1828TypeSymbol pointedAtType = pointerType.PointedAtType; 1934private LocalDefinition AllocateTemp(TypeSymbol type, SyntaxNode syntaxNode, LocalSlotConstraints slotConstraints = LocalSlotConstraints.None)
CodeGen\Optimizer.cs (8)
1204var receiverType = receiver.Type; 1239var receiverType = receiver.Type; 1535var type = this.VisitType(binary.Type); 1753var exceptionTypeOpt = this.VisitType(node.ExceptionTypeOpt); 2112var type = this.VisitType(binary.Type); 2157TypeSymbol type = this.VisitType(node.Type); 2292TypeSymbol? type = this.VisitType(node.Type); 2301var 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 (44)
62private TypeSymbol? _lazyHostObjectTypeSymbol; 150private ConcurrentCache<TypeSymbol, NamedTypeSymbol>? _lazyTypeToNullableVersion; 359var methodReturn = method.ReturnType.OriginalDefinition; 1745private ConcurrentCache<TypeSymbol, NamedTypeSymbol> TypeToNullableVersion 1749return InterlockedOperations.Initialize(ref _lazyTypeToNullableVersion, static () => new ConcurrentCache<TypeSymbol, NamedTypeSymbol>(size: 100)); 1760internal NamedTypeSymbol GetOrCreateNullableType(TypeSymbol typeArgument) 1777static bool isSupportedType(TypeSymbol typeArgument) 1821internal TypeSymbol GetTypeByReflectionType(Type type, BindingDiagnosticBag diagnostics) 1823var result = Assembly.GetTypeByReflectionType(type); 1848internal TypeSymbol? GetHostObjectTypeSymbol() 1852TypeSymbol? symbol = Assembly.GetTypeByReflectionType(HostObjectType); 1894internal new TypeSymbol DynamicType 2260if (!(TypeSymbol.Equals(namedType.ConstructedFrom, GetWellKnownType(WellKnownType.System_Threading_Tasks_Task), TypeCompareKind.ConsiderEverything2) || 2261TypeSymbol.Equals(namedType.ConstructedFrom, GetWellKnownType(WellKnownType.System_Threading_Tasks_Task_T), TypeCompareKind.ConsiderEverything2))) 2278var returnType = result?.Type ?? runtimeAwaitCall!.Type; 2296TypeSymbol returnType = method.ReturnType; 2391TypeSymbol? cssource = source.EnsureCSharpSymbolOrNull(nameof(source)); 2392TypeSymbol? csdest = destination.EnsureCSharpSymbolOrNull(nameof(destination)); 2450internal ArrayTypeSymbol CreateArrayTypeSymbol(TypeSymbol elementType, int rank = 1, NullableAnnotation elementNullableAnnotation = NullableAnnotation.Oblivious) 2468internal PointerTypeSymbol CreatePointerTypeSymbol(TypeSymbol elementType, NullableAnnotation elementNullableAnnotation = NullableAnnotation.Oblivious) 2485TypeSymbol? throughType0 = throughType.EnsureCSharpSymbolOrNull(nameof(throughType)); 4263var elementType = typeSymbol.EnsureCSharpSymbolOrNull($"{nameof(elementTypes)}[{i}]"); 4329var type = memberTypes[i].GetSymbol(); 4347var csharpReturnType = returnType.EnsureCSharpSymbolOrNull(nameof(returnType)); 4348var csharpLeftType = leftType.EnsureCSharpSymbolOrNull(nameof(leftType)); 4349var csharpRightType = rightType.EnsureCSharpSymbolOrNull(nameof(rightType)); 4417TypeSymbol.Equals(csharpLeftType, csharpRightType, TypeCompareKind.ConsiderEverything)) 4430TypeSymbol.Equals(csharpLeftType, csharpReturnType, TypeCompareKind.ConsiderEverything)) 4451TypeSymbol.Equals(csharpLeftType, csharpRightType, TypeCompareKind.ConsiderEverything)) 4462TypeSymbol.Equals(csharpLeftType, csharpRightType, TypeCompareKind.ConsiderEverything) && 4463TypeSymbol.Equals(csharpReturnType, csharpRightType, TypeCompareKind.ConsiderEverything)) 4476TypeSymbol.Equals(csharpLeftType, csharpReturnType, TypeCompareKind.ConsiderEverything)) 4483TypeSymbol.Equals(csharpRightType, csharpReturnType, TypeCompareKind.ConsiderEverything)) 4492TypeSymbol.Equals(csharpLeftType, csharpRightType, TypeCompareKind.ConsiderEverything)) 4516TypeSymbol.Equals(csharpLeftType, csharpReturnType, TypeCompareKind.ConsiderEverything)) 4525TypeSymbol.Equals(csharpRightType, csharpReturnType, TypeCompareKind.ConsiderEverything)) 4534TypeSymbol.Equals(csharpLeftType, csharpReturnType, TypeCompareKind.ConsiderEverything)) 4543TypeSymbol.Equals(csharpLeftType, csharpRightType, TypeCompareKind.ConsiderEverything)) 4560bool isAllowedPointerArithmeticIntegralType(TypeSymbol type) 4563bool isReadOnlySpanOfByteType(TypeSymbol type) 4572var csharpReturnType = returnType.EnsureCSharpSymbolOrNull(nameof(returnType)); 4573var csharpOperandType = operandType.EnsureCSharpSymbolOrNull(nameof(operandType)); 4626TypeSymbol.Equals(csharpOperandType, csharpReturnType, TypeCompareKind.ConsiderEverything)) 4634TypeSymbol.Equals(csharpOperandType, csharpReturnType, TypeCompareKind.ConsiderEverything))
Compilation\CSharpCompilation.UsingsFromOptionsAndDiagnostics.cs (2)
149var typeSymbol = (TypeSymbol)target;
Compilation\CSharpCompilationExtensions.cs (1)
22internal static bool ShouldEmitNativeIntegerAttributes(this CSharpCompilation compilation, TypeSymbol type)
Compilation\CSharpSemanticModel.cs (25)
967var declarationTypeSymbol = declarationType.GetSymbol(); 1594TypeSymbol containingType = binder.ContainingType; 1595TypeSymbol baseType = null; 1658if ((options & LookupOptions.IncludeExtensionMembers) != 0 && container is TypeSymbol receiverType) 2047TypeSymbol type = null; 2087TypeSymbol convertedType; 2266static (TypeSymbol, NullabilityInfo) getTypeAndNullability(BoundExpression expr) => (expr.Type, expr.TopLevelNullability); 2317TypeSymbol type = unwrapped as TypeSymbol; 2354TypeSymbol type = UnwrapAlias(symbol) as TypeSymbol; 2834TypeSymbol cdestination = destination.EnsureCSharpSymbolOrNull(nameof(destination)); 2880internal abstract Conversion ClassifyConversionForCast(ExpressionSyntax expression, TypeSymbol destination); 2896internal Conversion ClassifyConversionForCast(int position, ExpressionSyntax expression, TypeSymbol destination) 3733private static ParameterSymbol GetThisParameter(TypeSymbol typeOfThis, NamedTypeSymbol containingType, Symbol containingMember, out LookupResultKind resultKind) 3840TypeSymbol opType = increment.Operand.Type.StrippedType(); 3892private static Symbol GetIntrinsicOperatorSymbol(BinaryOperatorKind op, bool isDynamic, TypeSymbol leftType, TypeSymbol rightType, TypeSymbol returnType, bool isChecked) 3996TypeSymbol.Equals((TypeSymbol)unwrappedSymbols[0], boundAttribute.Type.GetNonErrorGuess(), TypeCompareKind.ConsiderEverything2)); 4093TypeSymbol type = boundNode.Type; 4682TypeSymbol receiverType, 4708TypeSymbol receiverType, 4751TypeSymbol receiverType = null;
Compilation\MemberSemanticModel.cs (2)
440TypeSymbol csdestination = destination.EnsureCSharpSymbolOrNull(nameof(destination)); 489TypeSymbol destination)
Compilation\MemberSemanticModel.NodeMapBuilder.cs (2)
96TypeSymbol.Equals(((BoundTypeExpression)existing[i]).Type, ((BoundTypeOrValueExpression)nodesToAdd[i]).Type, TypeCompareKind.ConsiderEverything2), 104TypeSymbol.Equals(((BoundTypeOrValueExpression)existing[i]).Type, ((BoundTypeExpression)nodesToAdd[i]).Type, TypeCompareKind.ConsiderEverything2),
Compilation\SpeculativeSemanticModelWithMemberModel.cs (1)
230TypeSymbol destination)
Compilation\SyntaxTreeSemanticModel.cs (4)
501private ConsList<TypeSymbol> GetBasesBeingResolved(TypeSyntax expression) 513return ConsList<TypeSymbol>.Empty.Prepend(symbol.GetSymbol().OriginalDefinition); 522TypeSymbol csdestination = destination.EnsureCSharpSymbolOrNull(nameof(destination)); 558internal override Conversion ClassifyConversionForCast(ExpressionSyntax expression, TypeSymbol destination)
Compilation\TypeInfo.cs (6)
23public readonly TypeSymbol Type; 31public readonly TypeSymbol ConvertedType; 41internal CSharpTypeInfo(TypeSymbol type, TypeSymbol convertedType, NullabilityInfo nullability, NullabilityInfo convertedNullability, Conversion implicitConversion) 67&& TypeSymbol.Equals(this.Type, other.Type, TypeCompareKind.ConsiderEverything2) 68&& TypeSymbol.Equals(this.ConvertedType, other.ConvertedType, TypeCompareKind.ConsiderEverything2)
Compiler\ClsComplianceChecker.cs (8)
716TypeSymbol type; 981private bool IsCompliantType(TypeSymbol type, NamedTypeSymbol context) 1100return !TypeSymbol.Equals(containingType, contextBaseType, TypeCompareKind.AllIgnoreOptions); 1116System.Diagnostics.Debug.Assert(symbol.Kind == SymbolKind.NamedType || !((symbol is TypeSymbol)), 1369TypeSymbol xType = xParameterTypes[i].Type; 1370TypeSymbol yType = yParameterTypes[i].Type; 1385bool elementTypesDiffer = !TypeSymbol.Equals(xArrayType.ElementType, yArrayType.ElementType, TypeCompareKind.ConsiderEverything2); 1398else if (!TypeSymbol.Equals(xType, yType, TypeCompareKind.ConsiderEverything2))
Compiler\DocumentationCommentCompiler.cs (1)
1238diagnostics.AddDependencies(symbol as TypeSymbol ?? symbol.ContainingType);
Compiler\MethodBodySynthesizer.cs (3)
348TypeSymbol delegateType = eventSymbol.Type; 352TypeSymbol boolType = compilation.GetSpecialType(SpecialType.System_Boolean); 421compareExchangeMethod = compareExchangeMethod.Construct(ImmutableArray.Create<TypeSymbol>(delegateType));
Compiler\MethodBodySynthesizer.Lowered.cs (3)
249this.ImplementingMethod.Construct(this.TypeParameters.Cast<TypeParameterSymbol, TypeSymbol>()) : 329methodBeingWrapped = methodBeingWrapped.ConstructedFrom.Construct(StaticCast<TypeSymbol>.From(this.TypeParameters)); 360TypeSymbol system_Int32 = currentHashValue.Type!;
Compiler\MethodCompiler.cs (3)
245var returnType = entryPoint.ReturnType; 596TypeSymbol discarded = fieldSymbol.FixedImplementationType(compilationState.ModuleBuilderOpt); 2503if (ctorCall != null && !ctorCall.HasAnyErrors && ctorCall.Method != method && TypeSymbol.Equals(ctorCall.Method.ContainingType, method.ContainingType, TypeCompareKind.ConsiderEverything2))
Declarations\DeclarationTreeBuilder.cs (1)
221name: TypeSymbol.ImplicitTypeName,
DocumentationComments\DocumentationCommentIDVisitor.PartVisitor.cs (1)
191if (!_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)
164var otherElementType = (TypeSymbol?)Visit(symbol.ElementType); 310var newType = (TypeSymbol?)v.Visit(t.Type); 390var otherPointedAtType = (TypeSymbol?)Visit(symbol.PointedAtType); 405var otherReturnType = (TypeSymbol?)Visit(sig.ReturnType); 424var otherType = (TypeSymbol?)Visit(param.Type); 539var otherType = type.WithTypeAndModifiers((TypeSymbol?)this.Visit(type.Type), this.VisitCustomModifiers(type.CustomModifiers)); 761private bool AreTypesEqual(TypeSymbol type, TypeSymbol other) 836public bool Equals(TypeSymbol source, TypeSymbol other) 843var visitedSource = (TypeSymbol?)_matcher.Visit(source); 844var visitedOther = (_deepTranslator != null) ? (TypeSymbol)_deepTranslator.Visit(other) : other; 875var translatedElementType = (TypeSymbol)this.Visit(symbol.ElementType); 897var translatedTypeArguments = type.GetAllTypeArguments(ref discardedUseSiteInfo).SelectAsArray((t, v) => t.WithTypeAndModifiers((TypeSymbol)v.Visit(t.Type), 918var translatedPointedAtType = (TypeSymbol)this.Visit(symbol.PointedAtType); 926var translatedReturnType = (TypeSymbol)Visit(sig.ReturnType); 940var translatedParamType = (TypeSymbol)Visit(param.Type);
Emitter\EditAndContinue\PEDeltaAssemblyBuilder.cs (3)
82internal override Cci.ITypeReference EncTranslateLocalVariableType(TypeSymbol type, DiagnosticBag diagnostics) 86var visited = (TypeSymbol)_deepTranslator.Visit(type);
Emitter\Model\AttributeDataAdapter.cs (4)
149return new MetadataTypeOf(moduleBeingBuilt.Translate((TypeSymbol)argument.ValueInternal, syntaxNodeOpt, diagnostics), 150moduleBeingBuilt.Translate((TypeSymbol)argument.TypeInternal, syntaxNodeOpt, diagnostics)); 156return moduleBeingBuilt.CreateConstant((TypeSymbol)type, value, syntaxNodeOpt: (CSharpSyntaxNode)context.SyntaxNode, diagnostics: context.Diagnostics); 163TypeSymbol type;
Emitter\Model\FieldSymbolAdapter.cs (1)
38var implType = isFixed ? AdaptedFieldSymbol.FixedImplementationType(moduleBeingBuilt) : fieldTypeWithAnnotations.Type;
Emitter\Model\NamedTypeSymbolAdapter.cs (1)
368TypeSymbol objectType = AdaptedNamedTypeSymbol.DeclaringCompilation.GetSpecialType(CodeAnalysis.SpecialType.System_Object);
Emitter\Model\ParameterSymbolAdapter.cs (1)
85TypeSymbol type;
Emitter\Model\PEModuleBuilder.cs (9)
28internal abstract class PEModuleBuilder : PEModuleBuilder<CSharpCompilation, SourceModuleSymbol, AssemblySymbol, TypeSymbol, NamedTypeSymbol, MethodSymbol, SyntaxNode, NoPia.EmbeddedTypesManager, ModuleCompilationState> 35private readonly ConcurrentSet<TypeSymbol> _reportedErrorTypesMap = new ConcurrentSet<TypeSymbol>(); 1288TypeSymbol typeSymbol, 1800internal SynthesizedAttributeData SynthesizeNativeIntegerAttribute(Symbol symbol, TypeSymbol type) 2001TypeSymbol returnType = factory.SpecialType(SpecialType.System_Void); 2002TypeSymbol unmatchedValueType = factory.SpecialType(SpecialType.System_Object); 2048TypeSymbol returnType = factory.SpecialType(SpecialType.System_Void); 2068TypeSymbol returnType = factory.SpecialType(SpecialType.System_Void);
Emitter\NoPia\EmbeddedTypesManager.cs (1)
67if (TypeSymbol.Equals(Interlocked.CompareExchange(ref _lazySystemStringType, typeSymbol, ErrorTypeSymbol.UnknownResultType), ErrorTypeSymbol.UnknownResultType, TypeCompareKind.ConsiderEverything2))
Errors\LazyMissingNonNullTypesContextDiagnosticInfo.cs (1)
83internal static bool IsNullableReference(TypeSymbol type)
FlowAnalysis\AbstractFlowPass.cs (1)
1456private static bool TypeIsImmutable(TypeSymbol t)
FlowAnalysis\DefiniteAssignment.cs (9)
245Debug.Assert(member is TypeSymbol type && 434TypeSymbol parameterType = parameter.Type; 852internal static bool WriteConsideredUse(TypeSymbol type, BoundExpression value) 1080private bool MayRequireTrackingReceiverType(TypeSymbol type) 1644TypeSymbol structType = variable.Symbol.GetTypeOrReturnType().Type; 1680TypeSymbol type = id.Symbol.GetTypeOrReturnType().Type; 1716TypeSymbol type = id.Symbol.GetTypeOrReturnType().Type; 2539if (refKind != RefKind.None && ((object)method == null || method.IsExtern) && arg.Type is TypeSymbol type) 2586private void MarkFieldsUsed(TypeSymbol type)
FlowAnalysis\DefiniteAssignment.LocalFunctions.cs (1)
105var type = id.Symbol.GetTypeOrReturnType().Type;
FlowAnalysis\EmptyStructTypeCache.cs (8)
70public override bool IsEmptyStructType(TypeSymbol type) 79public virtual bool IsEmptyStructType(TypeSymbol type) 89private bool IsEmptyStructType(TypeSymbol type, ConsList<NamedTypeSymbol> typesWithMembersOfThisType) 124public static bool IsTrackableStructType(TypeSymbol type) 148var actualFieldType = field.Type; 163public IEnumerable<FieldSymbol> GetStructInstanceFields(TypeSymbol type) 216private bool ShouldIgnoreStructField(Symbol member, TypeSymbol memberType) 229private static bool IsIgnorableType(TypeSymbol type)
FlowAnalysis\FlowAnalysisPass.cs (1)
79var submissionResultType = (method as SynthesizedInteractiveInitializerMethod)?.ResultType;
FlowAnalysis\LocalDataFlowPass.cs (4)
92protected virtual bool IsEmptyStructType(TypeSymbol type) 126var variableType = symbol.GetTypeOrReturnType().Type; 165TypeSymbol containingType = symbol.ContainingType; 172while (!TypeSymbol.Equals(containingType, symbol.ContainingType, TypeCompareKind.ConsiderEverything))
FlowAnalysis\NullableWalker.cs (172)
145public VisitResult(TypeSymbol? type, NullableAnnotation annotation, NullableFlowState state) 149Debug.Assert(TypeSymbol.Equals(RValueType.Type, LValueType.Type, TypeCompareKind.ConsiderEverything)); 241private readonly ImmutableDictionary<BoundExpression, (NullabilityInfo Info, TypeSymbol? Type)>.Builder? _analyzedNullabilityMapOpt; 492ImmutableDictionary<BoundExpression, (NullabilityInfo, TypeSymbol?)>.Builder? analyzedNullabilityMapOpt, 980static ImmutableArray<Symbol> getAllTypeAndRequiredMembers(TypeSymbol containingType) 1608ImmutableDictionary<BoundExpression, (NullabilityInfo, TypeSymbol?)> analyzedNullabilitiesMap; 1613private static (SnapshotManager?, ImmutableDictionary<BoundExpression, (NullabilityInfo, TypeSymbol?)>) AnalyzeWithSemanticInfo( 1623var analyzedNullabilities = ImmutableDictionary.CreateBuilder<BoundExpression, (NullabilityInfo, TypeSymbol?)>(EqualityComparer<BoundExpression>.Default, NullabilityInfoTypeComparer.Instance); 1681var analyzedNullabilities = ImmutableDictionary.CreateBuilder<BoundExpression, (NullabilityInfo, TypeSymbol?)>(EqualityComparer<BoundExpression>.Default, NullabilityInfoTypeComparer.Instance); 1721private static BoundNode Rewrite(ImmutableDictionary<BoundExpression, (NullabilityInfo, TypeSymbol?)> updatedNullabilities, SnapshotManager? snapshotManager, BoundNode node, ref ImmutableDictionary<Symbol, Symbol>? remappedSymbols) 1848ImmutableDictionary<BoundExpression, (NullabilityInfo, TypeSymbol?)>.Builder? analyzedNullabilityMapOpt, 2126TypeSymbol slotType = NominalSlotType(result); 2127TypeSymbol? nodeType = node.Type; 2163var operandType = operand.Type; 2164var convertedType = conv.Type; 2181TypeSymbol.Equals(conv.Type, conv.Operand.Type, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes): 2350private static object GetTypeAsDiagnosticArgument(TypeSymbol? typeOpt) 2708private void InheritNullableStateOfTrackableStruct(TypeSymbol targetType, int targetSlot, int valueSlot, bool isDefaultValue, int skipSlot = -1) 2733TypeSymbol possibleBase = possibleMember.ContainingType; 2734TypeSymbol possibleDerived = NominalSlotType(slot); 2817private TypeSymbol NominalSlotType(int slot) 2849private void InheritDefaultState(TypeSymbol targetType, int targetSlot) 2854var actualType = GetTypeOrReturnType(_variables[targetSlot].Symbol); 2879private static TypeSymbol GetTypeOrReturnType(Symbol symbol) => symbol.GetTypeOrReturnType().Type; 3741private static bool AreCloseEnough(TypeSymbol? typeA, TypeSymbol? typeB) 3757static bool canIgnoreAnyType(TypeSymbol type) 3761static bool canIgnoreType(TypeSymbol type) 3807private static bool TypeAllowsConditionalState(TypeSymbol? type) 3813private void UnsplitIfNeeded(TypeSymbol? type) 3874var elementConversionCompletions = ArrayBuilder<Func<TypeWithAnnotations /*targetElementType*/, TypeSymbol /*targetCollectionType*/, TypeWithState>>.GetInstance(); 3902void visitElement(BoundNode element, BoundCollectionExpression node, TypeWithAnnotations targetElementType, ArrayBuilder<Func<TypeWithAnnotations, TypeSymbol, TypeWithState>> elementConversionCompletions) 3994TypeWithState convertCollection(BoundCollectionExpression node, TypeWithAnnotations targetCollectionType, ArrayBuilder<Func<TypeWithAnnotations, TypeSymbol, TypeWithState>> completions) 3996var strippedTargetCollectionType = targetCollectionType.Type.StrippedType(); 3997Debug.Assert(TypeSymbol.Equals(strippedTargetCollectionType, node.Type, TypeCompareKind.AllIgnoreOptions)); 4036(CollectionExpressionTypeKind, TypeWithAnnotations) getCollectionDetails(BoundCollectionExpression node, TypeSymbol collectionType) 4099var type = node.Type; 4101(int slot, NullableFlowState resultState, Func<TypeSymbol, MethodSymbol?, int>? initialStateInferenceCompletion) = 4104Action<int, TypeSymbol>? initializerCompletion = null; 4116TypeSymbol? type, 4119Func<TypeSymbol, MethodSymbol?, int>? initialStateInferenceCompletion, 4120Action<int, TypeSymbol>? initializerCompletion, 4148Func<TypeSymbol, MethodSymbol?, int> initialStateInferenceCompletion, 4149Action<int, TypeSymbol>? initializerCompletion, 4157Debug.Assert(TypeSymbol.Equals(resultTypeWithAnnotations.Type, node.Type, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes)); 4159var type = resultTypeWithAnnotations.Type; 4172static MethodSymbol? getConstructor(BoundObjectCreationExpressionBase node, TypeSymbol type) 4184(int slot, NullableFlowState resultState, Func<TypeSymbol, MethodSymbol?, int>? completion) inferInitialObjectState( 4185BoundExpression node, TypeSymbol type, MethodSymbol? constructor, 4255Func<TypeSymbol, MethodSymbol?, int> inferInitialObjectStateAsContinuation( 4261return (TypeSymbol type, MethodSymbol? constructor) => 4275private Action<int, TypeSymbol>? VisitObjectCreationInitializer(int containingSlot, TypeSymbol containingType, BoundObjectInitializerExpressionBase node, bool delayCompletionForType) 4278Action<int, TypeSymbol>? completion = null; 4325private Action<int, TypeSymbol>? VisitObjectElementInitializer(int containingSlot, TypeSymbol containingType, BoundAssignmentOperator node, bool delayCompletionForType) 4344Action<int, TypeSymbol>? visitMemberInitializer(int containingSlot, TypeSymbol containingType, BoundAssignmentOperator node, bool delayCompletionForType) 4383Action<int, TypeSymbol>? setAnalyzedNullability( 4405Action<int, TypeSymbol>? setAnalyzedNullabilityAsContinuation( 4411return (int containingSlot, TypeSymbol containingType) => 4425Symbol? getTargetMember(TypeSymbol containingType, BoundObjectInitializerMember objectInitializer) 4433Debug.Assert(TypeSymbol.Equals(objectInitializer.Type, GetTypeOrReturnType(symbol), TypeCompareKind.IgnoreNullableModifiersForReferenceTypes)); 4481Action<int, Symbol>? visitNestedInitializer(int containingSlot, TypeSymbol containingType, Symbol symbol, BoundObjectInitializerExpressionBase initializer, bool delayCompletionForType) 4486Action<int, TypeSymbol>? nestedCompletion = VisitObjectCreationInitializer(slot, GetTypeOrReturnType(symbol), initializer, delayCompletionForType); 4492Symbol symbol, BoundObjectInitializerExpressionBase initializer, int slot, Action<int, TypeSymbol>? nestedCompletion, 4513Action<int, Symbol>? completeNestedInitializerAnalysisAsContinuation(BoundObjectInitializerExpressionBase initializer, Action<int, TypeSymbol>? nestedCompletion) 4574private Action<int, TypeSymbol>? VisitCollectionElementInitializer(BoundCollectionElementInitializer node, TypeSymbol containingType, bool delayCompletionForType) 4600Debug.Assert(TypeSymbol.Equals(containingType, receiverResult.RValueType.Type, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes)); 4601Debug.Assert(TypeSymbol.Equals(containingType, receiverResult.LValueType.Type, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes)); 4607Action<int, TypeSymbol>? setUpdatedSymbol( 4609TypeSymbol containingType, 4634Action<int, TypeSymbol>? setUpdatedSymbolAsContinuation( 4639return (int containingSlot, TypeSymbol containingType) => 4649static MethodSymbol addMethodAsMemberOfContainingType(BoundCollectionElementInitializer node, TypeSymbol containingType, ref ImmutableArray<VisitResult> argumentResults) 4658Debug.Assert(TypeSymbol.Equals(containingType, receiverResult.RValueType.Type, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes)); 4659Debug.Assert(TypeSymbol.Equals(containingType, receiverResult.LValueType.Type, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes)); 4697protected override bool IsEmptyStructType(TypeSymbol type) 4833var arrayType = VisitArrayInitialization(node.Type, initialization, node.HasErrors); 4838private TypeSymbol VisitArrayInitialization(TypeSymbol type, BoundArrayInitialization initialization, bool hasErrors) 4855var resultType = type; 4888TypeSymbol? bestType = null; 4943static TypeSymbol setSpanElementType(NamedTypeSymbol namedType, TypeWithAnnotations elementType) 5007TypeSymbol? bestType = BestTypeInferrer.InferBestType(placeholders, walker._conversions, ref discardedUseSiteInfo, out inferredFromFunctionType); 5074TypeSymbol.Equals(node.Indices[0].Type, compilation.GetWellKnownType(WellKnownType.System_Range), TypeCompareKind.ConsiderEverything2)) 5091var expressionType = VisitRvalueWithState(node.Expression).Type; 5110private TypeWithState InferResultNullability(BinaryOperatorKind operatorKind, MethodSymbol? methodOpt, TypeSymbol resultType, TypeWithState leftType, TypeWithState rightType) 5350TypeSymbol returnType, 5437TypeSymbol methodContainer = method.ContainingType; 5442TypeSymbol asMemberOfType = getTypeIfContainingType(methodContainer, leftUnderlyingType.Type, leftOperand) ?? 5483TypeSymbol? getTypeIfContainingType(TypeSymbol baseType, TypeSymbol? derivedType, BoundExpression operand) 5680var receiverType = conditional.Receiver.Type!; 5726private static bool PossiblyNullableType([NotNullWhen(true)] TypeSymbol? operandType) => operandType?.CanContainNull() == true; 5782private void LearnFromNullTest(int slot, TypeSymbol? expressionType, ref LocalState state, bool markDependentSlotsNotNull) 5802private void MarkDependentSlotsNotNull(int slot, TypeSymbol expressionType, ref LocalState state, int depth = 2) 5824static IEnumerable<Symbol> getMembers(TypeSymbol type) 5842static NamedTypeSymbol effectiveBase(TypeSymbol type) => type switch 5848static ImmutableArray<NamedTypeSymbol> inheritedInterfaces(TypeSymbol type) => type switch 5894TypeSymbol.Equals(targetType.Type.GetNullableUnderlyingType(), node.Type, TypeCompareKind.AllIgnoreOptions)); 5904Debug.Assert(TypeSymbol.Equals(targetType.Type, rightResult.Type, TypeCompareKind.AllIgnoreOptions)); 5947var leftResultType = leftResult.Type; 5948var rightResultType = rightResult.Type; 5964(TypeSymbol ResultType, NullableFlowState LeftState) getLeftResultType(TypeSymbol leftType, TypeSymbol rightType) 5982(TypeSymbol ResultType, NullableFlowState LeftState) getResultStateWithRightType(TypeSymbol leftType, TypeSymbol rightType) 6169TypeSymbol accessType = accessTypeWithAnnotations.Type; 6170var oldType = node.Type; 6171var resultType = 6235TypeSymbol? refResultType = node.Type?.SetUnknownNullabilityForReferenceTypes(); 6271TypeSymbol? resultType; 6496var rvalueType = _currentConditionalReceiverVisitResult.RValueType.Type; 6871static bool isWellKnownEqualityMethodOrImplementation(CSharpCompilation compilation, MethodSymbol method, TypeSymbol? receiverType, WellKnownMember wellKnownMember) 6891for (var baseType = receiverType; baseType is object && method is object; baseType = baseType.BaseTypeNoUseSiteDiagnostics) 7069var type = receiverType.Type; 7721void applyMemberPostConditions(int receiverSlot, TypeSymbol type, ImmutableArray<string> members, ref LocalState state) 7734void markMembersAsNotNull(int receiverSlot, TypeSymbol type, string memberName, ref LocalState state) 7918var argumentResultType = resultType.Type; 8006static bool hasNoNonNullableCounterpart(TypeSymbol? type) 8714private Conversion GenerateConversionForConditionalOperator(BoundExpression sourceExpression, TypeSymbol? sourceType, TypeSymbol destinationType, bool reportMismatch, bool isChecked) 8725private Conversion GenerateConversion(Conversions conversions, BoundExpression? sourceExpression, TypeSymbol? sourceType, TypeSymbol destinationType, bool fromExplicitCast, bool extensionMethodThisArgument, bool isChecked) 8803private static Symbol AsMemberOfType(TypeSymbol? type, Symbol symbol) 9018private static bool AreNullableAndUnderlyingTypes([NotNullWhen(true)] TypeSymbol? nullableTypeOpt, [NotNullWhen(true)] TypeSymbol? underlyingTypeOpt, out TypeWithAnnotations underlyingTypeWithAnnotations) 9144private void TrackNullableStateOfNullableValue(int containingSlot, TypeSymbol containingType, BoundExpression? value, TypeWithState valueType, int valueSlot) 9161TypeSymbol targetType, 9162TypeSymbol operandType, 9270private void ReportNullabilityMismatchWithTargetDelegate(Location location, TypeSymbol targetType, MethodSymbol targetInvokeMethod, MethodSymbol sourceInvokeMethod, bool invokedAsExtensionMethod) 9288void reportBadDelegateReturn(BindingDiagnosticBag bag, MethodSymbol targetInvokeMethod, MethodSymbol sourceInvokeMethod, bool topLevel, (TypeSymbol targetType, Location location) arg) 9295void reportBadDelegateParameter(BindingDiagnosticBag bag, MethodSymbol sourceInvokeMethod, MethodSymbol targetInvokeMethod, ParameterSymbol parameter, bool topLevel, (TypeSymbol targetType, Location location) arg) 9473TypeSymbol targetType = targetTypeWithNullability.Type; 9497static (MethodSymbol invokeSignature, ImmutableArray<ParameterSymbol>) getDelegateOrFunctionPointerInfo(TypeSymbol targetType) 9767static TypeWithState calculateResultType(TypeWithAnnotations targetTypeWithNullability, bool fromExplicitCast, NullableFlowState resultState, bool isSuppressed, TypeSymbol targetType) 9791var type = operandType.Type; 9822var type = operandType.Type; 9991TypeSymbol targetType = targetTypeWithNullability.Type; 10162TypeSymbol type = typeNeedsLifting ? MakeNullableOf(returnType) : returnType.Type; 10171var type = typeWithState.Type; 10187private TypeSymbol MakeNullableOf(TypeWithAnnotations underlying) 10296Debug.Assert(TypeSymbol.Equals(resultTypeWithAnnotations.Type, node.Type, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes)); 10374TypeSymbol argType = arg.Type; 10393TypeSymbol argType = arg.Type; 11416private void ReportNullabilityMismatchInRefArgument(BoundExpression argument, TypeSymbol argumentType, ParameterSymbol parameter, TypeSymbol parameterType) 11428private void ReportNullabilityMismatchInArgument(SyntaxNode argument, TypeSymbol argumentType, ParameterSymbol parameter, TypeSymbol parameterType, bool forOutput) 11433private void ReportNullabilityMismatchInArgument(Location argumentLocation, TypeSymbol argumentType, ParameterSymbol? parameterOpt, TypeSymbol parameterType, bool forOutput) 11530var receiverType = VisitRvalueWithState(receiverOpt).Type; 11667private int GetNullableOfTValueSlot(TypeSymbol containingType, int containingSlot, out Symbol? valueProperty, bool forceSlotEvenIfEmpty = false) 11670Debug.Assert(TypeSymbol.Equals(NominalSlotType(containingSlot), containingType, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes)); 11731var resultType = resultTypeWithState.Type; 11842TypeSymbol? getEnumeratorType; 12444TypeSymbol type = node.Type; 12497var type = node.Type; 12754var resultTypeSymbol = resultType.Type; 12774private bool ReportPossibleNullReceiverIfNeeded(TypeSymbol type, NullableFlowState state, bool checkNullableValueType, SyntaxNode syntax, out bool reportedDiagnostic) 12815private static bool IsNullabilityMismatch(TypeSymbol type1, TypeSymbol type2) 12902var type = VisitArrayInitialization(node.Type, initialization, node.HasErrors); 13611private sealed class NullabilityInfoTypeComparer : IEqualityComparer<(NullabilityInfo info, TypeSymbol? type)> 13615public bool Equals((NullabilityInfo info, TypeSymbol? type) x, (NullabilityInfo info, TypeSymbol? type) y) 13621public int GetHashCode((NullabilityInfo info, TypeSymbol? type) obj)
FlowAnalysis\NullableWalker.DebugVerifier.cs (3)
21private readonly ImmutableDictionary<BoundExpression, (NullabilityInfo Info, TypeSymbol? Type)> _analyzedNullabilityMap; 26private DebugVerifier(ImmutableDictionary<BoundExpression, (NullabilityInfo Info, TypeSymbol? Type)> analyzedNullabilityMap, SnapshotManager? snapshotManager) 37public static void Verify(ImmutableDictionary<BoundExpression, (NullabilityInfo Info, TypeSymbol? Type)> analyzedNullabilityMap, SnapshotManager? snapshotManagerOpt, BoundNode node)
FlowAnalysis\NullableWalker_Patterns.cs (12)
154TypeSymbol inputType, 279var originalInputType = node.Expression.Type; 409var tempMap = PooledDictionary<BoundDagTemp, (int slot, TypeSymbol type)>.GetInstance(); 437(int inputSlot, TypeSymbol inputType) = tempMap.TryGetValue(evaluation.Input, out var slotAndType) ? slotAndType : throw ExceptionUtilities.Unreachable(); 596(int inputSlot, TypeSymbol inputType) = slotAndType; 742void addToTempMap(BoundDagTemp output, int slot, TypeSymbol type) 759bool isDerivedType(TypeSymbol derivedType, TypeSymbol baseType) 839void addTemp(BoundDagEvaluation e, TypeSymbol t, int index = 0) 848static TypeWithAnnotations getIndexerOutputType(TypeSymbol inputType, BoundExpression e, bool isSlice) 885var originalInputType = node.Expression.Type; 953TypeSymbol inferredType =
Generated\BoundNodes.xml.Generated.cs (1094)
408protected BoundExpression(BoundKind kind, SyntaxNode syntax, TypeSymbol? type, bool hasErrors) 414protected BoundExpression(BoundKind kind, SyntaxNode syntax, TypeSymbol? type) 420public TypeSymbol? Type { get; } 425protected BoundValuePlaceholderBase(BoundKind kind, SyntaxNode syntax, TypeSymbol? type, bool hasErrors) 430protected BoundValuePlaceholderBase(BoundKind kind, SyntaxNode syntax, TypeSymbol? type) 439protected BoundEarlyValuePlaceholderBase(BoundKind kind, SyntaxNode syntax, TypeSymbol? type, bool hasErrors) 444protected BoundEarlyValuePlaceholderBase(BoundKind kind, SyntaxNode syntax, TypeSymbol? type) 453public BoundValuePlaceholder(SyntaxNode syntax, TypeSymbol? type, bool hasErrors) 458public BoundValuePlaceholder(SyntaxNode syntax, TypeSymbol? type) 467public BoundValuePlaceholder Update(TypeSymbol? type) 469if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 481public BoundCapturedReceiverPlaceholder(SyntaxNode syntax, BoundExpression receiver, TypeSymbol? type, bool hasErrors = false) 495public BoundCapturedReceiverPlaceholder Update(BoundExpression receiver, TypeSymbol? type) 497if (receiver != this.Receiver || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 509public BoundDeconstructValuePlaceholder(SyntaxNode syntax, Symbol? variableSymbol, bool isDiscardExpression, TypeSymbol type, bool hasErrors) 519public BoundDeconstructValuePlaceholder(SyntaxNode syntax, Symbol? variableSymbol, bool isDiscardExpression, TypeSymbol type) 529public new TypeSymbol Type => base.Type!; 536public BoundDeconstructValuePlaceholder Update(Symbol? variableSymbol, bool isDiscardExpression, TypeSymbol type) 538if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(variableSymbol, this.VariableSymbol) || isDiscardExpression != this.IsDiscardExpression || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 550public BoundTupleOperandPlaceholder(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 558public BoundTupleOperandPlaceholder(SyntaxNode syntax, TypeSymbol type) 566public new TypeSymbol Type => base.Type!; 571public BoundTupleOperandPlaceholder Update(TypeSymbol type) 573if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 585public BoundAwaitableValuePlaceholder(SyntaxNode syntax, TypeSymbol? type, bool hasErrors) 590public BoundAwaitableValuePlaceholder(SyntaxNode syntax, TypeSymbol? type) 595public new TypeSymbol? Type => base.Type; 600public BoundAwaitableValuePlaceholder Update(TypeSymbol? type) 602if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 614public BoundDisposableValuePlaceholder(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 622public BoundDisposableValuePlaceholder(SyntaxNode syntax, TypeSymbol type) 630public new TypeSymbol Type => base.Type!; 635public BoundDisposableValuePlaceholder Update(TypeSymbol type) 637if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 649public BoundObjectOrCollectionValuePlaceholder(SyntaxNode syntax, bool isNewInstance, TypeSymbol type, bool hasErrors) 658public BoundObjectOrCollectionValuePlaceholder(SyntaxNode syntax, bool isNewInstance, TypeSymbol type) 667public new TypeSymbol Type => base.Type!; 673public BoundObjectOrCollectionValuePlaceholder Update(bool isNewInstance, TypeSymbol type) 675if (isNewInstance != this.IsNewInstance || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 687public BoundImplicitIndexerValuePlaceholder(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 695public BoundImplicitIndexerValuePlaceholder(SyntaxNode syntax, TypeSymbol type) 703public new TypeSymbol Type => base.Type!; 708public BoundImplicitIndexerValuePlaceholder Update(TypeSymbol type) 710if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 722public BoundImplicitIndexerReceiverPlaceholder(SyntaxNode syntax, bool isEquivalentToThisReference, TypeSymbol type, bool hasErrors) 731public BoundImplicitIndexerReceiverPlaceholder(SyntaxNode syntax, bool isEquivalentToThisReference, TypeSymbol type) 740public new TypeSymbol Type => base.Type!; 746public BoundImplicitIndexerReceiverPlaceholder Update(bool isEquivalentToThisReference, TypeSymbol type) 748if (isEquivalentToThisReference != this.IsEquivalentToThisReference || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 760public BoundListPatternReceiverPlaceholder(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 768public BoundListPatternReceiverPlaceholder(SyntaxNode syntax, TypeSymbol type) 776public new TypeSymbol Type => base.Type!; 781public BoundListPatternReceiverPlaceholder Update(TypeSymbol type) 783if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 795public BoundListPatternIndexPlaceholder(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 803public BoundListPatternIndexPlaceholder(SyntaxNode syntax, TypeSymbol type) 811public new TypeSymbol Type => base.Type!; 816public BoundListPatternIndexPlaceholder Update(TypeSymbol type) 818if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 830public BoundSlicePatternReceiverPlaceholder(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 838public BoundSlicePatternReceiverPlaceholder(SyntaxNode syntax, TypeSymbol type) 846public new TypeSymbol Type => base.Type!; 851public BoundSlicePatternReceiverPlaceholder Update(TypeSymbol type) 853if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 865public BoundSlicePatternRangePlaceholder(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 873public BoundSlicePatternRangePlaceholder(SyntaxNode syntax, TypeSymbol type) 881public new TypeSymbol Type => base.Type!; 886public BoundSlicePatternRangePlaceholder Update(TypeSymbol type) 888if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 900public BoundDup(SyntaxNode syntax, RefKind refKind, TypeSymbol? type, bool hasErrors) 906public BoundDup(SyntaxNode syntax, RefKind refKind, TypeSymbol? type) 917public BoundDup Update(RefKind refKind, TypeSymbol? type) 919if (refKind != this.RefKind || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 931public BoundPassByCopy(SyntaxNode syntax, BoundExpression expression, TypeSymbol? type, bool hasErrors = false) 945public BoundPassByCopy Update(BoundExpression expression, TypeSymbol? type) 947if (expression != this.Expression || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 959public BoundBadExpression(SyntaxNode syntax, LookupResultKind resultKind, ImmutableArray<Symbol?> symbols, ImmutableArray<BoundExpression> childBoundNodes, TypeSymbol? type, bool hasErrors = false) 982public BoundBadExpression Update(LookupResultKind resultKind, ImmutableArray<Symbol?> symbols, ImmutableArray<BoundExpression> childBoundNodes, TypeSymbol? type) 984if (resultKind != this.ResultKind || symbols != this.Symbols || childBoundNodes != this.ChildBoundNodes || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1052public BoundTypeExpression(SyntaxNode syntax, AliasSymbol? aliasOpt, BoundTypeExpression? boundContainingTypeOpt, ImmutableArray<BoundExpression> boundDimensionsOpt, TypeWithAnnotations typeWithAnnotations, TypeSymbol type, bool hasErrors = false) 1067public new TypeSymbol Type => base.Type!; 1073public BoundTypeExpression Update(AliasSymbol? aliasOpt, BoundTypeExpression? boundContainingTypeOpt, ImmutableArray<BoundExpression> boundDimensionsOpt, TypeWithAnnotations typeWithAnnotations, TypeSymbol type) 1075if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(aliasOpt, this.AliasOpt) || boundContainingTypeOpt != this.BoundContainingTypeOpt || boundDimensionsOpt != this.BoundDimensionsOpt || typeWithAnnotations != this.TypeWithAnnotations || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1087public BoundTypeOrValueExpression(SyntaxNode syntax, Binder binder, Symbol valueSymbol, TypeSymbol type, bool hasErrors) 1103public BoundTypeOrValueExpression(SyntaxNode syntax, Binder binder, Symbol valueSymbol, TypeSymbol type) 1115public new TypeSymbol Type => base.Type!; 1122public BoundTypeOrValueExpression Update(Binder binder, Symbol valueSymbol, TypeSymbol type) 1124if (binder != this.Binder || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(valueSymbol, this.ValueSymbol) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1156public new TypeSymbol? Type => base.Type; 1177public BoundUnaryOperator(SyntaxNode syntax, UnaryOperatorKind operatorKind, BoundExpression operand, ConstantValue? constantValueOpt, MethodSymbol? methodOpt, TypeSymbol? constrainedToTypeOpt, LookupResultKind resultKind, ImmutableArray<MethodSymbol> originalUserDefinedOperatorsOpt, TypeSymbol type, bool hasErrors = false) 1193public new TypeSymbol Type => base.Type!; 1198public TypeSymbol? ConstrainedToTypeOpt { get; } 1205public BoundUnaryOperator Update(UnaryOperatorKind operatorKind, BoundExpression operand, ConstantValue? constantValueOpt, MethodSymbol? methodOpt, TypeSymbol? constrainedToTypeOpt, LookupResultKind resultKind, ImmutableArray<MethodSymbol> originalUserDefinedOperatorsOpt, TypeSymbol type) 1207if (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)) 1219public 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) 1238public new TypeSymbol Type => base.Type!; 1242public TypeSymbol? ConstrainedToTypeOpt { get; } 1253public 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) 1255if (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)) 1267public BoundAddressOfOperator(SyntaxNode syntax, BoundExpression operand, bool isManaged, TypeSymbol type, bool hasErrors = false) 1278public new TypeSymbol Type => base.Type!; 1285public BoundAddressOfOperator Update(BoundExpression operand, bool isManaged, TypeSymbol type) 1287if (operand != this.Operand || isManaged != this.IsManaged || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1309public new TypeSymbol? Type => base.Type; 1328public BoundFunctionPointerLoad(SyntaxNode syntax, MethodSymbol targetMethod, TypeSymbol? constrainedToTypeOpt, TypeSymbol type, bool hasErrors) 1339public BoundFunctionPointerLoad(SyntaxNode syntax, MethodSymbol targetMethod, TypeSymbol? constrainedToTypeOpt, TypeSymbol type) 1351public TypeSymbol? ConstrainedToTypeOpt { get; } 1352public new TypeSymbol Type => base.Type!; 1357public BoundFunctionPointerLoad Update(MethodSymbol targetMethod, TypeSymbol? constrainedToTypeOpt, TypeSymbol type) 1359if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(targetMethod, this.TargetMethod) || !TypeSymbol.Equals(constrainedToTypeOpt, this.ConstrainedToTypeOpt, TypeCompareKind.ConsiderEverything) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1371public BoundPointerIndirectionOperator(SyntaxNode syntax, BoundExpression operand, bool refersToLocation, TypeSymbol type, bool hasErrors = false) 1382public new TypeSymbol Type => base.Type!; 1389public BoundPointerIndirectionOperator Update(BoundExpression operand, bool refersToLocation, TypeSymbol type) 1391if (operand != this.Operand || refersToLocation != this.RefersToLocation || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1403public BoundPointerElementAccess(SyntaxNode syntax, BoundExpression expression, BoundExpression index, bool @checked, bool refersToLocation, TypeSymbol type, bool hasErrors = false) 1417public new TypeSymbol Type => base.Type!; 1426public BoundPointerElementAccess Update(BoundExpression expression, BoundExpression index, bool @checked, bool refersToLocation, TypeSymbol type) 1428if (expression != this.Expression || index != this.Index || @checked != this.Checked || refersToLocation != this.RefersToLocation || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1440public BoundFunctionPointerInvocation(SyntaxNode syntax, BoundExpression invokedExpression, ImmutableArray<BoundExpression> arguments, ImmutableArray<RefKind> argumentRefKindsOpt, LookupResultKind resultKind, TypeSymbol type, bool hasErrors = false) 1454public new TypeSymbol Type => base.Type!; 1463public BoundFunctionPointerInvocation Update(BoundExpression invokedExpression, ImmutableArray<BoundExpression> arguments, ImmutableArray<RefKind> argumentRefKindsOpt, LookupResultKind resultKind, TypeSymbol type) 1465if (invokedExpression != this.InvokedExpression || arguments != this.Arguments || argumentRefKindsOpt != this.ArgumentRefKindsOpt || resultKind != this.ResultKind || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1477public BoundRefTypeOperator(SyntaxNode syntax, BoundExpression operand, MethodSymbol? getTypeFromHandle, TypeSymbol type, bool hasErrors = false) 1488public new TypeSymbol Type => base.Type!; 1495public BoundRefTypeOperator Update(BoundExpression operand, MethodSymbol? getTypeFromHandle, TypeSymbol type) 1497if (operand != this.Operand || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(getTypeFromHandle, this.GetTypeFromHandle) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1509public BoundMakeRefOperator(SyntaxNode syntax, BoundExpression operand, TypeSymbol type, bool hasErrors = false) 1519public new TypeSymbol Type => base.Type!; 1525public BoundMakeRefOperator Update(BoundExpression operand, TypeSymbol type) 1527if (operand != this.Operand || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1539public BoundRefValueOperator(SyntaxNode syntax, NullableAnnotation nullableAnnotation, BoundExpression operand, TypeSymbol type, bool hasErrors = false) 1550public new TypeSymbol Type => base.Type!; 1557public BoundRefValueOperator Update(NullableAnnotation nullableAnnotation, BoundExpression operand, TypeSymbol type) 1559if (nullableAnnotation != this.NullableAnnotation || operand != this.Operand || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1571public BoundFromEndIndexExpression(SyntaxNode syntax, BoundExpression operand, MethodSymbol? methodOpt, TypeSymbol type, bool hasErrors = false) 1582public new TypeSymbol Type => base.Type!; 1589public BoundFromEndIndexExpression Update(BoundExpression operand, MethodSymbol? methodOpt, TypeSymbol type) 1591if (operand != this.Operand || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(methodOpt, this.MethodOpt) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1603public BoundRangeExpression(SyntaxNode syntax, BoundExpression? leftOperandOpt, BoundExpression? rightOperandOpt, MethodSymbol? methodOpt, TypeSymbol type, bool hasErrors = false) 1614public new TypeSymbol Type => base.Type!; 1622public BoundRangeExpression Update(BoundExpression? leftOperandOpt, BoundExpression? rightOperandOpt, MethodSymbol? methodOpt, TypeSymbol type) 1624if (leftOperandOpt != this.LeftOperandOpt || rightOperandOpt != this.RightOperandOpt || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(methodOpt, this.MethodOpt) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1636protected BoundBinaryOperatorBase(BoundKind kind, SyntaxNode syntax, BoundExpression left, BoundExpression right, TypeSymbol type, bool hasErrors = false) 1648public new TypeSymbol Type => base.Type!; 1655public BoundBinaryOperator(SyntaxNode syntax, BinaryOperatorKind operatorKind, BoundBinaryOperator.UncommonData? data, LookupResultKind resultKind, BoundExpression left, BoundExpression right, TypeSymbol type, bool hasErrors = false) 1679public BoundBinaryOperator Update(BinaryOperatorKind operatorKind, BoundBinaryOperator.UncommonData? data, LookupResultKind resultKind, BoundExpression left, BoundExpression right, TypeSymbol type) 1681if (operatorKind != this.OperatorKind || data != this.Data || resultKind != this.ResultKind || left != this.Left || right != this.Right || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1693public BoundTupleBinaryOperator(SyntaxNode syntax, BoundExpression left, BoundExpression right, BinaryOperatorKind operatorKind, TupleBinaryOperatorInfo.Multiple operators, TypeSymbol type, bool hasErrors = false) 1708public new TypeSymbol Type => base.Type!; 1717public BoundTupleBinaryOperator Update(BoundExpression left, BoundExpression right, BinaryOperatorKind operatorKind, TupleBinaryOperatorInfo.Multiple operators, TypeSymbol type) 1719if (left != this.Left || right != this.Right || operatorKind != this.OperatorKind || operators != this.Operators || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1731public BoundUserDefinedConditionalLogicalOperator(SyntaxNode syntax, BinaryOperatorKind operatorKind, MethodSymbol logicalOperator, MethodSymbol trueOperator, MethodSymbol falseOperator, BoundValuePlaceholder? trueFalseOperandPlaceholder, BoundExpression? trueFalseOperandConversion, TypeSymbol? constrainedToTypeOpt, LookupResultKind resultKind, ImmutableArray<MethodSymbol> originalUserDefinedOperatorsOpt, BoundExpression left, BoundExpression right, TypeSymbol type, bool hasErrors = false) 1763public TypeSymbol? ConstrainedToTypeOpt { get; } 1770public BoundUserDefinedConditionalLogicalOperator Update(BinaryOperatorKind operatorKind, MethodSymbol logicalOperator, MethodSymbol trueOperator, MethodSymbol falseOperator, BoundValuePlaceholder? trueFalseOperandPlaceholder, BoundExpression? trueFalseOperandConversion, TypeSymbol? constrainedToTypeOpt, LookupResultKind resultKind, ImmutableArray<MethodSymbol> originalUserDefinedOperatorsOpt, BoundExpression left, BoundExpression right, TypeSymbol type) 1772if (operatorKind != this.OperatorKind || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(logicalOperator, this.LogicalOperator) || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(trueOperator, this.TrueOperator) || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(falseOperator, this.FalseOperator) || trueFalseOperandPlaceholder != this.TrueFalseOperandPlaceholder || trueFalseOperandConversion != this.TrueFalseOperandConversion || !TypeSymbol.Equals(constrainedToTypeOpt, this.ConstrainedToTypeOpt, TypeCompareKind.ConsiderEverything) || resultKind != this.ResultKind || originalUserDefinedOperatorsOpt != this.OriginalUserDefinedOperatorsOpt || left != this.Left || right != this.Right || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1784public 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) 1803public new TypeSymbol Type => base.Type!; 1817public BoundCompoundAssignmentOperator Update(BinaryOperatorSignature @operator, BoundExpression left, BoundExpression right, BoundValuePlaceholder? leftPlaceholder, BoundExpression? leftConversion, BoundValuePlaceholder? finalPlaceholder, BoundExpression? finalConversion, LookupResultKind resultKind, ImmutableArray<MethodSymbol> originalUserDefinedOperatorsOpt, TypeSymbol type) 1819if (@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)) 1831public BoundAssignmentOperator(SyntaxNode syntax, BoundExpression left, BoundExpression right, bool isRef, TypeSymbol type, bool hasErrors = false) 1843public new TypeSymbol Type => base.Type!; 1851public BoundAssignmentOperator Update(BoundExpression left, BoundExpression right, bool isRef, TypeSymbol type) 1853if (left != this.Left || right != this.Right || isRef != this.IsRef || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1865public BoundDeconstructionAssignmentOperator(SyntaxNode syntax, BoundTupleExpression left, BoundConversion right, bool isUsed, TypeSymbol type, bool hasErrors = false) 1878public new TypeSymbol Type => base.Type!; 1886public BoundDeconstructionAssignmentOperator Update(BoundTupleExpression left, BoundConversion right, bool isUsed, TypeSymbol type) 1888if (left != this.Left || right != this.Right || isUsed != this.IsUsed || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1900public BoundNullCoalescingOperator(SyntaxNode syntax, BoundExpression leftOperand, BoundExpression rightOperand, BoundValuePlaceholder? leftPlaceholder, BoundExpression? leftConversion, BoundNullCoalescingOperatorResultKind operatorResultKind, bool @checked, TypeSymbol type, bool hasErrors = false) 1916public new TypeSymbol Type => base.Type!; 1927public BoundNullCoalescingOperator Update(BoundExpression leftOperand, BoundExpression rightOperand, BoundValuePlaceholder? leftPlaceholder, BoundExpression? leftConversion, BoundNullCoalescingOperatorResultKind operatorResultKind, bool @checked, TypeSymbol type) 1929if (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)) 1941public BoundNullCoalescingAssignmentOperator(SyntaxNode syntax, BoundExpression leftOperand, BoundExpression rightOperand, TypeSymbol? type, bool hasErrors = false) 1958public BoundNullCoalescingAssignmentOperator Update(BoundExpression leftOperand, BoundExpression rightOperand, TypeSymbol? type) 1960if (leftOperand != this.LeftOperand || rightOperand != this.RightOperand || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1987public new TypeSymbol? Type => base.Type; 2011public BoundConditionalOperator(SyntaxNode syntax, bool isRef, BoundExpression condition, BoundExpression consequence, BoundExpression alternative, ConstantValue? constantValueOpt, TypeSymbol? naturalTypeOpt, bool wasTargetTyped, TypeSymbol type, bool hasErrors = false) 2029public new TypeSymbol Type => base.Type!; 2035public TypeSymbol? NaturalTypeOpt { get; } 2041public BoundConditionalOperator Update(bool isRef, BoundExpression condition, BoundExpression consequence, BoundExpression alternative, ConstantValue? constantValueOpt, TypeSymbol? naturalTypeOpt, bool wasTargetTyped, TypeSymbol type) 2043if (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)) 2055public BoundArrayAccess(SyntaxNode syntax, BoundExpression expression, ImmutableArray<BoundExpression> indices, TypeSymbol type, bool hasErrors = false) 2067public new TypeSymbol Type => base.Type!; 2074public BoundArrayAccess Update(BoundExpression expression, ImmutableArray<BoundExpression> indices, TypeSymbol type) 2076if (expression != this.Expression || indices != this.Indices || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2097public new TypeSymbol? Type => base.Type; 2117public BoundArrayLength(SyntaxNode syntax, BoundExpression expression, TypeSymbol type, bool hasErrors = false) 2127public new TypeSymbol Type => base.Type!; 2133public BoundArrayLength Update(BoundExpression expression, TypeSymbol type) 2135if (expression != this.Expression || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2188public BoundAwaitExpression(SyntaxNode syntax, BoundExpression expression, BoundAwaitableInfo awaitableInfo, BoundAwaitExpressionDebugInfo debugInfo, TypeSymbol type, bool hasErrors = false) 2201public new TypeSymbol Type => base.Type!; 2209public BoundAwaitExpression Update(BoundExpression expression, BoundAwaitableInfo awaitableInfo, BoundAwaitExpressionDebugInfo debugInfo, TypeSymbol type) 2211if (expression != this.Expression || awaitableInfo != this.AwaitableInfo || debugInfo != this.DebugInfo || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2223protected BoundTypeOf(BoundKind kind, SyntaxNode syntax, MethodSymbol? getTypeFromHandle, TypeSymbol type, bool hasErrors) 2232protected BoundTypeOf(BoundKind kind, SyntaxNode syntax, MethodSymbol? getTypeFromHandle, TypeSymbol type) 2241public new TypeSymbol Type => base.Type!; 2247public BoundTypeOfOperator(SyntaxNode syntax, BoundTypeExpression sourceType, MethodSymbol? getTypeFromHandle, TypeSymbol type, bool hasErrors = false) 2262public BoundTypeOfOperator Update(BoundTypeExpression sourceType, MethodSymbol? getTypeFromHandle, TypeSymbol type) 2264if (sourceType != this.SourceType || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(getTypeFromHandle, this.GetTypeFromHandle) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2308public BoundMethodDefIndex(SyntaxNode syntax, MethodSymbol method, TypeSymbol type, bool hasErrors) 2322public BoundMethodDefIndex(SyntaxNode syntax, MethodSymbol method, TypeSymbol type) 2332public new TypeSymbol Type => base.Type!; 2338public BoundMethodDefIndex Update(MethodSymbol method, TypeSymbol type) 2340if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(method, this.Method) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2352public BoundLocalId(SyntaxNode syntax, LocalSymbol local, FieldSymbol? hoistedField, TypeSymbol type, bool hasErrors) 2363public BoundLocalId(SyntaxNode syntax, LocalSymbol local, FieldSymbol? hoistedField, TypeSymbol type) 2374public new TypeSymbol Type => base.Type!; 2381public BoundLocalId Update(LocalSymbol local, FieldSymbol? hoistedField, TypeSymbol type) 2383if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(local, this.Local) || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(hoistedField, this.HoistedField) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2395public BoundParameterId(SyntaxNode syntax, ParameterSymbol parameter, FieldSymbol? hoistedField, TypeSymbol type, bool hasErrors) 2406public BoundParameterId(SyntaxNode syntax, ParameterSymbol parameter, FieldSymbol? hoistedField, TypeSymbol type) 2417public new TypeSymbol Type => base.Type!; 2424public BoundParameterId Update(ParameterSymbol parameter, FieldSymbol? hoistedField, TypeSymbol type) 2426if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(parameter, this.Parameter) || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(hoistedField, this.HoistedField) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2438public BoundStateMachineInstanceId(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 2446public BoundStateMachineInstanceId(SyntaxNode syntax, TypeSymbol type) 2454public new TypeSymbol Type => base.Type!; 2459public BoundStateMachineInstanceId Update(TypeSymbol type) 2461if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2473public BoundMaximumMethodDefIndex(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 2481public BoundMaximumMethodDefIndex(SyntaxNode syntax, TypeSymbol type) 2489public new TypeSymbol Type => base.Type!; 2494public BoundMaximumMethodDefIndex Update(TypeSymbol type) 2496if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2508public BoundInstrumentationPayloadRoot(SyntaxNode syntax, int analysisKind, TypeSymbol type, bool hasErrors) 2517public BoundInstrumentationPayloadRoot(SyntaxNode syntax, int analysisKind, TypeSymbol type) 2527public new TypeSymbol Type => base.Type!; 2532public BoundInstrumentationPayloadRoot Update(int analysisKind, TypeSymbol type) 2534if (analysisKind != this.AnalysisKind || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2546public BoundThrowIfModuleCancellationRequested(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 2554public BoundThrowIfModuleCancellationRequested(SyntaxNode syntax, TypeSymbol type) 2562public new TypeSymbol Type => base.Type!; 2567public BoundThrowIfModuleCancellationRequested Update(TypeSymbol type) 2569if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2581public ModuleCancellationTokenExpression(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 2589public ModuleCancellationTokenExpression(SyntaxNode syntax, TypeSymbol type) 2597public new TypeSymbol Type => base.Type!; 2602public ModuleCancellationTokenExpression Update(TypeSymbol type) 2604if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2616public BoundModuleVersionId(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 2624public BoundModuleVersionId(SyntaxNode syntax, TypeSymbol type) 2632public new TypeSymbol Type => base.Type!; 2637public BoundModuleVersionId Update(TypeSymbol type) 2639if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2651public BoundModuleVersionIdString(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 2659public BoundModuleVersionIdString(SyntaxNode syntax, TypeSymbol type) 2667public new TypeSymbol Type => base.Type!; 2672public BoundModuleVersionIdString Update(TypeSymbol type) 2674if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2686public BoundSourceDocumentIndex(SyntaxNode syntax, Cci.DebugSourceDocument document, TypeSymbol type, bool hasErrors) 2696public BoundSourceDocumentIndex(SyntaxNode syntax, Cci.DebugSourceDocument document, TypeSymbol type) 2706public new TypeSymbol Type => base.Type!; 2712public BoundSourceDocumentIndex Update(Cci.DebugSourceDocument document, TypeSymbol type) 2714if (document != this.Document || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2726public BoundMethodInfo(SyntaxNode syntax, MethodSymbol method, MethodSymbol? getMethodFromHandle, TypeSymbol type, bool hasErrors) 2737public BoundMethodInfo(SyntaxNode syntax, MethodSymbol method, MethodSymbol? getMethodFromHandle, TypeSymbol type) 2748public new TypeSymbol Type => base.Type!; 2755public BoundMethodInfo Update(MethodSymbol method, MethodSymbol? getMethodFromHandle, TypeSymbol type) 2757if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(method, this.Method) || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(getMethodFromHandle, this.GetMethodFromHandle) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2769public BoundFieldInfo(SyntaxNode syntax, FieldSymbol field, MethodSymbol? getFieldFromHandle, TypeSymbol type, bool hasErrors) 2780public BoundFieldInfo(SyntaxNode syntax, FieldSymbol field, MethodSymbol? getFieldFromHandle, TypeSymbol type) 2791public new TypeSymbol Type => base.Type!; 2798public BoundFieldInfo Update(FieldSymbol field, MethodSymbol? getFieldFromHandle, TypeSymbol type) 2800if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(field, this.Field) || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(getFieldFromHandle, this.GetFieldFromHandle) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2822public new TypeSymbol? Type => base.Type; 2835public BoundDefaultExpression(SyntaxNode syntax, BoundTypeExpression? targetType, ConstantValue? constantValueOpt, TypeSymbol type, bool hasErrors = false) 2845public new TypeSymbol Type => base.Type!; 2852public BoundDefaultExpression Update(BoundTypeExpression? targetType, ConstantValue? constantValueOpt, TypeSymbol type) 2854if (targetType != this.TargetType || constantValueOpt != this.ConstantValueOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2866public BoundIsOperator(SyntaxNode syntax, BoundExpression operand, BoundTypeExpression targetType, ConversionKind conversionKind, TypeSymbol type, bool hasErrors = false) 2879public new TypeSymbol Type => base.Type!; 2887public BoundIsOperator Update(BoundExpression operand, BoundTypeExpression targetType, ConversionKind conversionKind, TypeSymbol type) 2889if (operand != this.Operand || targetType != this.TargetType || conversionKind != this.ConversionKind || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2901public BoundAsOperator(SyntaxNode syntax, BoundExpression operand, BoundTypeExpression targetType, BoundValuePlaceholder? operandPlaceholder, BoundExpression? operandConversion, TypeSymbol type, bool hasErrors = false) 2915public new TypeSymbol Type => base.Type!; 2924public BoundAsOperator Update(BoundExpression operand, BoundTypeExpression targetType, BoundValuePlaceholder? operandPlaceholder, BoundExpression? operandConversion, TypeSymbol type) 2926if (operand != this.Operand || targetType != this.TargetType || operandPlaceholder != this.OperandPlaceholder || operandConversion != this.OperandConversion || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2938public BoundSizeOfOperator(SyntaxNode syntax, BoundTypeExpression sourceType, ConstantValue? constantValueOpt, TypeSymbol type, bool hasErrors = false) 2949public new TypeSymbol Type => base.Type!; 2956public BoundSizeOfOperator Update(BoundTypeExpression sourceType, ConstantValue? constantValueOpt, TypeSymbol type) 2958if (sourceType != this.SourceType || constantValueOpt != this.ConstantValueOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2970public BoundConversion(SyntaxNode syntax, BoundExpression operand, Conversion conversion, bool isBaseConversion, bool @checked, bool explicitCastInCode, ConstantValue? constantValueOpt, ConversionGroup? conversionGroupOpt, TypeSymbol type, bool hasErrors = false) 2990public new TypeSymbol Type => base.Type!; 3002public BoundConversion Update(BoundExpression operand, Conversion conversion, bool isBaseConversion, bool @checked, bool explicitCastInCode, ConstantValue? constantValueOpt, ConversionGroup? conversionGroupOpt, TypeSymbol type) 3004if (operand != this.Operand || conversion != this.Conversion || isBaseConversion != this.IsBaseConversion || @checked != this.Checked || explicitCastInCode != this.ExplicitCastInCode || constantValueOpt != this.ConstantValueOpt || conversionGroupOpt != this.ConversionGroupOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 3016public BoundReadOnlySpanFromArray(SyntaxNode syntax, BoundExpression operand, MethodSymbol conversionMethod, TypeSymbol type, bool hasErrors = false) 3028public new TypeSymbol Type => base.Type!; 3035public BoundReadOnlySpanFromArray Update(BoundExpression operand, MethodSymbol conversionMethod, TypeSymbol type) 3037if (operand != this.Operand || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(conversionMethod, this.ConversionMethod) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 3049public BoundArgList(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 3057public BoundArgList(SyntaxNode syntax, TypeSymbol type) 3065public new TypeSymbol Type => base.Type!; 3070public BoundArgList Update(TypeSymbol type) 3072if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 3084public BoundArgListOperator(SyntaxNode syntax, ImmutableArray<BoundExpression> arguments, ImmutableArray<RefKind> argumentRefKindsOpt, TypeSymbol? type, bool hasErrors = false) 3094public new TypeSymbol? Type => base.Type; 3101public BoundArgListOperator Update(ImmutableArray<BoundExpression> arguments, ImmutableArray<RefKind> argumentRefKindsOpt, TypeSymbol? type) 3103if (arguments != this.Arguments || argumentRefKindsOpt != this.ArgumentRefKindsOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 3115public BoundFixedLocalCollectionInitializer(SyntaxNode syntax, TypeSymbol elementPointerType, BoundValuePlaceholder? elementPointerPlaceholder, BoundExpression? elementPointerConversion, BoundExpression expression, MethodSymbol? getPinnableOpt, TypeSymbol type, bool hasErrors = false) 3130public new TypeSymbol Type => base.Type!; 3131public TypeSymbol ElementPointerType { get; } 3140public BoundFixedLocalCollectionInitializer Update(TypeSymbol elementPointerType, BoundValuePlaceholder? elementPointerPlaceholder, BoundExpression? elementPointerConversion, BoundExpression expression, MethodSymbol? getPinnableOpt, TypeSymbol type) 3142if (!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)) 4282public BoundCatchBlock(SyntaxNode syntax, ImmutableArray<LocalSymbol> locals, BoundExpression? exceptionSourceOpt, TypeSymbol? exceptionTypeOpt, BoundStatementList? exceptionFilterPrologueOpt, BoundExpression? exceptionFilterOpt, BoundBlock body, bool isSynthesizedAsyncCatchAll, bool hasErrors = false) 4300public TypeSymbol? ExceptionTypeOpt { get; } 4309public BoundCatchBlock Update(ImmutableArray<LocalSymbol> locals, BoundExpression? exceptionSourceOpt, TypeSymbol? exceptionTypeOpt, BoundStatementList? exceptionFilterPrologueOpt, BoundExpression? exceptionFilterOpt, BoundBlock body, bool isSynthesizedAsyncCatchAll) 4311if (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) 4323public BoundLiteral(SyntaxNode syntax, ConstantValue? constantValueOpt, TypeSymbol? type, bool hasErrors) 4329public BoundLiteral(SyntaxNode syntax, ConstantValue? constantValueOpt, TypeSymbol? type) 4340public BoundLiteral Update(ConstantValue? constantValueOpt, TypeSymbol? type) 4342if (constantValueOpt != this.ConstantValueOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 4354public BoundUtf8String(SyntaxNode syntax, string value, TypeSymbol type, bool hasErrors) 4364public BoundUtf8String(SyntaxNode syntax, string value, TypeSymbol type) 4374public new TypeSymbol Type => base.Type!; 4380public BoundUtf8String Update(string value, TypeSymbol type) 4382if (value != this.Value || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 4394public BoundThisReference(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 4402public BoundThisReference(SyntaxNode syntax, TypeSymbol type) 4410public new TypeSymbol Type => base.Type!; 4415public BoundThisReference Update(TypeSymbol type) 4417if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 4429public BoundPreviousSubmissionReference(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 4437public BoundPreviousSubmissionReference(SyntaxNode syntax, TypeSymbol type) 4445public new TypeSymbol Type => base.Type!; 4450public BoundPreviousSubmissionReference Update(TypeSymbol type) 4452if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 4464public BoundHostObjectMemberReference(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 4472public BoundHostObjectMemberReference(SyntaxNode syntax, TypeSymbol type) 4480public new TypeSymbol Type => base.Type!; 4485public BoundHostObjectMemberReference Update(TypeSymbol type) 4487if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 4499public BoundBaseReference(SyntaxNode syntax, TypeSymbol? type, bool hasErrors) 4504public BoundBaseReference(SyntaxNode syntax, TypeSymbol? type) 4509public new TypeSymbol? Type => base.Type; 4514public BoundBaseReference Update(TypeSymbol? type) 4516if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 4528public BoundLocal(SyntaxNode syntax, LocalSymbol localSymbol, BoundLocalDeclarationKind declarationKind, ConstantValue? constantValueOpt, bool isNullableUnknown, TypeSymbol type, bool hasErrors) 4541public BoundLocal(SyntaxNode syntax, LocalSymbol localSymbol, BoundLocalDeclarationKind declarationKind, ConstantValue? constantValueOpt, bool isNullableUnknown, TypeSymbol type) 4554public new TypeSymbol Type => base.Type!; 4563public BoundLocal Update(LocalSymbol localSymbol, BoundLocalDeclarationKind declarationKind, ConstantValue? constantValueOpt, bool isNullableUnknown, TypeSymbol type) 4565if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(localSymbol, this.LocalSymbol) || declarationKind != this.DeclarationKind || constantValueOpt != this.ConstantValueOpt || isNullableUnknown != this.IsNullableUnknown || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 4577public BoundPseudoVariable(SyntaxNode syntax, LocalSymbol localSymbol, PseudoVariableExpressions emitExpressions, TypeSymbol type, bool hasErrors) 4589public BoundPseudoVariable(SyntaxNode syntax, LocalSymbol localSymbol, PseudoVariableExpressions emitExpressions, TypeSymbol type) 4601public new TypeSymbol Type => base.Type!; 4608public BoundPseudoVariable Update(LocalSymbol localSymbol, PseudoVariableExpressions emitExpressions, TypeSymbol type) 4610if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(localSymbol, this.LocalSymbol) || emitExpressions != this.EmitExpressions || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 4622public BoundRangeVariable(SyntaxNode syntax, RangeVariableSymbol rangeVariableSymbol, BoundExpression value, TypeSymbol type, bool hasErrors = false) 4634public new TypeSymbol Type => base.Type!; 4641public BoundRangeVariable Update(RangeVariableSymbol rangeVariableSymbol, BoundExpression value, TypeSymbol type) 4643if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(rangeVariableSymbol, this.RangeVariableSymbol) || value != this.Value || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 4655public BoundParameter(SyntaxNode syntax, ParameterSymbol parameterSymbol, TypeSymbol type, bool hasErrors) 4665public BoundParameter(SyntaxNode syntax, ParameterSymbol parameterSymbol, TypeSymbol type) 4675public new TypeSymbol Type => base.Type!; 4681public BoundParameter Update(ParameterSymbol parameterSymbol, TypeSymbol type) 4683if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(parameterSymbol, this.ParameterSymbol) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 4795public BoundLabel(SyntaxNode syntax, LabelSymbol label, TypeSymbol? type, bool hasErrors) 4804public BoundLabel(SyntaxNode syntax, LabelSymbol label, TypeSymbol? type) 4818public BoundLabel Update(LabelSymbol label, TypeSymbol? type) 4820if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(label, this.Label) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 4902protected BoundSwitchExpression(BoundKind kind, SyntaxNode syntax, BoundExpression expression, ImmutableArray<BoundSwitchExpressionArm> switchArms, BoundDecisionDag reachabilityDecisionDag, LabelSymbol? defaultLabel, bool reportedNotExhaustive, TypeSymbol? type, bool hasErrors = false) 4965public BoundUnconvertedSwitchExpression(SyntaxNode syntax, BoundExpression expression, ImmutableArray<BoundSwitchExpressionArm> switchArms, BoundDecisionDag reachabilityDecisionDag, LabelSymbol? defaultLabel, bool reportedNotExhaustive, TypeSymbol? type, bool hasErrors = false) 4979public BoundUnconvertedSwitchExpression Update(BoundExpression expression, ImmutableArray<BoundSwitchExpressionArm> switchArms, BoundDecisionDag reachabilityDecisionDag, LabelSymbol? defaultLabel, bool reportedNotExhaustive, TypeSymbol? type) 4981if (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)) 4993public BoundConvertedSwitchExpression(SyntaxNode syntax, TypeSymbol? naturalTypeOpt, bool wasTargetTyped, BoundExpression expression, ImmutableArray<BoundSwitchExpressionArm> switchArms, BoundDecisionDag reachabilityDecisionDag, LabelSymbol? defaultLabel, bool reportedNotExhaustive, TypeSymbol type, bool hasErrors = false) 5006public new TypeSymbol Type => base.Type!; 5007public TypeSymbol? NaturalTypeOpt { get; } 5013public BoundConvertedSwitchExpression Update(TypeSymbol? naturalTypeOpt, bool wasTargetTyped, BoundExpression expression, ImmutableArray<BoundSwitchExpressionArm> switchArms, BoundDecisionDag reachabilityDecisionDag, LabelSymbol? defaultLabel, bool reportedNotExhaustive, TypeSymbol type) 5015if (!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)) 5220public BoundDagTemp(SyntaxNode syntax, TypeSymbol type, BoundDagEvaluation? source, int index, bool hasErrors = false) 5231public TypeSymbol Type { get; } 5238public BoundDagTemp Update(TypeSymbol type, BoundDagEvaluation? source, int index) 5240if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything) || source != this.Source || index != this.Index) 5252public BoundDagTypeTest(SyntaxNode syntax, TypeSymbol type, BoundDagTemp input, bool hasErrors = false) 5262public TypeSymbol Type { get; } 5267public BoundDagTypeTest Update(TypeSymbol type, BoundDagTemp input) 5269if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything) || input != this.Input) 5436public BoundDagTypeEvaluation(SyntaxNode syntax, TypeSymbol type, BoundDagTemp input, bool hasErrors = false) 5446public TypeSymbol Type { get; } 5451public BoundDagTypeEvaluation Update(TypeSymbol type, BoundDagTemp input) 5453if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything) || input != this.Input) 5556public BoundDagIndexerEvaluation(SyntaxNode syntax, TypeSymbol indexerType, BoundDagTemp lengthTemp, int index, BoundExpression indexerAccess, BoundListPatternReceiverPlaceholder receiverPlaceholder, BoundListPatternIndexPlaceholder argumentPlaceholder, BoundDagTemp input, bool hasErrors = false) 5579public TypeSymbol IndexerType { get; } 5589public BoundDagIndexerEvaluation Update(TypeSymbol indexerType, BoundDagTemp lengthTemp, int index, BoundExpression indexerAccess, BoundListPatternReceiverPlaceholder receiverPlaceholder, BoundListPatternIndexPlaceholder argumentPlaceholder, BoundDagTemp input) 5591if (!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) 5603public BoundDagSliceEvaluation(SyntaxNode syntax, TypeSymbol sliceType, BoundDagTemp lengthTemp, int startIndex, int endIndex, BoundExpression indexerAccess, BoundSlicePatternReceiverPlaceholder receiverPlaceholder, BoundSlicePatternRangePlaceholder argumentPlaceholder, BoundDagTemp input, bool hasErrors = false) 5627public TypeSymbol SliceType { get; } 5638public BoundDagSliceEvaluation Update(TypeSymbol sliceType, BoundDagTemp lengthTemp, int startIndex, int endIndex, BoundExpression indexerAccess, BoundSlicePatternReceiverPlaceholder receiverPlaceholder, BoundSlicePatternRangePlaceholder argumentPlaceholder, BoundDagTemp input) 5640if (!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) 5753public new TypeSymbol? Type => base.Type; 5760public BoundSequencePointExpression(SyntaxNode syntax, BoundExpression expression, TypeSymbol? type, bool hasErrors = false) 5774public BoundSequencePointExpression Update(BoundExpression expression, TypeSymbol? type) 5776if (expression != this.Expression || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 5788public BoundSequence(SyntaxNode syntax, ImmutableArray<LocalSymbol> locals, ImmutableArray<BoundExpression> sideEffects, BoundExpression value, TypeSymbol type, bool hasErrors = false) 5802public new TypeSymbol Type => base.Type!; 5810public BoundSequence Update(ImmutableArray<LocalSymbol> locals, ImmutableArray<BoundExpression> sideEffects, BoundExpression value, TypeSymbol type) 5812if (locals != this.Locals || sideEffects != this.SideEffects || value != this.Value || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 5824public BoundSpillSequence(SyntaxNode syntax, ImmutableArray<LocalSymbol> locals, ImmutableArray<BoundStatement> sideEffects, BoundExpression value, TypeSymbol type, bool hasErrors = false) 5838public new TypeSymbol Type => base.Type!; 5846public BoundSpillSequence Update(ImmutableArray<LocalSymbol> locals, ImmutableArray<BoundStatement> sideEffects, BoundExpression value, TypeSymbol type) 5848if (locals != this.Locals || sideEffects != this.SideEffects || value != this.Value || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 5860public BoundDynamicMemberAccess(SyntaxNode syntax, BoundExpression receiver, ImmutableArray<TypeWithAnnotations> typeArgumentsOpt, string name, bool invoked, bool indexed, TypeSymbol type, bool hasErrors = false) 5875public new TypeSymbol Type => base.Type!; 5885public BoundDynamicMemberAccess Update(BoundExpression receiver, ImmutableArray<TypeWithAnnotations> typeArgumentsOpt, string name, bool invoked, bool indexed, TypeSymbol type) 5887if (receiver != this.Receiver || typeArgumentsOpt != this.TypeArgumentsOpt || name != this.Name || invoked != this.Invoked || indexed != this.Indexed || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 5899protected BoundDynamicInvocableBase(BoundKind kind, SyntaxNode syntax, BoundExpression expression, ImmutableArray<BoundExpression> arguments, TypeSymbol? type, bool hasErrors = false) 5916public BoundDynamicInvocation(SyntaxNode syntax, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, ImmutableArray<MethodSymbol> applicableMethods, BoundExpression expression, ImmutableArray<BoundExpression> arguments, TypeSymbol type, bool hasErrors = false) 5930public new TypeSymbol Type => base.Type!; 5938public BoundDynamicInvocation Update(ImmutableArray<string?> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, ImmutableArray<MethodSymbol> applicableMethods, BoundExpression expression, ImmutableArray<BoundExpression> arguments, TypeSymbol type) 5940if (argumentNamesOpt != this.ArgumentNamesOpt || argumentRefKindsOpt != this.ArgumentRefKindsOpt || applicableMethods != this.ApplicableMethods || expression != this.Expression || arguments != this.Arguments || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 5952public BoundConditionalAccess(SyntaxNode syntax, BoundExpression receiver, BoundExpression accessExpression, TypeSymbol type, bool hasErrors = false) 5964public new TypeSymbol Type => base.Type!; 5971public BoundConditionalAccess Update(BoundExpression receiver, BoundExpression accessExpression, TypeSymbol type) 5973if (receiver != this.Receiver || accessExpression != this.AccessExpression || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 5985public BoundLoweredConditionalAccess(SyntaxNode syntax, BoundExpression receiver, MethodSymbol? hasValueMethodOpt, BoundExpression whenNotNull, BoundExpression? whenNullOpt, int id, bool forceCopyOfNullableValueType, TypeSymbol type, bool hasErrors = false) 6001public new TypeSymbol Type => base.Type!; 6012public BoundLoweredConditionalAccess Update(BoundExpression receiver, MethodSymbol? hasValueMethodOpt, BoundExpression whenNotNull, BoundExpression? whenNullOpt, int id, bool forceCopyOfNullableValueType, TypeSymbol type) 6014if (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)) 6026public BoundConditionalReceiver(SyntaxNode syntax, int id, TypeSymbol type, bool hasErrors) 6035public BoundConditionalReceiver(SyntaxNode syntax, int id, TypeSymbol type) 6044public new TypeSymbol Type => base.Type!; 6050public BoundConditionalReceiver Update(int id, TypeSymbol type) 6052if (id != this.Id || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 6064public BoundComplexConditionalReceiver(SyntaxNode syntax, BoundExpression valueTypeReceiver, BoundExpression referenceTypeReceiver, TypeSymbol type, bool hasErrors = false) 6076public new TypeSymbol Type => base.Type!; 6083public BoundComplexConditionalReceiver Update(BoundExpression valueTypeReceiver, BoundExpression referenceTypeReceiver, TypeSymbol type) 6085if (valueTypeReceiver != this.ValueTypeReceiver || referenceTypeReceiver != this.ReferenceTypeReceiver || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 6166public 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) 6193public new TypeSymbol Type => base.Type!; 6211public 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) 6213if (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)) 6225public BoundEventAssignmentOperator(SyntaxNode syntax, EventSymbol @event, bool isAddition, bool isDynamic, BoundExpression? receiverOpt, BoundExpression argument, TypeSymbol type, bool hasErrors = false) 6240public new TypeSymbol Type => base.Type!; 6250public BoundEventAssignmentOperator Update(EventSymbol @event, bool isAddition, bool isDynamic, BoundExpression? receiverOpt, BoundExpression argument, TypeSymbol type) 6252if (!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)) 6264public 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) 6282public new TypeSymbol Type => base.Type!; 6295public BoundAttribute Update(MethodSymbol? constructor, ImmutableArray<BoundExpression> constructorArguments, ImmutableArray<string?> constructorArgumentNamesOpt, ImmutableArray<int> constructorArgumentsToParamsOpt, bool constructorExpanded, BitVector constructorDefaultArguments, ImmutableArray<BoundAssignmentOperator> namedArguments, LookupResultKind resultKind, TypeSymbol type) 6297if (!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)) 6323public new TypeSymbol? Type => base.Type; 6347protected BoundObjectCreationExpressionBase(BoundKind kind, SyntaxNode syntax, TypeSymbol type, bool hasErrors) 6355protected BoundObjectCreationExpressionBase(BoundKind kind, SyntaxNode syntax, TypeSymbol type) 6363public new TypeSymbol Type => base.Type!; 6368public 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) 6405public 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) 6407if (!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)) 6419protected BoundCollectionExpressionBase(BoundKind kind, SyntaxNode syntax, ImmutableArray<BoundNode> elements, TypeSymbol? type, bool hasErrors = false) 6441public new TypeSymbol? Type => base.Type; 6460public 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) 6478public new TypeSymbol Type => base.Type!; 6491public BoundCollectionExpression Update(CollectionExpressionTypeKind collectionTypeKind, BoundObjectOrCollectionValuePlaceholder? placeholder, BoundExpression? collectionCreation, MethodSymbol? collectionBuilderMethod, BoundValuePlaceholder? collectionBuilderInvocationPlaceholder, BoundExpression? collectionBuilderInvocationConversion, bool wasTargetTyped, BoundUnconvertedCollectionExpression unconvertedCollectionExpression, ImmutableArray<BoundNode> elements, TypeSymbol type) 6493if (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)) 6505public BoundCollectionExpressionSpreadExpressionPlaceholder(SyntaxNode syntax, TypeSymbol? type, bool hasErrors) 6510public BoundCollectionExpressionSpreadExpressionPlaceholder(SyntaxNode syntax, TypeSymbol? type) 6519public BoundCollectionExpressionSpreadExpressionPlaceholder Update(TypeSymbol? type) 6521if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 6573protected BoundTupleExpression(BoundKind kind, SyntaxNode syntax, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<bool> inferredNamesOpt, TypeSymbol? type, bool hasErrors = false) 6591public BoundTupleLiteral(SyntaxNode syntax, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<bool> inferredNamesOpt, TypeSymbol? type, bool hasErrors = false) 6599public new TypeSymbol? Type => base.Type; 6604public BoundTupleLiteral Update(ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<bool> inferredNamesOpt, TypeSymbol? type) 6606if (arguments != this.Arguments || argumentNamesOpt != this.ArgumentNamesOpt || inferredNamesOpt != this.InferredNamesOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 6618public BoundConvertedTupleLiteral(SyntaxNode syntax, BoundTupleLiteral? sourceTuple, bool wasTargetTyped, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<bool> inferredNamesOpt, TypeSymbol? type, bool hasErrors = false) 6634public BoundConvertedTupleLiteral Update(BoundTupleLiteral? sourceTuple, bool wasTargetTyped, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<bool> inferredNamesOpt, TypeSymbol? type) 6636if (sourceTuple != this.SourceTuple || wasTargetTyped != this.WasTargetTyped || arguments != this.Arguments || argumentNamesOpt != this.ArgumentNamesOpt || inferredNamesOpt != this.InferredNamesOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 6648public 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) 6677public BoundDynamicObjectCreationExpression Update(string name, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, BoundObjectInitializerExpressionBase? initializerExpressionOpt, ImmutableArray<MethodSymbol> applicableMethods, bool wasTargetTyped, TypeSymbol type) 6679if (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)) 6691public BoundNoPiaObjectCreationExpression(SyntaxNode syntax, string? guidString, BoundObjectInitializerExpressionBase? initializerExpressionOpt, bool wasTargetTyped, TypeSymbol type, bool hasErrors = false) 6709public BoundNoPiaObjectCreationExpression Update(string? guidString, BoundObjectInitializerExpressionBase? initializerExpressionOpt, bool wasTargetTyped, TypeSymbol type) 6711if (guidString != this.GuidString || initializerExpressionOpt != this.InitializerExpressionOpt || wasTargetTyped != this.WasTargetTyped || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 6723protected BoundObjectInitializerExpressionBase(BoundKind kind, SyntaxNode syntax, BoundObjectOrCollectionValuePlaceholder placeholder, ImmutableArray<BoundExpression> initializers, TypeSymbol type, bool hasErrors = false) 6735public new TypeSymbol Type => base.Type!; 6742public BoundObjectInitializerExpression(SyntaxNode syntax, BoundObjectOrCollectionValuePlaceholder placeholder, ImmutableArray<BoundExpression> initializers, TypeSymbol type, bool hasErrors = false) 6756public BoundObjectInitializerExpression Update(BoundObjectOrCollectionValuePlaceholder placeholder, ImmutableArray<BoundExpression> initializers, TypeSymbol type) 6758if (placeholder != this.Placeholder || initializers != this.Initializers || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 6770public 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) 6790public new TypeSymbol Type => base.Type!; 6800public TypeSymbol ReceiverType { get; } 6805public 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) 6807if (!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)) 6819public BoundDynamicObjectInitializerMember(SyntaxNode syntax, string memberName, TypeSymbol receiverType, TypeSymbol type, bool hasErrors) 6831public BoundDynamicObjectInitializerMember(SyntaxNode syntax, string memberName, TypeSymbol receiverType, TypeSymbol type) 6843public new TypeSymbol Type => base.Type!; 6845public TypeSymbol ReceiverType { get; } 6850public BoundDynamicObjectInitializerMember Update(string memberName, TypeSymbol receiverType, TypeSymbol type) 6852if (memberName != this.MemberName || !TypeSymbol.Equals(receiverType, this.ReceiverType, TypeCompareKind.ConsiderEverything) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 6864public BoundCollectionInitializerExpression(SyntaxNode syntax, BoundObjectOrCollectionValuePlaceholder placeholder, ImmutableArray<BoundExpression> initializers, TypeSymbol type, bool hasErrors = false) 6878public BoundCollectionInitializerExpression Update(BoundObjectOrCollectionValuePlaceholder placeholder, ImmutableArray<BoundExpression> initializers, TypeSymbol type) 6880if (placeholder != this.Placeholder || initializers != this.Initializers || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 6892public 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) 6910public new TypeSymbol Type => base.Type!; 6923public BoundCollectionElementInitializer Update(MethodSymbol addMethod, ImmutableArray<BoundExpression> arguments, BoundExpression? implicitReceiverOpt, bool expanded, ImmutableArray<int> argsToParamsOpt, BitVector defaultArguments, bool invokedAsExtensionMethod, LookupResultKind resultKind, TypeSymbol type) 6925if (!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)) 6937public BoundDynamicCollectionElementInitializer(SyntaxNode syntax, ImmutableArray<MethodSymbol> applicableMethods, BoundExpression expression, ImmutableArray<BoundExpression> arguments, TypeSymbol type, bool hasErrors = false) 6949public new TypeSymbol Type => base.Type!; 6955public BoundDynamicCollectionElementInitializer Update(ImmutableArray<MethodSymbol> applicableMethods, BoundExpression expression, ImmutableArray<BoundExpression> arguments, TypeSymbol type) 6957if (applicableMethods != this.ApplicableMethods || expression != this.Expression || arguments != this.Arguments || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 6969public BoundImplicitReceiver(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 6977public BoundImplicitReceiver(SyntaxNode syntax, TypeSymbol type) 6985public new TypeSymbol Type => base.Type!; 6990public BoundImplicitReceiver Update(TypeSymbol type) 6992if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7004public BoundAnonymousObjectCreationExpression(SyntaxNode syntax, MethodSymbol constructor, ImmutableArray<BoundExpression> arguments, ImmutableArray<BoundAnonymousPropertyDeclaration> declarations, TypeSymbol type, bool hasErrors = false) 7018public new TypeSymbol Type => base.Type!; 7026public BoundAnonymousObjectCreationExpression Update(MethodSymbol constructor, ImmutableArray<BoundExpression> arguments, ImmutableArray<BoundAnonymousPropertyDeclaration> declarations, TypeSymbol type) 7028if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(constructor, this.Constructor) || arguments != this.Arguments || declarations != this.Declarations || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7040public BoundAnonymousPropertyDeclaration(SyntaxNode syntax, PropertySymbol property, TypeSymbol type, bool hasErrors) 7050public BoundAnonymousPropertyDeclaration(SyntaxNode syntax, PropertySymbol property, TypeSymbol type) 7060public new TypeSymbol Type => base.Type!; 7066public BoundAnonymousPropertyDeclaration Update(PropertySymbol property, TypeSymbol type) 7068if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(property, this.Property) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7080public BoundNewT(SyntaxNode syntax, BoundObjectInitializerExpressionBase? initializerExpressionOpt, bool wasTargetTyped, TypeSymbol type, bool hasErrors = false) 7096public BoundNewT Update(BoundObjectInitializerExpressionBase? initializerExpressionOpt, bool wasTargetTyped, TypeSymbol type) 7098if (initializerExpressionOpt != this.InitializerExpressionOpt || wasTargetTyped != this.WasTargetTyped || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7110public BoundDelegateCreationExpression(SyntaxNode syntax, BoundExpression argument, MethodSymbol? methodOpt, bool isExtensionMethod, bool wasTargetTyped, TypeSymbol type, bool hasErrors = false) 7123public new TypeSymbol Type => base.Type!; 7132public BoundDelegateCreationExpression Update(BoundExpression argument, MethodSymbol? methodOpt, bool isExtensionMethod, bool wasTargetTyped, TypeSymbol type) 7134if (argument != this.Argument || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(methodOpt, this.MethodOpt) || isExtensionMethod != this.IsExtensionMethod || wasTargetTyped != this.WasTargetTyped || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7146public BoundArrayCreation(SyntaxNode syntax, ImmutableArray<BoundExpression> bounds, BoundArrayInitialization? initializerOpt, TypeSymbol type, bool hasErrors = false) 7157public new TypeSymbol Type => base.Type!; 7164public BoundArrayCreation Update(ImmutableArray<BoundExpression> bounds, BoundArrayInitialization? initializerOpt, TypeSymbol type) 7166if (bounds != this.Bounds || initializerOpt != this.InitializerOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7188public new TypeSymbol? Type => base.Type; 7209protected BoundStackAllocArrayCreationBase(BoundKind kind, SyntaxNode syntax, TypeSymbol elementType, BoundExpression count, BoundArrayInitialization? initializerOpt, TypeSymbol? type, bool hasErrors = false) 7221public TypeSymbol ElementType { get; } 7228public BoundStackAllocArrayCreation(SyntaxNode syntax, TypeSymbol elementType, BoundExpression count, BoundArrayInitialization? initializerOpt, TypeSymbol? type, bool hasErrors = false) 7241public BoundStackAllocArrayCreation Update(TypeSymbol elementType, BoundExpression count, BoundArrayInitialization? initializerOpt, TypeSymbol? type) 7243if (!TypeSymbol.Equals(elementType, this.ElementType, TypeCompareKind.ConsiderEverything) || count != this.Count || initializerOpt != this.InitializerOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7255public BoundConvertedStackAllocExpression(SyntaxNode syntax, TypeSymbol elementType, BoundExpression count, BoundArrayInitialization? initializerOpt, TypeSymbol type, bool hasErrors = false) 7265public new TypeSymbol Type => base.Type!; 7270public BoundConvertedStackAllocExpression Update(TypeSymbol elementType, BoundExpression count, BoundArrayInitialization? initializerOpt, TypeSymbol type) 7272if (!TypeSymbol.Equals(elementType, this.ElementType, TypeCompareKind.ConsiderEverything) || count != this.Count || initializerOpt != this.InitializerOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7284public BoundFieldAccess(SyntaxNode syntax, BoundExpression? receiverOpt, FieldSymbol fieldSymbol, ConstantValue? constantValueOpt, LookupResultKind resultKind, bool isByValue, bool isDeclaration, TypeSymbol type, bool hasErrors = false) 7299public new TypeSymbol Type => base.Type!; 7310public BoundFieldAccess Update(BoundExpression? receiverOpt, FieldSymbol fieldSymbol, ConstantValue? constantValueOpt, LookupResultKind resultKind, bool isByValue, bool isDeclaration, TypeSymbol type) 7312if (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)) 7324public BoundHoistedFieldAccess(SyntaxNode syntax, FieldSymbol fieldSymbol, TypeSymbol type, bool hasErrors) 7334public BoundHoistedFieldAccess(SyntaxNode syntax, FieldSymbol fieldSymbol, TypeSymbol type) 7344public new TypeSymbol Type => base.Type!; 7350public BoundHoistedFieldAccess Update(FieldSymbol fieldSymbol, TypeSymbol type) 7352if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(fieldSymbol, this.FieldSymbol) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7364public BoundPropertyAccess(SyntaxNode syntax, BoundExpression? receiverOpt, ThreeState initialBindingReceiverIsSubjectToCloning, PropertySymbol propertySymbol, AccessorKind autoPropertyAccessorKind, LookupResultKind resultKind, TypeSymbol type, bool hasErrors = false) 7378public new TypeSymbol Type => base.Type!; 7388public BoundPropertyAccess Update(BoundExpression? receiverOpt, ThreeState initialBindingReceiverIsSubjectToCloning, PropertySymbol propertySymbol, AccessorKind autoPropertyAccessorKind, LookupResultKind resultKind, TypeSymbol type) 7390if (receiverOpt != this.ReceiverOpt || initialBindingReceiverIsSubjectToCloning != this.InitialBindingReceiverIsSubjectToCloning || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(propertySymbol, this.PropertySymbol) || autoPropertyAccessorKind != this.AutoPropertyAccessorKind || resultKind != this.ResultKind || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7402public BoundEventAccess(SyntaxNode syntax, BoundExpression? receiverOpt, EventSymbol eventSymbol, bool isUsableAsField, LookupResultKind resultKind, TypeSymbol type, bool hasErrors = false) 7415public new TypeSymbol Type => base.Type!; 7424public BoundEventAccess Update(BoundExpression? receiverOpt, EventSymbol eventSymbol, bool isUsableAsField, LookupResultKind resultKind, TypeSymbol type) 7426if (receiverOpt != this.ReceiverOpt || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(eventSymbol, this.EventSymbol) || isUsableAsField != this.IsUsableAsField || resultKind != this.ResultKind || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7438public 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) 7459public new TypeSymbol Type => base.Type!; 7475public 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) 7477if (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)) 7489public BoundImplicitIndexerAccess(SyntaxNode syntax, BoundExpression receiver, BoundExpression argument, BoundExpression lengthOrCountAccess, BoundImplicitIndexerReceiverPlaceholder receiverPlaceholder, BoundExpression indexerOrSliceAccess, ImmutableArray<BoundImplicitIndexerValuePlaceholder> argumentPlaceholders, TypeSymbol type, bool hasErrors = false) 7513public new TypeSymbol Type => base.Type!; 7524public BoundImplicitIndexerAccess Update(BoundExpression receiver, BoundExpression argument, BoundExpression lengthOrCountAccess, BoundImplicitIndexerReceiverPlaceholder receiverPlaceholder, BoundExpression indexerOrSliceAccess, ImmutableArray<BoundImplicitIndexerValuePlaceholder> argumentPlaceholders, TypeSymbol type) 7526if (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)) 7538public BoundInlineArrayAccess(SyntaxNode syntax, BoundExpression expression, BoundExpression argument, bool isValue, WellKnownMember getItemOrSliceHelper, TypeSymbol type, bool hasErrors = false) 7556public new TypeSymbol Type => base.Type!; 7565public BoundInlineArrayAccess Update(BoundExpression expression, BoundExpression argument, bool isValue, WellKnownMember getItemOrSliceHelper, TypeSymbol type) 7567if (expression != this.Expression || argument != this.Argument || isValue != this.IsValue || getItemOrSliceHelper != this.GetItemOrSliceHelper || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7579public BoundDynamicIndexerAccess(SyntaxNode syntax, BoundExpression receiver, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, ImmutableArray<PropertySymbol> applicableIndexers, TypeSymbol type, bool hasErrors = false) 7595public new TypeSymbol Type => base.Type!; 7605public BoundDynamicIndexerAccess Update(BoundExpression receiver, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, ImmutableArray<PropertySymbol> applicableIndexers, TypeSymbol type) 7607if (receiver != this.Receiver || arguments != this.Arguments || argumentNamesOpt != this.ArgumentNamesOpt || argumentRefKindsOpt != this.ArgumentRefKindsOpt || applicableIndexers != this.ApplicableIndexers || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7619public BoundLambda(SyntaxNode syntax, UnboundLambda unboundLambda, MethodSymbol symbol, BoundBlock body, ReadOnlyBindingDiagnostic<AssemblySymbol> diagnostics, Binder binder, TypeSymbol? type, bool hasErrors = false) 7637public new TypeSymbol? Type => base.Type; 7645public BoundLambda Update(UnboundLambda unboundLambda, MethodSymbol symbol, BoundBlock body, ReadOnlyBindingDiagnostic<AssemblySymbol> diagnostics, Binder binder, TypeSymbol? type) 7647if (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)) 7681public new TypeSymbol? Type => base.Type; 7703public BoundQueryClause(SyntaxNode syntax, BoundExpression value, RangeVariableSymbol? definedSymbol, BoundExpression? operation, BoundExpression? cast, Binder binder, BoundExpression? unoptimizedForm, TypeSymbol type, bool hasErrors = false) 7719public new TypeSymbol Type => base.Type!; 7730public BoundQueryClause Update(BoundExpression value, RangeVariableSymbol? definedSymbol, BoundExpression? operation, BoundExpression? cast, Binder binder, BoundExpression? unoptimizedForm, TypeSymbol type) 7732if (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)) 7770public BoundNameOfOperator(SyntaxNode syntax, BoundExpression argument, ConstantValue constantValueOpt, TypeSymbol type, bool hasErrors = false) 7786public new TypeSymbol Type => base.Type!; 7793public BoundNameOfOperator Update(BoundExpression argument, ConstantValue constantValueOpt, TypeSymbol type) 7795if (argument != this.Argument || constantValueOpt != this.ConstantValueOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7807protected BoundInterpolatedStringBase(BoundKind kind, SyntaxNode syntax, ImmutableArray<BoundExpression> parts, ConstantValue? constantValueOpt, TypeSymbol? type, bool hasErrors = false) 7823public BoundUnconvertedInterpolatedString(SyntaxNode syntax, ImmutableArray<BoundExpression> parts, ConstantValue? constantValueOpt, TypeSymbol? type, bool hasErrors = false) 7835public BoundUnconvertedInterpolatedString Update(ImmutableArray<BoundExpression> parts, ConstantValue? constantValueOpt, TypeSymbol? type) 7837if (parts != this.Parts || constantValueOpt != this.ConstantValueOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7849public BoundInterpolatedString(SyntaxNode syntax, InterpolatedStringHandlerData? interpolationData, ImmutableArray<BoundExpression> parts, ConstantValue? constantValueOpt, TypeSymbol? type, bool hasErrors = false) 7863public BoundInterpolatedString Update(InterpolatedStringHandlerData? interpolationData, ImmutableArray<BoundExpression> parts, ConstantValue? constantValueOpt, TypeSymbol? type) 7865if (!interpolationData.Equals(this.InterpolationData) || parts != this.Parts || constantValueOpt != this.ConstantValueOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7877public BoundInterpolatedStringHandlerPlaceholder(SyntaxNode syntax, TypeSymbol? type, bool hasErrors) 7882public BoundInterpolatedStringHandlerPlaceholder(SyntaxNode syntax, TypeSymbol? type) 7891public BoundInterpolatedStringHandlerPlaceholder Update(TypeSymbol? type) 7893if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7905public BoundInterpolatedStringArgumentPlaceholder(SyntaxNode syntax, int argumentIndex, TypeSymbol type, bool hasErrors) 7914public BoundInterpolatedStringArgumentPlaceholder(SyntaxNode syntax, int argumentIndex, TypeSymbol type) 7923public new TypeSymbol Type => base.Type!; 7929public BoundInterpolatedStringArgumentPlaceholder Update(int argumentIndex, TypeSymbol type) 7931if (argumentIndex != this.ArgumentIndex || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7955public new TypeSymbol? Type => base.Type; 7978public BoundIsPatternExpression(SyntaxNode syntax, BoundExpression expression, BoundPattern pattern, bool isNegated, BoundDecisionDag reachabilityDecisionDag, LabelSymbol whenTrueLabel, LabelSymbol whenFalseLabel, TypeSymbol? type, bool hasErrors = false) 8006public BoundIsPatternExpression Update(BoundExpression expression, BoundPattern pattern, bool isNegated, BoundDecisionDag reachabilityDecisionDag, LabelSymbol whenTrueLabel, LabelSymbol whenFalseLabel, TypeSymbol? type) 8008if (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)) 8020protected BoundPattern(BoundKind kind, SyntaxNode syntax, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors) 8031protected BoundPattern(BoundKind kind, SyntaxNode syntax, TypeSymbol inputType, TypeSymbol narrowedType) 8042public TypeSymbol InputType { get; } 8043public TypeSymbol NarrowedType { get; } 8048public BoundConstantPattern(SyntaxNode syntax, BoundExpression value, ConstantValue constantValue, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors = false) 8071public BoundConstantPattern Update(BoundExpression value, ConstantValue constantValue, TypeSymbol inputType, TypeSymbol narrowedType) 8073if (value != this.Value || constantValue != this.ConstantValue || !TypeSymbol.Equals(inputType, this.InputType, TypeCompareKind.ConsiderEverything) || !TypeSymbol.Equals(narrowedType, this.NarrowedType, TypeCompareKind.ConsiderEverything)) 8085public BoundDiscardPattern(SyntaxNode syntax, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors) 8098public BoundDiscardPattern(SyntaxNode syntax, TypeSymbol inputType, TypeSymbol narrowedType) 8111public BoundDiscardPattern Update(TypeSymbol inputType, TypeSymbol narrowedType) 8113if (!TypeSymbol.Equals(inputType, this.InputType, TypeCompareKind.ConsiderEverything) || !TypeSymbol.Equals(narrowedType, this.NarrowedType, TypeCompareKind.ConsiderEverything)) 8125protected BoundObjectPattern(BoundKind kind, SyntaxNode syntax, Symbol? variable, BoundExpression? variableAccess, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors = false) 8142public BoundDeclarationPattern(SyntaxNode syntax, BoundTypeExpression declaredType, bool isVar, Symbol? variable, BoundExpression? variableAccess, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors = false) 8164public BoundDeclarationPattern Update(BoundTypeExpression declaredType, bool isVar, Symbol? variable, BoundExpression? variableAccess, TypeSymbol inputType, TypeSymbol narrowedType) 8166if (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)) 8178public 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) 8205public BoundRecursivePattern Update(BoundTypeExpression? declaredType, MethodSymbol? deconstructMethod, ImmutableArray<BoundPositionalSubpattern> deconstruction, ImmutableArray<BoundPropertySubpattern> properties, bool isExplicitNotNullTest, Symbol? variable, BoundExpression? variableAccess, TypeSymbol inputType, TypeSymbol narrowedType) 8207if (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)) 8219public 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) 8249public BoundListPattern Update(ImmutableArray<BoundPattern> subpatterns, bool hasSlice, BoundExpression? lengthAccess, BoundExpression? indexerAccess, BoundListPatternReceiverPlaceholder? receiverPlaceholder, BoundListPatternIndexPlaceholder? argumentPlaceholder, Symbol? variable, BoundExpression? variableAccess, TypeSymbol inputType, TypeSymbol narrowedType) 8251if (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)) 8263public BoundSlicePattern(SyntaxNode syntax, BoundPattern? pattern, BoundExpression? indexerAccess, BoundSlicePatternReceiverPlaceholder? receiverPlaceholder, BoundSlicePatternRangePlaceholder? argumentPlaceholder, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors = false) 8288public BoundSlicePattern Update(BoundPattern? pattern, BoundExpression? indexerAccess, BoundSlicePatternReceiverPlaceholder? receiverPlaceholder, BoundSlicePatternRangePlaceholder? argumentPlaceholder, TypeSymbol inputType, TypeSymbol narrowedType) 8290if (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)) 8302public BoundITuplePattern(SyntaxNode syntax, MethodSymbol getLengthMethod, MethodSymbol getItemMethod, ImmutableArray<BoundPositionalSubpattern> subpatterns, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors = false) 8328public BoundITuplePattern Update(MethodSymbol getLengthMethod, MethodSymbol getItemMethod, ImmutableArray<BoundPositionalSubpattern> subpatterns, TypeSymbol inputType, TypeSymbol narrowedType) 8330if (!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)) 8414public BoundPropertySubpatternMember(SyntaxNode syntax, BoundPropertySubpatternMember? receiver, Symbol? symbol, TypeSymbol type, bool hasErrors = false) 8427public TypeSymbol Type { get; } 8432public BoundPropertySubpatternMember Update(BoundPropertySubpatternMember? receiver, Symbol? symbol, TypeSymbol type) 8434if (receiver != this.Receiver || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(symbol, this.Symbol) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 8446public BoundTypePattern(SyntaxNode syntax, BoundTypeExpression declaredType, bool isExplicitNotNullTest, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors = false) 8468public BoundTypePattern Update(BoundTypeExpression declaredType, bool isExplicitNotNullTest, TypeSymbol inputType, TypeSymbol narrowedType) 8470if (declaredType != this.DeclaredType || isExplicitNotNullTest != this.IsExplicitNotNullTest || !TypeSymbol.Equals(inputType, this.InputType, TypeCompareKind.ConsiderEverything) || !TypeSymbol.Equals(narrowedType, this.NarrowedType, TypeCompareKind.ConsiderEverything)) 8482public BoundBinaryPattern(SyntaxNode syntax, bool disjunction, BoundPattern left, BoundPattern right, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors = false) 8507public BoundBinaryPattern Update(bool disjunction, BoundPattern left, BoundPattern right, TypeSymbol inputType, TypeSymbol narrowedType) 8509if (disjunction != this.Disjunction || left != this.Left || right != this.Right || !TypeSymbol.Equals(inputType, this.InputType, TypeCompareKind.ConsiderEverything) || !TypeSymbol.Equals(narrowedType, this.NarrowedType, TypeCompareKind.ConsiderEverything)) 8521public BoundNegatedPattern(SyntaxNode syntax, BoundPattern negated, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors = false) 8541public BoundNegatedPattern Update(BoundPattern negated, TypeSymbol inputType, TypeSymbol narrowedType) 8543if (negated != this.Negated || !TypeSymbol.Equals(inputType, this.InputType, TypeCompareKind.ConsiderEverything) || !TypeSymbol.Equals(narrowedType, this.NarrowedType, TypeCompareKind.ConsiderEverything)) 8555public BoundRelationalPattern(SyntaxNode syntax, BinaryOperatorKind relation, BoundExpression value, ConstantValue constantValue, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors = false) 8580public BoundRelationalPattern Update(BinaryOperatorKind relation, BoundExpression value, ConstantValue constantValue, TypeSymbol inputType, TypeSymbol narrowedType) 8582if (relation != this.Relation || value != this.Value || constantValue != this.ConstantValue || !TypeSymbol.Equals(inputType, this.InputType, TypeCompareKind.ConsiderEverything) || !TypeSymbol.Equals(narrowedType, this.NarrowedType, TypeCompareKind.ConsiderEverything)) 8594public BoundDiscardExpression(SyntaxNode syntax, NullableAnnotation nullableAnnotation, bool isInferred, TypeSymbol? type, bool hasErrors) 8601public BoundDiscardExpression(SyntaxNode syntax, NullableAnnotation nullableAnnotation, bool isInferred, TypeSymbol? type) 8608public new TypeSymbol? Type => base.Type; 8615public BoundDiscardExpression Update(NullableAnnotation nullableAnnotation, bool isInferred, TypeSymbol? type) 8617if (nullableAnnotation != this.NullableAnnotation || isInferred != this.IsInferred || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 8629public BoundThrowExpression(SyntaxNode syntax, BoundExpression expression, TypeSymbol? type, bool hasErrors = false) 8643public BoundThrowExpression Update(BoundExpression expression, TypeSymbol? type) 8645if (expression != this.Expression || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 8667public new TypeSymbol? Type => base.Type; 8740public new TypeSymbol? Type => base.Type; 8827public BoundExpressionWithNullability(SyntaxNode syntax, BoundExpression expression, NullableAnnotation nullableAnnotation, TypeSymbol? type, bool hasErrors = false) 8838public new TypeSymbol? Type => base.Type; 8844public BoundExpressionWithNullability Update(BoundExpression expression, NullableAnnotation nullableAnnotation, TypeSymbol? type) 8846if (expression != this.Expression || nullableAnnotation != this.NullableAnnotation || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 8858public BoundWithExpression(SyntaxNode syntax, BoundExpression receiver, MethodSymbol? cloneMethod, BoundObjectInitializerExpressionBase initializerExpression, TypeSymbol type, bool hasErrors = false) 8871public new TypeSymbol Type => base.Type!; 8879public BoundWithExpression Update(BoundExpression receiver, MethodSymbol? cloneMethod, BoundObjectInitializerExpressionBase initializerExpression, TypeSymbol type) 8881if (receiver != this.Receiver || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(cloneMethod, this.CloneMethod) || initializerExpression != this.InitializerExpression || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 10895TypeSymbol? type = this.VisitType(node.Type); 10901TypeSymbol? type = this.VisitType(node.Type); 10907TypeSymbol? type = this.VisitType(node.Type); 10912TypeSymbol? type = this.VisitType(node.Type); 10917TypeSymbol? type = this.VisitType(node.Type); 10922TypeSymbol? type = this.VisitType(node.Type); 10927TypeSymbol? type = this.VisitType(node.Type); 10932TypeSymbol? type = this.VisitType(node.Type); 10937TypeSymbol? type = this.VisitType(node.Type); 10942TypeSymbol? type = this.VisitType(node.Type); 10947TypeSymbol? type = this.VisitType(node.Type); 10952TypeSymbol? type = this.VisitType(node.Type); 10957TypeSymbol? type = this.VisitType(node.Type); 10962TypeSymbol? type = this.VisitType(node.Type); 10968TypeSymbol? type = this.VisitType(node.Type); 10975TypeSymbol? type = this.VisitType(node.Type); 10993TypeSymbol? type = this.VisitType(node.Type); 10999TypeSymbol? type = this.VisitType(node.Type); 11006TypeSymbol? type = this.VisitType(node.Type); 11014TypeSymbol? constrainedToTypeOpt = this.VisitType(node.ConstrainedToTypeOpt); 11015TypeSymbol? type = this.VisitType(node.Type); 11027TypeSymbol? constrainedToTypeOpt = this.VisitType(node.ConstrainedToTypeOpt); 11028TypeSymbol? type = this.VisitType(node.Type); 11034TypeSymbol? type = this.VisitType(node.Type); 11040TypeSymbol? type = this.VisitType(node.Type); 11046TypeSymbol? constrainedToTypeOpt = this.VisitType(node.ConstrainedToTypeOpt); 11047TypeSymbol? type = this.VisitType(node.Type); 11053TypeSymbol? type = this.VisitType(node.Type); 11060TypeSymbol? type = this.VisitType(node.Type); 11067TypeSymbol? type = this.VisitType(node.Type); 11074TypeSymbol? type = this.VisitType(node.Type); 11080TypeSymbol? type = this.VisitType(node.Type); 11086TypeSymbol? type = this.VisitType(node.Type); 11093TypeSymbol? type = this.VisitType(node.Type); 11101TypeSymbol? type = this.VisitType(node.Type); 11108TypeSymbol? type = this.VisitType(node.Type); 11115TypeSymbol? type = this.VisitType(node.Type); 11128TypeSymbol? constrainedToTypeOpt = this.VisitType(node.ConstrainedToTypeOpt); 11129TypeSymbol? type = this.VisitType(node.Type); 11141TypeSymbol? type = this.VisitType(node.Type); 11148TypeSymbol? type = this.VisitType(node.Type); 11155TypeSymbol? type = this.VisitType(node.Type); 11164TypeSymbol? type = this.VisitType(node.Type); 11171TypeSymbol? type = this.VisitType(node.Type); 11179TypeSymbol? type = this.VisitType(node.Type); 11187TypeSymbol? naturalTypeOpt = this.VisitType(node.NaturalTypeOpt); 11188TypeSymbol? type = this.VisitType(node.Type); 11195TypeSymbol? type = this.VisitType(node.Type); 11201TypeSymbol? type = this.VisitType(node.Type); 11207TypeSymbol? type = this.VisitType(node.Type); 11224TypeSymbol? type = this.VisitType(node.Type); 11231TypeSymbol? type = this.VisitType(node.Type); 11244TypeSymbol? type = this.VisitType(node.Type); 11251TypeSymbol? type = this.VisitType(node.Type); 11258TypeSymbol? type = this.VisitType(node.Type); 11263TypeSymbol? type = this.VisitType(node.Type); 11268TypeSymbol? type = this.VisitType(node.Type); 11273TypeSymbol? type = this.VisitType(node.Type); 11278TypeSymbol? type = this.VisitType(node.Type); 11283TypeSymbol? type = this.VisitType(node.Type); 11288TypeSymbol? type = this.VisitType(node.Type); 11293TypeSymbol? type = this.VisitType(node.Type); 11298TypeSymbol? type = this.VisitType(node.Type); 11305TypeSymbol? type = this.VisitType(node.Type); 11312TypeSymbol? type = this.VisitType(node.Type); 11317TypeSymbol? type = this.VisitType(node.Type); 11323TypeSymbol? type = this.VisitType(node.Type); 11330TypeSymbol? type = this.VisitType(node.Type); 11339TypeSymbol? type = this.VisitType(node.Type); 11345TypeSymbol? type = this.VisitType(node.Type); 11351TypeSymbol? type = this.VisitType(node.Type); 11358TypeSymbol? type = this.VisitType(node.Type); 11363TypeSymbol? type = this.VisitType(node.Type); 11369TypeSymbol? type = this.VisitType(node.Type); 11378TypeSymbol? elementPointerType = this.VisitType(node.ElementPointerType); 11379TypeSymbol? type = this.VisitType(node.Type); 11584TypeSymbol? exceptionTypeOpt = this.VisitType(node.ExceptionTypeOpt); 11589TypeSymbol? type = this.VisitType(node.Type); 11594TypeSymbol? type = this.VisitType(node.Type); 11599TypeSymbol? type = this.VisitType(node.Type); 11604TypeSymbol? type = this.VisitType(node.Type); 11609TypeSymbol? type = this.VisitType(node.Type); 11614TypeSymbol? type = this.VisitType(node.Type); 11620TypeSymbol? type = this.VisitType(node.Type); 11626TypeSymbol? type = this.VisitType(node.Type); 11633TypeSymbol? type = this.VisitType(node.Type); 11639TypeSymbol? type = this.VisitType(node.Type); 11663TypeSymbol? type = this.VisitType(node.Type); 11692TypeSymbol? type = this.VisitType(node.Type); 11701TypeSymbol? naturalTypeOpt = this.VisitType(node.NaturalTypeOpt); 11702TypeSymbol? type = this.VisitType(node.Type); 11738TypeSymbol? type = this.VisitType(node.Type); 11744TypeSymbol? type = this.VisitType(node.Type); 11776TypeSymbol? type = this.VisitType(node.Type); 11804TypeSymbol? indexerType = this.VisitType(node.IndexerType); 11814TypeSymbol? sliceType = this.VisitType(node.SliceType); 11840TypeSymbol? type = this.VisitType(node.Type); 11848TypeSymbol? type = this.VisitType(node.Type); 11856TypeSymbol? type = this.VisitType(node.Type); 11862TypeSymbol? type = this.VisitType(node.Type); 11870TypeSymbol? type = this.VisitType(node.Type); 11877TypeSymbol? type = this.VisitType(node.Type); 11886TypeSymbol? type = this.VisitType(node.Type); 11891TypeSymbol? type = this.VisitType(node.Type); 11898TypeSymbol? type = this.VisitType(node.Type); 11907TypeSymbol? type = this.VisitType(node.Type); 11914TypeSymbol? type = this.VisitType(node.Type); 11923TypeSymbol? type = this.VisitType(node.Type); 11931TypeSymbol? type = this.VisitType(node.Type); 11939TypeSymbol? type = this.VisitType(node.Type); 11945TypeSymbol? type = this.VisitType(node.Type); 11954TypeSymbol? type = this.VisitType(node.Type); 11960TypeSymbol? type = this.VisitType(node.Type); 11972TypeSymbol? type = this.VisitType(node.Type); 11977TypeSymbol? type = this.VisitType(node.Type); 11993TypeSymbol? type = this.VisitType(node.Type); 12000TypeSymbol? type = this.VisitType(node.Type); 12008TypeSymbol? type = this.VisitType(node.Type); 12014TypeSymbol? type = this.VisitType(node.Type); 12021TypeSymbol? type = this.VisitType(node.Type); 12028TypeSymbol? receiverType = this.VisitType(node.ReceiverType); 12029TypeSymbol? type = this.VisitType(node.Type); 12034TypeSymbol? receiverType = this.VisitType(node.ReceiverType); 12035TypeSymbol? type = this.VisitType(node.Type); 12042TypeSymbol? type = this.VisitType(node.Type); 12050TypeSymbol? type = this.VisitType(node.Type); 12058TypeSymbol? type = this.VisitType(node.Type); 12063TypeSymbol? type = this.VisitType(node.Type); 12071TypeSymbol? type = this.VisitType(node.Type); 12077TypeSymbol? type = this.VisitType(node.Type); 12083TypeSymbol? type = this.VisitType(node.Type); 12090TypeSymbol? type = this.VisitType(node.Type); 12097TypeSymbol? type = this.VisitType(node.Type); 12103TypeSymbol? type = this.VisitType(node.Type); 12110TypeSymbol? elementType = this.VisitType(node.ElementType); 12111TypeSymbol? type = this.VisitType(node.Type); 12118TypeSymbol? elementType = this.VisitType(node.ElementType); 12119TypeSymbol? type = this.VisitType(node.Type); 12126TypeSymbol? type = this.VisitType(node.Type); 12132TypeSymbol? type = this.VisitType(node.Type); 12139TypeSymbol? type = this.VisitType(node.Type); 12146TypeSymbol? type = this.VisitType(node.Type); 12155TypeSymbol? type = this.VisitType(node.Type); 12166TypeSymbol? type = this.VisitType(node.Type); 12173TypeSymbol? type = this.VisitType(node.Type); 12181TypeSymbol? type = this.VisitType(node.Type); 12189TypeSymbol? type = this.VisitType(node.Type); 12195TypeSymbol? type = this.VisitType(node.Type); 12205TypeSymbol? type = this.VisitType(node.Type); 12216TypeSymbol? type = this.VisitType(node.Type); 12222TypeSymbol? type = this.VisitType(node.Type); 12228TypeSymbol? type = this.VisitType(node.Type); 12233TypeSymbol? type = this.VisitType(node.Type); 12238TypeSymbol? type = this.VisitType(node.Type); 12246TypeSymbol? type = this.VisitType(node.Type); 12256TypeSymbol? type = this.VisitType(node.Type); 12262TypeSymbol? inputType = this.VisitType(node.InputType); 12263TypeSymbol? narrowedType = this.VisitType(node.NarrowedType); 12268TypeSymbol? inputType = this.VisitType(node.InputType); 12269TypeSymbol? narrowedType = this.VisitType(node.NarrowedType); 12277TypeSymbol? inputType = this.VisitType(node.InputType); 12278TypeSymbol? narrowedType = this.VisitType(node.NarrowedType); 12289TypeSymbol? inputType = this.VisitType(node.InputType); 12290TypeSymbol? narrowedType = this.VisitType(node.NarrowedType); 12302TypeSymbol? inputType = this.VisitType(node.InputType); 12303TypeSymbol? narrowedType = this.VisitType(node.NarrowedType); 12312TypeSymbol? inputType = this.VisitType(node.InputType); 12313TypeSymbol? narrowedType = this.VisitType(node.NarrowedType); 12321TypeSymbol? inputType = this.VisitType(node.InputType); 12322TypeSymbol? narrowedType = this.VisitType(node.NarrowedType); 12341TypeSymbol? type = this.VisitType(node.Type); 12347TypeSymbol? inputType = this.VisitType(node.InputType); 12348TypeSymbol? narrowedType = this.VisitType(node.NarrowedType); 12355TypeSymbol? inputType = this.VisitType(node.InputType); 12356TypeSymbol? narrowedType = this.VisitType(node.NarrowedType); 12362TypeSymbol? inputType = this.VisitType(node.InputType); 12363TypeSymbol? narrowedType = this.VisitType(node.NarrowedType); 12369TypeSymbol? inputType = this.VisitType(node.InputType); 12370TypeSymbol? narrowedType = this.VisitType(node.NarrowedType); 12375TypeSymbol? type = this.VisitType(node.Type); 12381TypeSymbol? type = this.VisitType(node.Type); 12388TypeSymbol? type = this.VisitType(node.Type); 12395TypeSymbol? type = this.VisitType(node.Type); 12401TypeSymbol? type = this.VisitType(node.Type); 12421TypeSymbol? type = this.VisitType(node.Type); 12429TypeSymbol? type = this.VisitType(node.Type); 12436private readonly ImmutableDictionary<BoundExpression, (NullabilityInfo Info, TypeSymbol? Type)> _updatedNullabilities; 12440public NullabilityRewriter(ImmutableDictionary<BoundExpression, (NullabilityInfo Info, TypeSymbol? Type)> updatedNullabilities, NullableWalker.SnapshotManager? snapshotManager, ImmutableDictionary<Symbol, Symbol>.Builder remappedSymbols) 12473if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12488if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12505if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12519if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12531if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12543if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12555if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12567if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12579if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12591if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12603if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12615if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12627if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12639if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12654if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12672if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12690if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12707if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12721if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12734TypeSymbol? constrainedToTypeOpt = GetUpdatedSymbol(node, node.ConstrainedToTypeOpt); 12739if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12754TypeSymbol? constrainedToTypeOpt = GetUpdatedSymbol(node, node.ConstrainedToTypeOpt); 12763if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12780if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12797if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12812TypeSymbol? constrainedToTypeOpt = GetUpdatedSymbol(node, node.ConstrainedToTypeOpt); 12815if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12832if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12850if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12868if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12886if (_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)) 12938if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12957if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12975if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12993if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13011if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13031if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13049if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13068if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13082TypeSymbol? naturalTypeOpt = GetUpdatedSymbol(node, node.NaturalTypeOpt); 13088if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13106if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13123if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13140if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13169if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13187if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13212if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13230if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13248if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13262if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13274if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13286if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13298if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13310if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13322if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13334if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13346if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13362if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13380if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13394if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13409if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13427if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13447if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13464if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13481if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13499if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13513if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13528if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13542TypeSymbol elementPointerType = GetUpdatedSymbol(node, node.ElementPointerType); 13549if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13673TypeSymbol? exceptionTypeOpt = GetUpdatedSymbol(node, node.ExceptionTypeOpt); 13683if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13695if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13707if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13719if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13731if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13743if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13758if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13775if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13793if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13810if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13824if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13850if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13864TypeSymbol? naturalTypeOpt = GetUpdatedSymbol(node, node.NaturalTypeOpt); 13870if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13912TypeSymbol indexerType = GetUpdatedSymbol(node, node.IndexerType); 13923TypeSymbol sliceType = GetUpdatedSymbol(node, node.SliceType); 13945if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13964if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13983if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14000if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14019if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14037if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14057if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14071if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14087if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14107if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14125if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14145if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14164if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14183if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14200if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14220if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14237if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14260if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14274if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14289if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14307if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14326if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14343if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14361if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14376TypeSymbol receiverType = GetUpdatedSymbol(node, node.ReceiverType); 14380if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14394TypeSymbol receiverType = GetUpdatedSymbol(node, node.ReceiverType); 14397if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14415if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14434if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14453if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14467if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14484if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14501if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14518if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14536if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14554if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14571if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14585TypeSymbol elementType = GetUpdatedSymbol(node, node.ElementType); 14590if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14604TypeSymbol elementType = GetUpdatedSymbol(node, node.ElementType); 14609if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14627if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14644if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14662if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14680if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14700if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14718if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14737if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14756if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14773if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14794if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14811if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14828if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14845if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14859if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14871if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14888if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14907if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14921TypeSymbol inputType = GetUpdatedSymbol(node, node.InputType); 14922TypeSymbol narrowedType = GetUpdatedSymbol(node, node.NarrowedType); 14929TypeSymbol inputType = GetUpdatedSymbol(node, node.InputType); 14930TypeSymbol narrowedType = GetUpdatedSymbol(node, node.NarrowedType); 14937TypeSymbol inputType = GetUpdatedSymbol(node, node.InputType); 14938TypeSymbol narrowedType = GetUpdatedSymbol(node, node.NarrowedType); 14948TypeSymbol inputType = GetUpdatedSymbol(node, node.InputType); 14949TypeSymbol narrowedType = GetUpdatedSymbol(node, node.NarrowedType); 14960TypeSymbol inputType = GetUpdatedSymbol(node, node.InputType); 14961TypeSymbol narrowedType = GetUpdatedSymbol(node, node.NarrowedType); 14973TypeSymbol inputType = GetUpdatedSymbol(node, node.InputType); 14974TypeSymbol narrowedType = GetUpdatedSymbol(node, node.NarrowedType); 14986TypeSymbol inputType = GetUpdatedSymbol(node, node.InputType); 14987TypeSymbol narrowedType = GetUpdatedSymbol(node, node.NarrowedType); 15008TypeSymbol inputType = GetUpdatedSymbol(node, node.InputType); 15009TypeSymbol narrowedType = GetUpdatedSymbol(node, node.NarrowedType); 15016TypeSymbol inputType = GetUpdatedSymbol(node, node.InputType); 15017TypeSymbol narrowedType = GetUpdatedSymbol(node, node.NarrowedType); 15024TypeSymbol inputType = GetUpdatedSymbol(node, node.InputType); 15025TypeSymbol narrowedType = GetUpdatedSymbol(node, node.NarrowedType); 15032if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 15047if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 15065if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 15083if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 15100if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 15126if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 15145if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
Lowering\AsyncRewriter\AsyncExceptionHandlerRewriter.cs (3)
41Debug.Assert(TypeSymbol.Equals(factory.CurrentType, (containingType ?? containingMethod.ContainingType), TypeCompareKind.ConsiderEverything2)); 614var catchType = node.ExceptionTypeOpt ?? _F.SpecialType(SpecialType.System_Object); 1129if (!_hoistedLocals.Keys.Any(l => l.Name == local.Name && TypeSymbol.Equals(l.Type, local.Type, TypeCompareKind.ConsiderEverything2)))
Lowering\AsyncRewriter\AsyncIteratorMethodToStateMachineRewriter.cs (1)
170TypeSymbol combinedTokensType = combinedTokens.Type;
Lowering\AsyncRewriter\AsyncMethodBuilderMemberCollection.cs (8)
39internal readonly TypeSymbol ResultType; 88TypeSymbol resultType, 181TypeSymbol methodLevelBuilder = null; 190TypeSymbol builderArgument; 256var resultType = returnType.TypeArgumentsWithAnnotationsNoUseSiteDiagnostics.Single().Type; 271TypeSymbol builderArgument; 339private static NamedTypeSymbol ValidateBuilderType(SyntheticBoundNodeFactory F, TypeSymbol builderAttributeArgument, Accessibility desiredAccessibility, bool isGeneric, bool forMethodLevelBuilder = false) 375TypeSymbol resultType,
Lowering\AsyncRewriter\AsyncMethodToStateMachineRewriter.cs (8)
61private readonly Dictionary<TypeSymbol, FieldSymbol> _awaiterFields; 100_awaiterFields = new Dictionary<TypeSymbol, FieldSymbol>(Symbols.SymbolEqualityComparer.IgnoringDynamicTupleNamesAndNullability); 108private FieldSymbol GetAwaiterField(TypeSymbol awaiterType) 368TypeSymbol type = VisitType(node.Type); 472TypeSymbol awaiterFieldType = awaiterTemp.Type.IsVerifierReference() 492(TypeSymbol.Equals(awaiterField.Type, awaiterTemp.Type, TypeCompareKind.ConsiderEverything2)) 524TypeSymbol.Equals(awaiterTemp.Type, awaiterField.Type, TypeCompareKind.ConsiderEverything2) 618private BoundStatement GenerateAwaitOnCompleted(TypeSymbol loweredAwaiterType, LocalSymbol awaiterTemp)
Lowering\AsyncRewriter\AsyncRewriter.AsyncIteratorRewriter.cs (3)
45Debug.Assert(!TypeSymbol.Equals(method.IteratorElementTypeWithAnnotations.Type, null, TypeCompareKind.ConsiderEverything2)); 134TypeSymbol elementType = ((AsyncStateMachine)stateMachineType).IteratorElementType; 432TypeSymbol returnType = IAsyncDisposable_DisposeAsync.ReturnType;
Lowering\AsyncRewriter\AsyncStateMachine.cs (3)
23internal readonly TypeSymbol IteratorElementType; // only for async-iterators 35var elementType = TypeMap.SubstituteType(asyncMethod.IteratorElementTypeWithAnnotations).Type; 78internal override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol> basesBeingResolved)
Lowering\AsyncRewriter\RuntimeAsyncRewriter.cs (2)
110var nodeType = node.Expression.Type; 254static LocalSymbol createHoistedLocal(TypeSymbol type, RuntimeAsyncRewriter @this, LocalSymbol local)
Lowering\BoundTreeToDifferentEnclosingContextRewriter.cs (4)
62var newType = VisitType(local.Type); 63if (TypeSymbol.Equals(newType, local.Type, TypeCompareKind.ConsiderEverything2) && 115public sealed override TypeSymbol? VisitType(TypeSymbol? type)
Lowering\ClosureConversion\ClosureConversion.Analysis.Tree.cs (1)
682TypeSymbol type;
Lowering\ClosureConversion\ClosureConversion.cs (14)
247Debug.Assert(thisParameter is null || TypeSymbol.Equals(thisParameter.Type, thisType, TypeCompareKind.ConsiderEverything2)); 585Debug.Assert(TypeSymbol.Equals(result.Type, frameType, TypeCompareKind.ConsiderEverything2)); 602if ((object)_currentFrameThis != null && TypeSymbol.Equals(_currentFrameThis.Type, frameClass, TypeCompareKind.ConsiderEverything2)) 615if (TypeSymbol.Equals(potentialParameter.Type.OriginalDefinition, frameClass, TypeCompareKind.ConsiderEverything2)) 682Debug.Assert(TypeSymbol.Equals(frameType, constructor.ContainingType, TypeCompareKind.ConsiderEverything2)); 854return (!_currentMethod.IsStatic && TypeSymbol.Equals(_currentMethod.ContainingType, _topLevelMethod.ContainingType, TypeCompareKind.ConsiderEverything2)) 861TypeSymbol type = VisitType(node.Type); 999while (!TypeSymbol.Equals(oldTypeArg.Type, newTypeArg.Type, TypeCompareKind.ConsiderEverything)); 1080var type = VisitType(node.Type); 1150var newType = this.VisitType(node.Type); 1278var exceptionTypeOpt = this.VisitType(node.ExceptionTypeOpt); 1628var newType = VisitType(node.Type); 1658TypeSymbol type = this.VisitType(node.Type); 1697var cacheVariableType = containerAsFrame.TypeMap.SubstituteType(node.Type).Type;
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (32)
299if (!TypeSymbol.Equals(index.Type, _int32Type, TypeCompareKind.ConsiderEverything2)) 317if (!TypeSymbol.Equals(index.Type, _int32Type, TypeCompareKind.ConsiderEverything2)) 488private BoundExpression VisitBinaryOperator(BinaryOperatorKind opKind, MethodSymbol methodOpt, TypeSymbol type, BoundExpression left, BoundExpression right) 511var promotedType = PromotedType(enumOperand.Type.StrippedType().GetEnumUnderlyingType()); 549private BoundExpression VisitAndPromoteEnumOperand(BoundExpression operand, TypeSymbol promotedType, bool isChecked) 568private BoundExpression MakeBinary(MethodSymbol methodOpt, TypeSymbol type, bool isLifted, bool requiresLifted, WellKnownMember opFactory, BoundExpression loweredLeft, BoundExpression loweredRight) 574_bound.Literal(isLifted && !TypeSymbol.Equals(methodOpt.ReturnType, type, TypeCompareKind.ConsiderEverything2)), 580private TypeSymbol PromotedType(TypeSymbol underlying) 599private BoundExpression Demote(BoundExpression node, TypeSymbol type, bool isChecked) 609var promotedType = e.IsNullableType() ? _nullableType.Construct(PromotedType(e.GetNullableUnderlyingType())) : PromotedType(e); 610if (!TypeSymbol.Equals(promotedType, type, TypeCompareKind.ConsiderEverything2)) 619private BoundExpression ConvertIndex(BoundExpression expr, TypeSymbol oldType, TypeSymbol newType) 701var operandType = node.Operand.Type; 702var strippedOperandType = operandType.StrippedType(); 703var conversionInputType = method.Parameters[0].Type; 704var isLifted = !TypeSymbol.Equals(operandType, conversionInputType, TypeCompareKind.ConsiderEverything2) && TypeSymbol.Equals(strippedOperandType, conversionInputType, TypeCompareKind.ConsiderEverything2); 706!TypeSymbol.Equals(strippedOperandType, ((node.ConversionKind == ConversionKind.ExplicitUserDefined) ? conversionInputType : conversionInputType.StrippedType()), TypeCompareKind.ConsiderEverything2); 707var resultType = (isLifted && method.ReturnType.IsNonNullableValueType() && node.Type.IsNullableType()) ? 734var intermediate = nullable.TypeArgumentsWithAnnotationsNoUseSiteDiagnostics[0].Type; 745private BoundExpression Convert(BoundExpression operand, TypeSymbol oldType, TypeSymbol newType, bool isChecked, bool isExplicit) 747return (TypeSymbol.Equals(oldType, newType, TypeCompareKind.ConsiderEverything2) && !isExplicit) ? operand : Convert(operand, newType, isChecked); 750private BoundExpression Convert(BoundExpression expr, TypeSymbol type, bool isChecked) 758private BoundExpression DelegateCreation(BoundExpression receiver, MethodSymbol method, TypeSymbol delegateType, bool requiresInstanceReceiver) 857ImmutableArray.Create<TypeSymbol>(underlyingDelegateType), 881TypeSymbol lambdaParamType = node.LeftPlaceholder.Type; 890private BoundExpression MakeConversionLambda(Conversion conversion, TypeSymbol fromType, TypeSymbol toType) 1189var promotedType = PromotedType(arg.Type.StrippedType().GetEnumUnderlyingType());
Lowering\ClosureConversion\LambdaCapturedVariable.cs (2)
51TypeSymbol type = GetCapturedVariableFieldType(frame, captured); 116private static TypeSymbol GetCapturedVariableFieldType(SynthesizedContainer frame, Symbol variable)
Lowering\ClosureConversion\SynthesizedClosureMethod.cs (2)
215protected override ImmutableArray<TypeSymbol> ExtraSynthesizedRefParameters 216=> ImmutableArray<TypeSymbol>.CastUp(_structEnvironments);
Lowering\DiagnosticsPass_ExpressionTrees.cs (2)
402expr.Type is TypeSymbol type && 931private void CheckMethodGroup(BoundMethodGroup node, MethodSymbol method, bool isExtensionMethod, bool parentIsConversion, TypeSymbol convertedToType)
Lowering\DiagnosticsPass_Warnings.cs (12)
116TypeSymbol baseType = fieldAccess.FieldSymbol.ContainingType; 119if (TypeSymbol.Equals(baseType, marshalByRefType, TypeCompareKind.ConsiderEverything)) 154if ((object)interlocked != null && TypeSymbol.Equals(interlocked, method.ContainingType, TypeCompareKind.ConsiderEverything2)) 228Debug.Assert(TypeSymbol.Equals(expr1.Type, expr2.Type, TypeCompareKind.ConsiderEverything2)); 329TypeSymbol t; 350private static bool ConvertedHasEqual(BinaryOperatorKind oldOperatorKind, BoundNode node, out TypeSymbol type) 370if (parameters.Length == 2 && TypeSymbol.Equals(parameters[0].Type, t, TypeCompareKind.ConsiderEverything2) && TypeSymbol.Equals(parameters[1].Type, t, TypeCompareKind.ConsiderEverything2)) 612TypeSymbol from = conv.Operand.Type; 613TypeSymbol to = conv.Type; 851private static TypeSymbol GetTypeForLiftedComparisonWarning(BoundExpression node) 863TypeSymbol type = null;
Lowering\ExtensionMethodBodyRewriter.cs (1)
104TypeSymbol? type = this.VisitType(node.Type);
Lowering\ExtensionMethodReferenceRewriter.cs (9)
98TypeSymbol type) 203TypeSymbol? type = rewriter.VisitType(node.Type); 216var type = rewriter.VisitType(node.Type); 236TypeSymbol? constrainedToTypeOpt = rewriter.VisitType(node.ConstrainedToTypeOpt); 237TypeSymbol? type = rewriter.VisitType(node.Type); 254TypeSymbol? constrainedToType = rewriter.VisitType(node.ConstrainedToType); 256if (Symbol.Equals(method, binaryOperatorMethod, TypeCompareKind.AllIgnoreOptions) && TypeSymbol.Equals(constrainedToType, node.ConstrainedToType, TypeCompareKind.AllIgnoreOptions)) 285TypeSymbol? constrainedToTypeOpt = rewriter.VisitType(node.ConstrainedToTypeOpt); 286TypeSymbol? type = rewriter.VisitType(node.Type);
Lowering\InitializerRewriter.cs (1)
34var submissionResultType = method.ResultType;
Lowering\Instrumentation\CodeCoverageInstrumenter.cs (1)
116TypeSymbol payloadElementType = methodBodyFactory.SpecialType(SpecialType.System_Boolean);
Lowering\Instrumentation\CompoundInstrumenter.cs (1)
224ref TypeSymbol? rewrittenType,
Lowering\Instrumentation\DebugInfoInjector.cs (1)
460ref TypeSymbol? rewrittenType,
Lowering\Instrumentation\Instrumenter.cs (1)
299ref TypeSymbol? rewrittenType,
Lowering\Instrumentation\LocalStateTracingInstrumenter.cs (10)
128private readonly TypeSymbol _contextType; 132TypeSymbol contextType, 204private MethodSymbol? GetLocalOrParameterStoreLogger(TypeSymbol variableType, Symbol targetSymbol, bool? refAssignmentSourceIsLocal, SyntaxNode syntax) 249static bool hasOverriddenToString(TypeSymbol variableType) 392if (!TryGetLocalOrParameterInfo(original.Left, out var targetSymbol, out var targetType, out var targetIndex)) 413private bool TryGetLocalOrParameterInfo(BoundNode node, [NotNullWhen(true)] out Symbol? symbol, [NotNullWhen(true)] out TypeSymbol? type, [NotNullWhen(true)] out BoundExpression? indexExpression) 442TypeSymbol targetType, 504ref TypeSymbol? rewrittenType, 527var targetType = targetSymbol.Type; 602if (!TryGetLocalOrParameterInfo(arguments[i], out var targetSymbol, out var targetType, out var targetIndex))
Lowering\IteratorRewriter\IteratorStateMachine.cs (1)
56internal override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol> basesBeingResolved)
Lowering\LocalRewriter\DelegateCacheContainer.cs (13)
19private readonly Dictionary<(TypeSymbol?, TypeSymbol, MethodSymbol), FieldSymbol> _delegateFields = new(CLRSignatureComparer.Instance); 63var delegateType = boundDelegateCreation.Type; 68var constrainedToTypeOpt = ((targetMethod.IsAbstract || targetMethod.IsVirtual) && boundDelegateCreation.Argument is BoundTypeExpression typeExpression) ? typeExpression.Type : null; 75var fieldType = TypeParameters.IsEmpty ? delegateType : TypeMap.SubstituteType(delegateType).Type; 93private sealed class CLRSignatureComparer : IEqualityComparer<(TypeSymbol? constrainedToTypeOpt, TypeSymbol delegateType, MethodSymbol targetMethod)> 97public bool Equals((TypeSymbol? constrainedToTypeOpt, TypeSymbol delegateType, MethodSymbol targetMethod) x, (TypeSymbol? constrainedToTypeOpt, TypeSymbol delegateType, MethodSymbol targetMethod) y) 106public int GetHashCode((TypeSymbol? constrainedToTypeOpt, TypeSymbol delegateType, MethodSymbol targetMethod) conversion)
Lowering\LocalRewriter\DelegateCacheRewriter.cs (3)
177var delegateType = boundDelegateCreation.Type; 221private static void FindTypeParameters(TypeSymbol type, HashSet<TypeParameterSymbol> result) 234private static readonly Func<TypeSymbol, HashSet<TypeParameterSymbol>, bool, bool> s_typeParameterSymbolCollector = (typeSymbol, result, _) =>
Lowering\LocalRewriter\LocalRewriter.cs (13)
72Debug.Assert(TypeSymbol.Equals(factory.CurrentType, (containingType ?? containingMethod.ContainingType), TypeCompareKind.ConsiderEverything2)); 259TypeSymbol? type = node.Type; 581private static BoundExpression BadExpression(SyntaxNode syntax, TypeSymbol resultType, BoundExpression child) 586private static BoundExpression BadExpression(SyntaxNode syntax, TypeSymbol resultType, BoundExpression child1, BoundExpression child2) 591private static BoundExpression BadExpression(SyntaxNode syntax, TypeSymbol resultType, ImmutableArray<BoundExpression> children) 630TypeSymbol container = compilation.Assembly.GetSpecialType(type); 631TypeSymbol returnType = new ExtendedErrorTypeSymbol(compilation: compilation, name: descriptor.Name, errorInfo: null, arity: descriptor.Arity); 649TypeSymbol.Equals(node.Type, _compilation.GetWellKnownType(WellKnownType.System_Type), TypeCompareKind.AllIgnoreOptions)); 654var type = this.VisitType(node.Type); 675Debug.Assert(TypeSymbol.Equals(type, getTypeFromHandle.ReturnType, TypeCompareKind.AllIgnoreOptions)); 684var type = this.VisitType(node.Type); 831var indexType = VisitType(node.Indices[0].Type); 835if (TypeSymbol.Equals(
Lowering\LocalRewriter\LocalRewriter.DecisionDagRewriter.cs (3)
707public CasesComparer(TypeSymbol type) 948TypeSymbol returnType = _factory.SpecialType(SpecialType.System_UInt32); 949TypeSymbol paramType = stringPatternInput switch
Lowering\LocalRewriter\LocalRewriter.PatternLocalRewriter.cs (7)
202TypeSymbol inputType = input.Type; 211TypeSymbol type = t.Type; 248TypeSymbol type = e.Property.GetMethod.ReturnType; 377TypeSymbol objectType = _factory.SpecialType(SpecialType.System_Object); 398TypeSymbol comparisonType = input.Type.EnumUnderlyingTypeOrSelf(); 415TypeSymbol comparisonType = input.Type.EnumUnderlyingTypeOrSelf(); 493var baseType = typeEvaluation2.Type;
Lowering\LocalRewriter\LocalRewriter_AsOperator.cs (2)
20TypeSymbol rewrittenType = VisitType(node.Type); 39TypeSymbol rewrittenType)
Lowering\LocalRewriter\LocalRewriter_AssignmentOperator.cs (1)
395TypeSymbol? exprType = rewrittenRight.Type;
Lowering\LocalRewriter\LocalRewriter_Await.cs (1)
23private BoundExpression RewriteAwaitExpression(SyntaxNode syntax, BoundExpression rewrittenExpression, BoundAwaitableInfo awaitableInfo, TypeSymbol type, BoundAwaitExpressionDebugInfo debugInfo, bool used)
Lowering\LocalRewriter\LocalRewriter_BinaryOperator.cs (61)
73var type = node.Type; 186TypeSymbol type, 188TypeSymbol? constrainedToTypeOpt, 202TypeSymbol type, 204TypeSymbol? constrainedToTypeOpt, 545private BoundExpression RewriteLiftedBinaryOperator(SyntaxNode syntax, BinaryOperatorKind operatorKind, BoundExpression loweredLeft, BoundExpression loweredRight, TypeSymbol type, MethodSymbol? method, TypeSymbol? constrainedToTypeOpt) 609TypeSymbol? constrainedToTypeOpt, 610TypeSymbol type, 733private BoundExpression MakeTruthTestForDynamicLogicalOperator(SyntaxNode syntax, BinaryOperatorKind operatorKind, BoundExpression loweredLeft, TypeSymbol boolean, MethodSymbol? leftTruthOperator, TypeSymbol? constrainedToTypeOpt, bool negative) 770var parameterType = leftTruthOperator.Parameters[0].Type; 791TypeSymbol type, 793TypeSymbol? constrainedToTypeOpt) 804Debug.Assert(TypeSymbol.Equals(method.ReturnType, type, TypeCompareKind.ConsiderEverything2)); 820TypeSymbol? constrainedToTypeOpt) 831TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean); 1016TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean); 1150TypeSymbol? constrainedToTypeOpt) 1243TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean); 1317TypeSymbol type, 1319TypeSymbol? constrainedToTypeOpt) 1357TypeSymbol type, 1359TypeSymbol? constrainedToTypeOpt) 1382TypeSymbol type) 1426TypeSymbol type, 1428TypeSymbol? constrainedToTypeOpt) 1476TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean); 1528TypeSymbol type, 1530TypeSymbol? constrainedToTypeOpt) 1633Debug.Assert(TypeSymbol.Equals(seq.Type, conditional.Type, TypeCompareKind.ConsiderEverything2)); 1634Debug.Assert(TypeSymbol.Equals(conditional.Type, conditional.Consequence.Type, TypeCompareKind.ConsiderEverything2)); 1635Debug.Assert(TypeSymbol.Equals(conditional.Type, conditional.Alternative.Type, TypeCompareKind.ConsiderEverything2)); 1661TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean); 1853TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean); 1913private MethodSymbol UnsafeGetNullableMethod(SyntaxNode syntax, TypeSymbol nullableType, SpecialMember member) 1923internal static MethodSymbol UnsafeGetNullableMethod(SyntaxNode syntax, TypeSymbol nullableType, SpecialMember member, CSharpCompilation compilation, BindingDiagnosticBag diagnostics) 1930private bool TryGetNullableMethod(SyntaxNode syntax, TypeSymbol nullableType, SpecialMember member, out MethodSymbol result, bool isOptional = false) 1947TypeSymbol returnType) 2014private BoundExpression RewriteStringEquality(BoundBinaryOperator? oldNode, SyntaxNode syntax, BinaryOperatorKind operatorKind, BoundExpression loweredLeft, BoundExpression loweredRight, TypeSymbol type, SpecialMember member) 2027private BoundExpression RewriteDelegateOperation(SyntaxNode syntax, BinaryOperatorKind operatorKind, BoundExpression loweredLeft, BoundExpression loweredRight, TypeSymbol type, SpecialMember member) 2093TypeSymbol? exprType = rewrittenExpr.Type; 2102TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean); 2116TypeSymbol objectType = _compilation.GetSpecialType(SpecialType.System_Object); 2151TypeSymbol type, 2157TypeSymbol rightType = loweredRight.Type; 2213TypeSymbol type) 2224TypeSymbol leftType = loweredLeft.Type; 2229TypeSymbol rightType = loweredRight.Type; 2273TypeSymbol returnType, 2394TypeSymbol multiplicationResultType; 2395TypeSymbol convertedMultiplicationResultType; 2400TypeSymbol nativeIntType = _factory.SpecialType(SpecialType.System_IntPtr); 2414TypeSymbol longType = _factory.SpecialType(SpecialType.System_Int64); 2415TypeSymbol nativeIntType = _factory.SpecialType(SpecialType.System_IntPtr); 2427TypeSymbol longType = _factory.SpecialType(SpecialType.System_Int64); 2428TypeSymbol nativeIntType = _factory.SpecialType(SpecialType.System_IntPtr); 2439TypeSymbol ulongType = _factory.SpecialType(SpecialType.System_UInt64); 2440TypeSymbol nativeUIntType = _factory.SpecialType(SpecialType.System_UIntPtr); 2460return TypeSymbol.Equals(convertedMultiplicationResultType, multiplicationResultType, TypeCompareKind.ConsiderEverything2) 2469TypeSymbol returnType)
Lowering\LocalRewriter\LocalRewriter_Call.cs (4)
49Debug.Assert(node.ApplicableMethods.All(m => !m.RequiresInstanceReceiver && TypeSymbol.Equals(m.ContainingType, firstContainer, TypeCompareKind.ConsiderEverything2))); 995var receiverType = receiverTemp.Type; 1259internal static RefKind GetEffectiveRefKind(RefKind paramRefKind, RefKind initialArgRefKind, TypeSymbol paramType, bool comRefKindMismatchPossible) 1502private BoundExpression? CreateArrayEmptyCallIfAvailable(SyntaxNode syntax, TypeSymbol elementType)
Lowering\LocalRewriter\LocalRewriter_CollectionExpression.cs (17)
40var collectionTypeKind = conversion.GetCollectionExpressionTypeKind(out var elementType, out _, out _); 175private bool ShouldUseIEnumerableBulkAddMethod(TypeSymbol spreadType, TypeSymbol targetEnumerableType, MethodSymbol? getEnumeratorMethod) 225private BoundExpression VisitArrayOrSpanCollectionExpression(BoundCollectionExpression node, TypeSymbol collectionType) 352static void assertTypesAreCompatible(CSharpCompilation compilation, TypeSymbol arrayType, TypeSymbol constructorParameterType, bool isReadOnlySpan) 388private BoundExpression VisitCollectionInitializerCollectionExpression(BoundCollectionExpression node, TypeSymbol collectionType) 575internal static bool IsAllocatingRefStructCollectionExpression(BoundCollectionExpressionBase node, CollectionExpressionTypeKind collectionKind, TypeSymbol? elementType, CSharpCompilation compilation) 584internal static bool ShouldUseRuntimeHelpersCreateSpan(BoundCollectionExpressionBase node, TypeSymbol elementType) 734var spreadTypeOriginalDefinition = spreadExpression.Type!.OriginalDefinition; 759var spanType = CallAsSpanMethod(spreadExpression, asSpanMethod).Type!.OriginalDefinition; 768bool tryGetToArrayMethod(TypeSymbol spreadTypeOriginalDefinition, WellKnownType wellKnownType, WellKnownMember wellKnownMember, [NotNullWhen(true)] out MethodSymbol? toArrayMethod) 770if (TypeSymbol.Equals(spreadTypeOriginalDefinition, this._compilation.GetWellKnownType(wellKnownType), TypeCompareKind.AllIgnoreOptions)) 870var elementType = ((ArrayTypeSymbol)arrayTemp.Type).ElementType; 951private bool TryGetSpanConversion(TypeSymbol type, bool writableOnly, out MethodSymbol? asSpanMethod) 998var type = expression.Type; 1231var elementType = ((NamedTypeSymbol)spanTemp.Type).TypeArgumentsWithAnnotationsNoUseSiteDiagnostics[0].Type;
Lowering\LocalRewriter\LocalRewriter_CompoundAssignmentOperator.cs (9)
24Debug.Assert(TypeSymbol.Equals(node.Right.Type, node.Operator.RightType, TypeCompareKind.ConsiderEverything2)); 53TypeSymbol? leftType = node.Left.Type; // type of the target 55Debug.Assert(TypeSymbol.Equals(leftType, node.Type, TypeCompareKind.AllIgnoreOptions)); 228Debug.Assert(TypeSymbol.Equals(transformedLHS.Type, node.Left.Type, TypeCompareKind.AllIgnoreOptions)); 543if (TypeSymbol.Equals( 891private static bool IsInvariantArray(TypeSymbol? type) 964var type = expression.Type; 980var type = expression.Type; 1077private static bool ConstantValueIsTrivial(TypeSymbol? type)
Lowering\LocalRewriter\LocalRewriter_ConditionalAccess.cs (7)
45var receiverType = loweredReceiver.Type; 123TypeSymbol type = this.VisitType(node.Type); 125TypeSymbol nodeType = node.Type; 126TypeSymbol accessExpressionType = loweredAccessExpression.Type; 133if (!TypeSymbol.Equals(accessExpressionType, nodeType, TypeCompareKind.ConsiderEverything2) && nodeType.IsNullableType()) 135Debug.Assert(TypeSymbol.Equals(accessExpressionType, nodeType.GetNullableUnderlyingType(), TypeCompareKind.ConsiderEverything2)); 140Debug.Assert(TypeSymbol.Equals(accessExpressionType, nodeType, TypeCompareKind.ConsiderEverything2) ||
Lowering\LocalRewriter\LocalRewriter_ConditionalOperator.cs (1)
48TypeSymbol rewrittenType,
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (62)
69var rewrittenType = VisitType(node.Type); 81var toType = node.Type; 96var byteType = ((NamedTypeSymbol)node.Type).TypeArgumentsWithAnnotationsNoUseSiteDiagnostics.Single().Type; 225var type = rewrittenNode.Type; 268TypeSymbol rewrittenType) 303TypeSymbol rewrittenType) 618var sourceType = rewrittenOperand.Type; 738private void EnsureParamCollectionAttributeExists(SyntaxNode node, TypeSymbol delegateType) 751private static bool NeedsCheckedConversionInExpressionTree(TypeSymbol? source, TypeSymbol target, bool explicitCastInCode) 760SpecialType GetUnderlyingSpecialType(TypeSymbol type) => 789private BoundExpression MakeConversionNode(BoundExpression rewrittenOperand, TypeSymbol rewrittenType, bool @checked, bool acceptFailingConversion = false, bool markAsChecked = false) 809TypeSymbol rewrittenType, 842TypeSymbol rewrittenType, 876if (!TypeSymbol.Equals(rewrittenOperand.Type, conversion.BestUserDefinedConversionAnalysis.FromType, TypeCompareKind.ConsiderEverything2)) 886if (!TypeSymbol.Equals(rewrittenOperand.Type, conversion.Method.GetParameterType(0), TypeCompareKind.ConsiderEverything2)) 895TypeSymbol userDefinedConversionRewrittenType = conversion.Method.ReturnType; 915if (!TypeSymbol.Equals(userDefined.Type, conversion.BestUserDefinedConversionAnalysis.ToType, TypeCompareKind.ConsiderEverything2)) 924if (!TypeSymbol.Equals(userDefined.Type, rewrittenType, TypeCompareKind.ConsiderEverything2)) 1041TypeSymbol rewrittenType) 1050TypeSymbol? rewrittenOperandType = rewrittenOperand.Type; 1097TypeSymbol rewrittenType) 1101TypeSymbol rewrittenOperandType = rewrittenOperand.Type; 1106TypeSymbol typeFrom = rewrittenOperandType.StrippedType(); 1107TypeSymbol typeTo = rewrittenType.StrippedType(); 1108if (!TypeSymbol.Equals(typeFrom, typeTo, TypeCompareKind.ConsiderEverything2) && (typeFrom.SpecialType == SpecialType.System_Decimal || typeTo.SpecialType == SpecialType.System_Decimal)) 1111TypeSymbol typeFromUnderlying = typeFrom; 1112TypeSymbol typeToUnderlying = typeTo; 1148TypeSymbol type) 1209TypeSymbol type) 1242TypeSymbol type) 1282TypeSymbol type) 1313Debug.Assert(TypeSymbol.Equals(seq.Type, conditional.Type, TypeCompareKind.ConsiderEverything2)); 1314Debug.Assert(TypeSymbol.Equals(conditional.Type, conditional.Consequence.Type, TypeCompareKind.ConsiderEverything2)); 1315Debug.Assert(TypeSymbol.Equals(conditional.Type, conditional.Alternative.Type, TypeCompareKind.ConsiderEverything2)); 1344TypeSymbol rewrittenType) 1350var parameterType = conversion.Method.GetParameterType(0); 1377Debug.Assert(TypeSymbol.Equals(result.Type, rewrittenType, TypeCompareKind.ConsiderEverything2)); 1381private BoundExpression MakeLiftedUserDefinedConversionConsequence(BoundCall call, TypeSymbol resultType) 1385Debug.Assert(resultType.IsNullableType() && TypeSymbol.Equals(resultType.GetNullableUnderlyingType(), call.Method.ReturnType, TypeCompareKind.ConsiderEverything2)); 1398TypeSymbol rewrittenType) 1488TypeSymbol rewrittenType) 1495TypeSymbol source = rewrittenOperand.Type; 1496TypeSymbol target = rewrittenType; 1537public static SpecialMember GetIntPtrConversionMethod(TypeSymbol source, TypeSymbol target) 1542TypeSymbol t0 = target.StrippedType(); 1543TypeSymbol s0 = source.StrippedType(); 1653private static SpecialMember DecimalConversionMethod(TypeSymbol typeFrom, TypeSymbol typeTo) 1697private BoundExpression RewriteDecimalConversion(SyntaxNode syntax, BoundExpression operand, TypeSymbol fromType, TypeSymbol toType, bool @checked, bool isImplicit, ConstantValue? constantValueOpt) 1725static TypeSymbol get64BitType(CSharpCompilation compilation, bool signed) => compilation.GetSpecialType(signed ? SpecialType.System_Int64 : SpecialType.System_UInt64); 1728private BoundExpression RewriteDecimalConversionCore(SyntaxNode syntax, BoundExpression operand, TypeSymbol fromType, TypeSymbol toType, bool isImplicit, ConstantValue? constantValueOpt) 1746Debug.Assert(TypeSymbol.Equals(method.ReturnType, toType, TypeCompareKind.ConsiderEverything2)); 1754private Conversion TryMakeConversion(SyntaxNode syntax, Conversion conversion, TypeSymbol fromType, TypeSymbol toType, bool @checked) 1855private Conversion TryMakeConversion(SyntaxNode syntax, TypeSymbol fromType, TypeSymbol toType, bool @checked) 1866private Conversion TryMakeUserDefinedConversion(SyntaxNode syntax, MethodSymbol meth, TypeSymbol fromType, TypeSymbol toType, bool @checked, bool isImplicit)
Lowering\LocalRewriter\LocalRewriter_DeconstructionAssignmentOperator.cs (2)
58TypeSymbol leftType, 339var tupleType = expression.Type;
Lowering\LocalRewriter\LocalRewriter_Event.cs (2)
102TypeSymbol eventType = eventSymbol.Type; 225TypeSymbol type)
Lowering\LocalRewriter\LocalRewriter_Field.cs (3)
23TypeSymbol type, 72if (!TypeSymbol.Equals(underlyingField.ContainingType, currentLinkType, TypeCompareKind.ConsiderEverything2)) 91while (!TypeSymbol.Equals(underlyingField.ContainingType, currentLinkType, TypeCompareKind.ConsiderEverything2));
Lowering\LocalRewriter\LocalRewriter_FixedStatement.cs (8)
239TypeSymbol localType = localSymbol.Type; 247TypeSymbol initializerType = ((PointerTypeSymbol)initializerExpr.Type).PointedAtType; 306TypeSymbol localType = localSymbol.Type; 310var initializerType = initializerExpr.Type; 443TypeSymbol localType = localSymbol.Type; 445TypeSymbol? initializerType = initializerExpr.Type; 512TypeSymbol localType = localSymbol.Type; 514TypeSymbol? initializerType = initializerExpr.Type;
Lowering\LocalRewriter\LocalRewriter_ForEachStatement.cs (17)
43TypeSymbol? nodeExpressionType = collectionExpression.Type; 71private bool CanRewriteForEachAsFor(SyntaxNode forEachSyntax, TypeSymbol nodeExpressionType, [NotNullWhen(true)] out MethodSymbol? indexerGet, [NotNullWhen(true)] out MethodSymbol? lengthGet) 76internal static bool CanRewriteForEachAsFor(CSharpCompilation compilation, SyntaxNode forEachSyntax, TypeSymbol nodeExpressionType, [NotNullWhen(true)] out MethodSymbol? indexerGet, [NotNullWhen(true)] out MethodSymbol? lengthGet, BindingDiagnosticBag diagnostics) 79var origDefinition = nodeExpressionType.OriginalDefinition; 158TypeSymbol enumeratorType = getEnumeratorInfo.Method.ReturnType; 315TypeSymbol enumeratorType, 481TypeSymbol awaitExpressionType = disposeAwaitableInfoOpt.GetResult?.ReturnType ?? _compilation.DynamicType; 499private BoundExpression ConvertReceiverForInvocation(CSharpSyntaxNode syntax, BoundExpression receiver, MethodSymbol method, Conversion receiverConversion, TypeSymbol convertedReceiverType) 603TypeSymbol intType = _compilation.GetSpecialType(SpecialType.System_Int32); 604TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean); 775TypeSymbol inlineArrayType = boundArrayVar.Type; 904TypeSymbol intType = _compilation.GetSpecialType(SpecialType.System_Int32); 905TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean); 1054TypeSymbol intType = _compilation.GetSpecialType(SpecialType.System_Int32); 1055TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean); 1223private static BoundLocal MakeBoundLocal(CSharpSyntaxNode syntax, LocalSymbol local, TypeSymbol type) 1243private 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)
120TypeSymbol type = indexer.Type; 268if (TypeSymbol.Equals(node.Argument.Type, _compilation.GetWellKnownType(WellKnownType.System_Index), TypeCompareKind.AllIgnoreOptions)) 280Debug.Assert(TypeSymbol.Equals(node.Argument.Type, _compilation.GetWellKnownType(WellKnownType.System_Range), TypeCompareKind.AllIgnoreOptions)); 474if (TypeSymbol.Equals( 483Debug.Assert(TypeSymbol.Equals( 521Debug.Assert(TypeSymbol.Equals( 716Debug.Assert(TypeSymbol.Equals( 749Debug.Assert(TypeSymbol.Equals( 814Debug.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)); 128Debug.Assert(TypeSymbol.Equals(transformedLHS.Type, node.LeftOperand.Type, TypeCompareKind.AllIgnoreOptions));
Lowering\LocalRewriter\LocalRewriter_NullCoalescingOperator.cs (7)
17TypeSymbol? rewrittenResultType = VisitType(node.Type); 29TypeSymbol? rewrittenResultType) 235private BoundExpression GetConvertedLeftForNullCoalescingOperator(BoundExpression rewrittenLeft, BoundValuePlaceholder? leftPlaceholder, BoundExpression? leftConversion, TypeSymbol rewrittenResultType) 242TypeSymbol rewrittenLeftType = rewrittenLeft.Type; 252if (!TypeSymbol.Equals(rewrittenLeftType, rewrittenResultType, TypeCompareKind.ConsiderEverything2) 256TypeSymbol strippedLeftType = rewrittenLeftType.GetNullableUnderlyingType(); 259if (TypeSymbol.Equals(strippedLeftType, rewrittenResultType, TypeCompareKind.ConsiderEverything2))
Lowering\LocalRewriter\LocalRewriter_ObjectCreationExpression.cs (5)
81Debug.Assert(TypeSymbol.Equals(rewrittenObjectCreation.Type, ((NamedTypeSymbol)node.Type).ComImportCoClass, TypeCompareKind.ConsiderEverything2)); 114Debug.Assert(TypeSymbol.Equals(rewrittenObjectCreation.Type, ((NamedTypeSymbol)node.Type).ComImportCoClass, TypeCompareKind.ConsiderEverything2)); 133TypeSymbol type = withExpr.Type; 259TypeSymbol type) 341method = method.Construct(ImmutableArray.Create<TypeSymbol>(typeParameter));
Lowering\LocalRewriter\LocalRewriter_ObjectOrCollectionInitializerExpression.cs (7)
226var rewrittenType = VisitType(initializer.Type); 400Debug.Assert(assignment.Type.IsDynamic() || TypeSymbol.Equals(rewrittenAccess.Type, assignment.Type, TypeCompareKind.AllIgnoreOptions)); 454Debug.Assert(TypeSymbol.Equals(rangeArgument.Type, _compilation.GetWellKnownType(WellKnownType.System_Range), TypeCompareKind.ConsiderEverything)); 472Debug.Assert(TypeSymbol.Equals(rewrittenAccess.Type, assignment.Type, TypeCompareKind.AllIgnoreOptions)); 505Debug.Assert(TypeSymbol.Equals(rewrittenAccess.Type, assignment.Type, TypeCompareKind.AllIgnoreOptions)); 517if (TypeSymbol.Equals(implicitIndexer.Argument.Type, _compilation.GetWellKnownType(WellKnownType.System_Index), TypeCompareKind.ConsiderEverything)) 539Debug.Assert(TypeSymbol.Equals(rewrittenAccess.Type, assignment.Type, TypeCompareKind.AllIgnoreOptions));
Lowering\LocalRewriter\LocalRewriter_PropertyAccess.cs (1)
31TypeSymbol type,
Lowering\LocalRewriter\LocalRewriter_Range.cs (1)
143TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean);
Lowering\LocalRewriter\LocalRewriter_StackAlloc.cs (6)
28var type = stackAllocNode.Type; 37var elementType = stackAllocNode.ElementType; 50else if (TypeSymbol.Equals(type.OriginalDefinition, _compilation.GetWellKnownType(WellKnownType.System_Span_T), TypeCompareKind.ConsiderEverything2)) 97private BoundExpression RewriteStackAllocCountToSize(BoundExpression countExpression, TypeSymbol elementType) 109TypeSymbol uintType = _factory.SpecialType(SpecialType.System_UInt32); 110TypeSymbol uintPtrType = _factory.SpecialType(SpecialType.System_UIntPtr);
Lowering\LocalRewriter\LocalRewriter_StringConcat.cs (1)
107var argumentType = arg.Type;
Lowering\LocalRewriter\LocalRewriter_StringInterpolation.cs (2)
57TypeSymbol localType = trailingParameter.Type; 219private BoundExpression LowerPartsToString(InterpolatedStringHandlerData data, ImmutableArray<BoundExpression> parts, SyntaxNode syntax, TypeSymbol type)
Lowering\LocalRewriter\LocalRewriter_SwitchExpression.cs (1)
148bool implicitConversionExists(BoundExpression expression, TypeSymbol type)
Lowering\LocalRewriter\LocalRewriter_TryStatement.cs (1)
90TypeSymbol? rewrittenExceptionTypeOpt = this.VisitType(node.ExceptionTypeOpt);
Lowering\LocalRewriter\LocalRewriter_TupleBinaryOperator.cs (6)
30var boolType = node.Type; // we can re-use the bool type 69var elementType = resultTypes[i].Type; 246BoundExpression left, BoundExpression right, TypeSymbol boolType, 267TypeSymbol boolType, ArrayBuilder<LocalSymbol> temps, BinaryOperatorKind operatorKind) 485BoundExpression left, BoundExpression right, TypeSymbol type, 542BoundExpression left, BoundExpression right, TypeSymbol boolType, BinaryOperatorKind operatorKind)
Lowering\LocalRewriter\LocalRewriter_UnaryOperator.cs (27)
67TypeSymbol? constrainedToTypeOpt, 69TypeSymbol type) 79TypeSymbol? constrainedToTypeOpt, 81TypeSymbol type) 114Debug.Assert(TypeSymbol.Equals(type, method.ReturnType, TypeCompareKind.ConsiderEverything2)); 183TypeSymbol? constrainedToTypeOpt, 185TypeSymbol type) 247TypeSymbol? constrainedToTypeOpt, 249TypeSymbol type) 328Debug.Assert(TypeSymbol.Equals(seq.Type, conditional.Type, TypeCompareKind.ConsiderEverything2)); 329Debug.Assert(TypeSymbol.Equals(conditional.Type, conditional.Consequence.Type, TypeCompareKind.ConsiderEverything2)); 330Debug.Assert(TypeSymbol.Equals(conditional.Type, conditional.Alternative.Type, TypeCompareKind.ConsiderEverything2)); 354private BoundExpression GetLiftedUnaryOperatorConsequence(UnaryOperatorKind kind, SyntaxNode syntax, MethodSymbol? method, TypeSymbol? constrainedToTypeOpt, TypeSymbol type, BoundExpression nonNullOperand) 421TypeSymbol? operandType = node.Operand.Type; //type of the variable being incremented 423Debug.Assert(TypeSymbol.Equals(operandType, node.Type, TypeCompareKind.AllIgnoreOptions)); 458TypeSymbol? operandType = left.Type; //type of the variable being incremented 467Debug.Assert(TypeSymbol.Equals(operandType, transformedLHS.Type, TypeCompareKind.AllIgnoreOptions)); 586TypeSymbol? operandType = transformedLHS.Type; //type of the variable being incremented 588Debug.Assert(TypeSymbol.Equals(operandType, node.Type, TypeCompareKind.ConsiderEverything2)); 799TypeSymbol type = node.MethodOpt.GetParameterType(0); 803Debug.Assert(TypeSymbol.Equals(node.MethodOpt.GetParameterType(0), node.MethodOpt.ReturnType, TypeCompareKind.ConsiderEverything2)); 889TypeSymbol unaryOperandType = GetUnaryOperatorType(node); 898(TypeSymbol binaryOperandType, ConstantValue constantOne) = GetConstantOneForIncrement(_compilation, binaryOperatorKind); 1056private TypeSymbol GetUnaryOperatorType(BoundIncrementOperator node) 1177TypeSymbol? underlyingType = node.Type; 1243private static (TypeSymbol, ConstantValue) GetConstantOneForIncrement(
Lowering\LocalRewriter\LocalRewriter_UsingStatement.cs (5)
150TypeSymbol expressionType = rewrittenExpression.Type; 162TypeSymbol iDisposableType = node.AwaitOpt is null ? 218TypeSymbol localType = localSymbol.Type; 238TypeSymbol iDisposableType = awaitOpt is null ? 480TypeSymbol awaitExpressionType = awaitOpt.GetResult?.ReturnType ?? _compilation.DynamicType;
Lowering\LocalRewriter\LoweredDynamicOperation.cs (4)
24private readonly TypeSymbol _resultType; 29public LoweredDynamicOperation(SyntheticBoundNodeFactory? factory, BoundExpression? siteInitialization, BoundExpression siteInvocation, TypeSymbol resultType, ImmutableArray<LocalSymbol> temps) 42TypeSymbol resultType) 52public static LoweredDynamicOperation Bad(TypeSymbol resultType, ImmutableArray<BoundExpression> children)
Lowering\LocalRewriter\LoweredDynamicOperationFactory.cs (15)
78TypeSymbol resultType) 118TypeSymbol resultType) 156TypeSymbol resultType) 213TypeSymbol resultType; 272var resultType = AssemblySymbol.DynamicType; 305TypeSymbol resultType; 335TypeSymbol type, 606TypeSymbol resultType) 700return synthesizedContainer.Construct(synthesizedContainer.ConstructedFromTypeParameters.Cast<TypeParameterSymbol, TypeSymbol>()); 725TypeSymbol resultType) 830var argType = boundArgument.Type; 897private TypeSymbol[] MakeCallSiteDelegateSignature(TypeSymbol callSiteType, BoundExpression? receiver, ImmutableArray<BoundExpression> arguments, BoundExpression? right, TypeSymbol resultType) 900var result = new TypeSymbol[1 + (receiver != null ? 1 : 0) + arguments.Length + (right != null ? 1 : 0) + (resultType.IsVoidType() ? 0 : 1)];
Lowering\MethodToClassRewriter.cs (6)
101var rewrittenType = this.VisitType(node.Type); 287TypeSymbol rewrittenType = VisitType(node.Type); 330TypeSymbol type = this.VisitType(node.Type); 349TypeSymbol type = this.VisitType(node.Type); 356TypeSymbol type = this.VisitType(node.Type); 357TypeSymbol receiverType = this.VisitType(node.ReceiverType);
Lowering\SpillSequenceSpiller.cs (2)
734TypeSymbol? exceptionTypeOpt = this.VisitType(node.ExceptionTypeOpt); 1056var receiverType = receiver.Type;
Lowering\StateMachineRewriter\IteratorAndAsyncCaptureWalker.cs (1)
230var type = (variable.Kind == SymbolKind.Local) ? ((LocalSymbol)variable).Type : ((ParameterSymbol)variable).Type;
Lowering\StateMachineRewriter\MethodToStateMachineRewriter.cs (5)
70private Dictionary<TypeSymbol, ArrayBuilder<StateMachineFieldSymbol>>? _lazyAvailableReusableHoistedFields; 213Debug.Assert(TypeSymbol.Equals(frameClass, result.Type, TypeCompareKind.ConsiderEverything2)); 466private StateMachineFieldSymbol GetOrAllocateReusableHoistedField(TypeSymbol type, out bool reused, LocalSymbol? local = null) 503_lazyAvailableReusableHoistedFields = new Dictionary<TypeSymbol, ArrayBuilder<StateMachineFieldSymbol>>(Symbols.SymbolEqualityComparer.IgnoringDynamicTupleNamesAndNullability); 660static StateMachineFieldSymbol createHoistedSymbol(TypeSymbol type, MethodToStateMachineRewriter @this, LocalSymbol assignedLocal)
Lowering\StateMachineRewriter\RefInitializationHoister.cs (5)
44/// <param name="createHoistedSymbol">Factory that creates a new hoisted symbol for a sub-expression value of a given <see cref="TypeSymbol"/>.</param> 62Func<TypeSymbol, TArg, LocalSymbol, THoistedSymbol> createHoistedSymbol, 96var type = _typeMap.SubstituteType(local.Type).Type; 98Debug.Assert(TypeSymbol.Equals(type, replacement.Type, TypeCompareKind.ConsiderEverything2)); 141Func<TypeSymbol, TArg, LocalSymbol, THoistedSymbol> createHoistedSymbol,
Lowering\StateMachineRewriter\StateMachineFieldSymbol.cs (2)
38public StateMachineFieldSymbol(NamedTypeSymbol stateMachineType, TypeSymbol type, string name, SynthesizedLocalKind synthesizedKind, int slotIndex, bool isPublic) 43public StateMachineFieldSymbol(NamedTypeSymbol stateMachineType, TypeSymbol type, string name, LocalSlotDebugInfo slotDebugInfo, int slotIndex, bool isPublic) :
Lowering\StateMachineRewriter\StateMachineRewriter.cs (2)
63Debug.Assert(TypeSymbol.Equals(F.CurrentType, method.ContainingType, TypeCompareKind.ConsiderEverything2)); 185var fieldType = typeMap.SubstituteType(local.Type).Type;
Lowering\SynthesizedMethodBaseSymbol.cs (3)
104protected virtual ImmutableArray<TypeSymbol> ExtraSynthesizedRefParameters 106get { return default(ImmutableArray<TypeSymbol>); } 139foreach (var extra in extraSynthed)
Lowering\SynthesizedSubmissionFields.cs (1)
63var hostObjectTypeSymbol = _compilation.GetHostObjectTypeSymbol();
Lowering\SyntheticBoundNodeFactory.cs (51)
134Debug.Assert(TopLevelMethod is null || TypeSymbol.Equals(TopLevelMethod.ContainingType, CurrentType, TypeCompareKind.ConsiderEverything2)); 143TypeSymbol.Equals(CurrentFunction.ContainingType, CurrentType, TypeCompareKind.ConsiderEverything2)); 178public StateMachineFieldSymbol StateMachineField(TypeSymbol type, string name, bool isPublic = false, bool isThis = false) 186public StateMachineFieldSymbol StateMachineFieldForRegularParameter(TypeSymbol type, string name, ParameterSymbol parameter, bool isPublic) 194public StateMachineFieldSymbol StateMachineField(TypeSymbol type, string name, SynthesizedLocalKind synthesizedKind, int slotIndex) 202public StateMachineFieldSymbol StateMachineField(TypeSymbol type, string name, LocalSlotDebugInfo slotDebugInfo, int slotIndex) 239public BoundBadExpression BadExpression(TypeSymbol type) 595TypeSymbol type, 617TypeSymbol type, 637public ParameterSymbol SynthesizedParameter(TypeSymbol type, string name, MethodSymbol? container = null, int ordinal = 0) 642public BoundBinaryOperator Binary(BinaryOperatorKind kind, TypeSymbol type, BoundExpression left, BoundExpression right) 647public BoundAsOperator As(BoundExpression operand, TypeSymbol type) 652public BoundIsOperator Is(BoundExpression operand, TypeSymbol type) 739public BoundLiteral Literal(ConstantValue value, TypeSymbol type) 798public BoundExpression StaticCall(TypeSymbol receiver, MethodSymbol method, params BoundExpression[] args) 819public BoundExpression StaticCall(WellKnownMember method, ImmutableArray<TypeSymbol> typeArgs, params BoundExpression[] args) 912public BoundExpression Conditional(BoundExpression condition, BoundExpression consequence, BoundExpression alternative, TypeSymbol type, bool isRef = false) 920Debug.Assert(TypeSymbol.Equals(valueTypeReceiver.Type, referenceTypeReceiver.Type, TypeCompareKind.ConsiderEverything2)); 1035public BoundSequence Sequence(BoundExpression[] sideEffects, BoundExpression result, TypeSymbol? type = null) 1038var resultType = type ?? result.Type; 1230public BoundExpression ThrowExpression(BoundExpression thrown, TypeSymbol type) 1235public BoundExpression Null(TypeSymbol type) 1247public static BoundExpression Null(TypeSymbol type, SyntaxNode syntax) 1256public BoundTypeExpression Type(TypeSymbol type) 1261public BoundExpression Typeof(WellKnownType type, TypeSymbol systemType) 1266public BoundExpression Typeof(TypeSymbol type, TypeSymbol systemType) 1282Debug.Assert(TypeSymbol.Equals(systemType, getTypeFromHandle.ReturnType, TypeCompareKind.AllIgnoreOptions)); 1292public BoundExpression Typeof(TypeWithAnnotations type, TypeSymbol systemType) 1297public ImmutableArray<BoundExpression> TypeOfs(ImmutableArray<TypeWithAnnotations> typeArguments, TypeSymbol systemType) 1308public BoundExpression Sizeof(TypeSymbol type) 1382public BoundExpression InstrumentationPayloadRoot(int analysisKind, TypeSymbol payloadType) 1413public BoundExpression MethodInfo(MethodSymbol method, TypeSymbol systemReflectionMethodInfo) 1448private MethodSymbol GetMethodFromHandleMethod(NamedTypeSymbol methodContainer, TypeSymbol systemReflectionMethodOrConstructorInfo) 1480public BoundExpression Convert(TypeSymbol type, BoundExpression arg, bool allowBoxingByRefLikeTypeParametersToObject = false) 1484if (TypeSymbol.Equals(type, arg.Type, TypeCompareKind.ConsiderEverything2)) 1510public BoundExpression Convert(TypeSymbol type, BoundExpression arg, Conversion conversion, bool isChecked = false) 1514if (conversion.Method is { } && !TypeSymbol.Equals(conversion.Method.Parameters[0].Type, arg.Type, TypeCompareKind.ConsiderEverything2)) 1537public BoundExpression ArrayOrEmpty(TypeSymbol elementType, BoundExpression[] elements) 1549public BoundExpression ArrayOrEmpty(TypeSymbol elementType, ImmutableArray<BoundExpression> elements) 1564public BoundExpression Array(TypeSymbol elementType, ImmutableArray<BoundExpression> elements) 1573public BoundExpression Array(TypeSymbol elementType, BoundExpression length) 1583internal BoundExpression Default(TypeSymbol type) 1588internal static BoundExpression Default(TypeSymbol type, SyntaxNode syntax) 1628internal BoundExpression NullOrDefault(TypeSymbol typeSymbol) 1633internal static BoundExpression NullOrDefault(TypeSymbol typeSymbol, SyntaxNode syntax) 1694var type = argument.Type; 1764TypeSymbol exprType = rewrittenExpr.Type; 1773TypeSymbol boolType = Compilation.GetSpecialType(CodeAnalysis.SpecialType.System_Boolean); 1787TypeSymbol objectType = SpecialType(CodeAnalysis.SpecialType.System_Object); 1826TypeSymbol returnType)
Operations\CSharpOperationFactory.cs (11)
764return CreateBoundDynamicMemberAccessOperation(implicitReceiver, typeArgumentsOpt: ImmutableArray<TypeSymbol>.Empty, memberName: "Add", 951ImmutableArray<TypeSymbol> typeArgumentsOpt, 1082if (boundOperand.Kind == BoundKind.ConvertedTupleLiteral && TypeSymbol.Equals(boundOperand.Type, boundConversion.Type, TypeCompareKind.ConsiderEverything2)) 1103!TypeSymbol.Equals(nestedConversion.Type, nestedOperand.Type, TypeCompareKind.ConsiderEverything2)) 1374private static TypeParameterSymbol? GetConstrainedToTypeForOperator(MethodSymbol? operatorMethod, TypeSymbol? constrainedToTypeOpt) 1497TypeSymbol? constrainedToTypeOpt = GetConstrainedToTypeForOperator(boundBinaryOperator.LogicalOperator, boundBinaryOperator.ConstrainedToTypeOpt) ?? 2233TypeSymbol? naturalType = boundTupleExpression switch 2511TypeSymbol inputType = boundConstantPattern.InputType; 2512TypeSymbol narrowedType = boundConstantPattern.NarrowedType; 2522TypeSymbol inputType = boundRelationalPattern.InputType; 2523TypeSymbol 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)
161internal sealed override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol> basesBeingResolved) 265internal sealed override NamedTypeSymbol GetDeclaredBaseType(ConsList<TypeSymbol> basesBeingResolved) 270internal sealed override ImmutableArray<NamedTypeSymbol> GetDeclaredInterfaces(ConsList<TypeSymbol> basesBeingResolved) 282internal abstract override bool Equals(TypeSymbol t2, TypeCompareKind comparison); 305internal sealed override bool HasCollectionBuilderAttribute(out TypeSymbol? builderType, out string? methodName) 312internal sealed override bool HasAsyncMethodBuilderAttribute(out TypeSymbol? builderArgument)
Symbols\AnonymousTypes\PublicSymbols\AnonymousType.DelegatePublicSymbol.cs (1)
77internal override bool Equals(TypeSymbol t2, TypeCompareKind comparison)
Symbols\AnonymousTypes\PublicSymbols\AnonymousType.TypePublicSymbol.cs (1)
120internal override bool Equals(TypeSymbol t2, TypeCompareKind comparison)
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.DelegateTemplateSymbol.cs (5)
34TypeSymbol objectType, 35TypeSymbol intPtrType, 36TypeSymbol? voidReturnTypeOpt, 52static SynthesizedDelegateInvokeMethod createInvokeMethod(AnonymousDelegateTemplateSymbol containingType, RefKindVector refKinds, TypeSymbol? voidReturnTypeOpt) 241internal override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol>? basesBeingResolved = null) => ImmutableArray<NamedTypeSymbol>.Empty;
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.TemplateSymbol.cs (1)
138internal override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol> basesBeingResolved)
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.TypeOrDelegateTemplateSymbol.cs (4)
241internal sealed override NamedTypeSymbol GetDeclaredBaseType(ConsList<TypeSymbol> basesBeingResolved) 246internal sealed override ImmutableArray<NamedTypeSymbol> GetDeclaredInterfaces(ConsList<TypeSymbol> basesBeingResolved) 345internal sealed override bool HasCollectionBuilderAttribute(out TypeSymbol? builderType, out string? methodName) 352internal sealed override bool HasAsyncMethodBuilderAttribute(out TypeSymbol? builderArgument)
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.TypeParameterSymbol.cs (1)
142internal override TypeSymbol GetDeducedBaseType(ConsList<TypeParameterSymbol> inProgress)
Symbols\ArrayTypeSymbol.cs (10)
213public TypeSymbol ElementType 342internal override bool Equals(TypeSymbol? t2, TypeCompareKind comparison) 376TypeSymbol current = this; 392internal override bool ApplyNullableTransforms(byte defaultTransformFlag, ImmutableArray<byte> transforms, ref int position, out TypeSymbol result) 407internal override TypeSymbol SetNullabilityForReferenceTypes(Func<TypeWithAnnotations, TypeWithAnnotations> transform) 412internal override TypeSymbol MergeEquivalentTypes(TypeSymbol other, VarianceKind variance) 464internal override bool GetUnificationUseSiteDiagnosticRecursive(ref DiagnosticInfo result, Symbol owner, ref HashSet<TypeSymbol> checkedTypes) 549internal override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol>? basesBeingResolved = null) 596internal sealed override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol>? basesBeingResolved = null)
Symbols\AssemblySymbol.cs (7)
622internal static TypeSymbol DynamicType 756/// Resolves <see cref="System.Type"/> to a <see cref="TypeSymbol"/> available in this assembly 761internal TypeSymbol? GetTypeByReflectionType(Type type) 772TypeSymbol? symbol = GetTypeByReflectionType(typeInfo.GetElementType()!); 784TypeSymbol? symbol = GetTypeByReflectionType(typeInfo.GetElementType()!); 888var argSymbol = GetTypeByReflectionType(typeArguments[currentTypeArgument++]); 986Debug.Assert(!TypeSymbol.Equals(candidate, result, TypeCompareKind.ConsiderEverything));
Symbols\Attributes\AttributeData.cs (7)
250internal static void DecodeMemberNotNullAttribute<T>(TypeSymbol type, ref DecodeWellKnownAttributeArguments<AttributeSyntax, CSharpAttributeData, AttributeLocation> arguments) 286private static void ReportBadNotNullMemberIfNeeded(TypeSymbol type, DecodeWellKnownAttributeArguments<AttributeSyntax, CSharpAttributeData, AttributeLocation> arguments, string memberName) 300internal static void DecodeMemberNotNullWhenAttribute<T>(TypeSymbol type, ref DecodeWellKnownAttributeArguments<AttributeSyntax, CSharpAttributeData, AttributeLocation> arguments) 367var firstArgType = (TypeSymbol?)firstArg.TypeInternal; 642var builderType = (TypeSymbol?)CommonConstructorArguments[0].ValueInternal;
Symbols\Attributes\PEAttributeData.cs (1)
80TypeSymbol? attributeClass;
Symbols\Attributes\SourceAttributeData.cs (4)
240TypeSymbol? lazySystemType = null; 256bool matches(byte[] targetSignature, ImmutableArray<ParameterSymbol> parameters, ref TypeSymbol? lazySystemType) 282TypeSymbol parameterType = parameters[parameterIndex].Type; 440if (!TypeSymbol.Equals(parameterType, lazySystemType, TypeCompareKind.ConsiderEverything))
Symbols\Attributes\WellKnownAttributeData\TypeWellKnownEarlyAttributeData.cs (2)
13public CollectionBuilderAttributeData(TypeSymbol? builderType, string? methodName) 19public readonly TypeSymbol? BuilderType;
Symbols\BaseTypeAnalysis.cs (3)
117var fieldType = field?.NonPointerType(); 209TypeSymbol fieldType = field.NonPointerType(); 259internal static TypeSymbol NonPointerType(this FieldSymbol field) =>
Symbols\Compilation_WellKnownMembers.cs (49)
187TypeSymbol.Equals(result, _lazyWellKnownTypes[index], TypeCompareKind.ConsiderEverything2) || (_lazyWellKnownTypes[index]!.IsErrorType() && result.IsErrorType()) 201internal bool IsAttributeType(TypeSymbol type) 212internal bool IsExceptionType(TypeSymbol type, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 217internal bool IsReadOnlySpanType(TypeSymbol type) 219return TypeSymbol.Equals(type.OriginalDefinition, GetWellKnownType(WellKnownType.System_ReadOnlySpan_T), TypeCompareKind.ConsiderEverything2); 222internal bool IsEqualOrDerivedFromWellKnownClass(TypeSymbol type, WellKnownType wellKnownType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 238return TypeSymbol.Equals((TypeSymbol)type, GetWellKnownType(WellKnownType.System_Type), TypeCompareKind.ConsiderEverything2); 251internal static Symbol? GetRuntimeMember(NamedTypeSymbol declaringType, in MemberDescriptor descriptor, SignatureComparer<MethodSymbol, FieldSymbol, PropertySymbol, TypeSymbol, ParameterSymbol> comparer, AssemblySymbol? accessWithinOpt) 257internal static Symbol? GetRuntimeMember(ImmutableArray<Symbol> members, in MemberDescriptor descriptor, SignatureComparer<MethodSymbol, FieldSymbol, PropertySymbol, TypeSymbol, ParameterSymbol> comparer, AssemblySymbol? accessWithinOpt) 718TypeSymbol debuggableAttribute = GetWellKnownType(WellKnownType.System_Diagnostics_DebuggableAttribute); 725TypeSymbol debuggingModesType = GetWellKnownType(WellKnownType.System_Diagnostics_DebuggableAttribute__DebuggingModes); 793internal SynthesizedAttributeData? SynthesizeDynamicAttribute(TypeSymbol type, int customModifiersCount, RefKind refKindOpt = RefKind.None) 813internal SynthesizedAttributeData? SynthesizeTupleNamesAttribute(TypeSymbol type) 843public static ImmutableArray<string?> Encode(TypeSymbol type) 856public static ImmutableArray<TypedConstant> Encode(TypeSymbol type, TypeSymbol stringType) 872internal static bool TryGetNames(TypeSymbol type, ArrayBuilder<string?> namesBuilder) 878private static bool AddNames(TypeSymbol type, ArrayBuilder<string?> namesBuilder) 907internal static ImmutableArray<TypedConstant> Encode(TypeSymbol type, RefKind refKind, int customModifiersCount, TypeSymbol booleanType) 919internal static ImmutableArray<bool> Encode(TypeSymbol type, RefKind refKind, int customModifiersCount) 926internal static ImmutableArray<bool> EncodeWithoutCustomModifierFlags(TypeSymbol type, RefKind refKind) 933internal static void Encode(TypeSymbol type, int customModifiersCount, RefKind refKind, ArrayBuilder<bool> transformFlagsBuilder, bool addCustomModifierFlags) 955private static bool AddFlags(TypeSymbol type, ArrayBuilder<bool> transformFlagsBuilder, bool isNestedNamedType, bool addCustomModifierFlags) 1014Func<TypeSymbol, (ArrayBuilder<bool>, bool), bool, bool> visitor = 1015(TypeSymbol type, (ArrayBuilder<bool> builder, bool addCustomModifierFlags) param, bool isNestedNamedType) => AddFlags(type, param.builder, isNestedNamedType, param.addCustomModifierFlags); 1059internal static void Encode(ArrayBuilder<bool> builder, TypeSymbol type) 1065private static bool AddFlags(TypeSymbol type, ArrayBuilder<bool> builder) 1079internal class SpecialMembersSignatureComparer : SignatureComparer<MethodSymbol, FieldSymbol, PropertySymbol, TypeSymbol, ParameterSymbol> 1089protected override TypeSymbol? GetMDArrayElementType(TypeSymbol type) 1103protected override TypeSymbol GetFieldType(FieldSymbol field) 1108protected override TypeSymbol GetPropertyType(PropertySymbol property) 1113protected override TypeSymbol? GetGenericTypeArgument(TypeSymbol type, int argumentIndex) 1131protected override TypeSymbol? GetGenericTypeDefinition(TypeSymbol type) 1159protected override TypeSymbol GetParamType(ParameterSymbol parameter) 1164protected override TypeSymbol? GetPointedToType(TypeSymbol type) 1169protected override TypeSymbol GetReturnType(MethodSymbol method) 1174protected override TypeSymbol? GetSZArrayElementType(TypeSymbol type) 1203protected override bool IsGenericMethodTypeParam(TypeSymbol type, int paramPosition) 1217protected override bool IsGenericTypeParam(TypeSymbol type, int paramPosition) 1231protected override bool MatchArrayRank(TypeSymbol type, int countOfDimensions) 1242protected override bool MatchTypeToTypeId(TypeSymbol type, int typeId) 1267protected override bool MatchTypeToTypeId(TypeSymbol type, int typeId)
Symbols\ConstantValueUtils.cs (1)
81TypeSymbol typeSymbol,
Symbols\ConstraintsHelper.cs (20)
144TypeSymbol deducedBaseType = effectiveBaseClass; 164TypeSymbol constraintDeducedBase; 241var underlyingType = constraintType.Type.GetNullableUnderlyingType(); 469var deducedBase = bounds.DeducedBaseType; 489this TypeSymbol type, 502this TypeSymbol type, 519public static void CheckAllConstraints(this TypeSymbol type, CheckConstraintsArgsBoxed args) 585private static readonly Func<TypeSymbol, CheckConstraintsArgsBoxed, bool, bool> s_checkConstraintsSingleTypeFunc = (type, arg, unused) => CheckConstraintsSingleType(type, in arg.Args); 587private static bool CheckConstraintsSingleType(TypeSymbol type, in CheckConstraintsArgs args) 681ConsList<TypeSymbol> basesBeingResolved) 758private static bool HasDuplicateInterfaces(NamedTypeSymbol type, ConsList<TypeSymbol> basesBeingResolved) 1228var type = typeWithAnnotations.Type; 1271var type = typeWithAnnotations.Type; 1449private static TypeParameterDiagnosticInfo GenerateConflictingConstraintsError(TypeParameterSymbol typeParameter, TypeSymbol deducedBase, bool classConflict) 1479private static ConstructorConstraintError SatisfiesConstructorConstraint(TypeSymbol typeArgument) 1550private static bool IsEncompassedBy(ConversionsBase conversions, TypeSymbol a, TypeSymbol b, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1561private static bool IsValidEncompassedByArgument(TypeSymbol type) 1622private static void CheckEffectiveAndDeducedBaseTypes(ConversionsBase conversions, TypeSymbol effectiveBase, TypeSymbol deducedBase)
Symbols\ConstructedNamedTypeSymbol.cs (2)
30internal override bool GetUnificationUseSiteDiagnosticRecursive(ref DiagnosticInfo result, Symbol owner, ref HashSet<TypeSymbol> checkedTypes) 113internal sealed override bool GetUnificationUseSiteDiagnosticRecursive(ref DiagnosticInfo result, Symbol owner, ref HashSet<TypeSymbol> checkedTypes)
Symbols\CustomModifier.cs (2)
58internal static ImmutableArray<CustomModifier> Convert(ImmutableArray<ModifierInfo<TypeSymbol>> customModifiers) 67private static CustomModifier Convert(ModifierInfo<TypeSymbol> customModifier)
Symbols\DynamicTypeEraser.cs (5)
16private readonly TypeSymbol _objectType; 18public DynamicTypeEraser(TypeSymbol objectType) 24public TypeSymbol EraseDynamic(TypeSymbol type) 29protected override TypeSymbol SubstituteDynamicType()
Symbols\DynamicTypeSymbol.cs (7)
89internal override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol>? basesBeingResolved) 184internal override bool GetUnificationUseSiteDiagnosticRecursive(ref DiagnosticInfo result, Symbol owner, ref HashSet<TypeSymbol> checkedTypes) 196internal override bool Equals(TypeSymbol? t2, TypeCompareKind comparison) 221internal override bool ApplyNullableTransforms(byte defaultTransformFlag, ImmutableArray<byte> transforms, ref int position, out TypeSymbol result) 227internal override TypeSymbol SetNullabilityForReferenceTypes(Func<TypeWithAnnotations, TypeWithAnnotations> transform) 232internal 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) 294internal sealed override bool HasAsyncMethodBuilderAttribute(out TypeSymbol builderArgument)
Symbols\ErrorPropertySymbol.cs (1)
33public ErrorPropertySymbol(Symbol containingSymbol, TypeSymbol type, string name, bool isIndexer, bool isIndexedProperty)
Symbols\ErrorTypeSymbol.cs (6)
38/// Called by <see cref="AbstractTypeMap.SubstituteType(TypeSymbol)"/> to perform substitution 455internal override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol>? basesBeingResolved) 465internal override NamedTypeSymbol? GetDeclaredBaseType(ConsList<TypeSymbol> basesBeingResolved) 470internal override ImmutableArray<NamedTypeSymbol> GetDeclaredInterfaces(ConsList<TypeSymbol> basesBeingResolved) 582internal sealed override bool HasCollectionBuilderAttribute(out TypeSymbol? builderType, out string? methodName) 589internal 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)
59public TypeSymbol Type => TypeWithAnnotations.Type; 301HashSet<TypeSymbol>? unificationCheckedTypes = null; 351return TypeSymbol.Equals(this.ContainingType, other.ContainingType, compareKind) && ReferenceEquals(this.OriginalDefinition, other.OriginalDefinition);
Symbols\ExtendedErrorTypeSymbol.cs (10)
192internal override NamedTypeSymbol? GetDeclaredBaseType(ConsList<TypeSymbol> basesBeingResolved) 197internal override ImmutableArray<NamedTypeSymbol> GetDeclaredInterfaces(ConsList<TypeSymbol> basesBeingResolved) 222internal static TypeSymbol? ExtractNonErrorType(TypeSymbol? oldSymbol) 241TypeSymbol? type = oldError._candidateSymbols[0] as TypeSymbol; 250internal static TypeKind ExtractNonErrorTypeKind(TypeSymbol oldSymbol) 272TypeSymbol? type = sym as TypeSymbol; 286internal override bool Equals(TypeSymbol? t2, TypeCompareKind comparison)
Symbols\Extensions\RewrittenMethodSymbol.cs (1)
113internal sealed override bool HasAsyncMethodBuilderAttribute(out TypeSymbol? builderArgument)
Symbols\Extensions\SynthesizedExtensionMarker.cs (1)
90TypeSymbol parameterType = parameter.TypeWithAnnotations.Type;
Symbols\FieldSymbol.cs (2)
75public TypeSymbol Type => TypeWithAnnotations.Type; 366HashSet<TypeSymbol> unificationCheckedTypes = null;
Symbols\FunctionPointers\FunctionPointerMethodSymbol.cs (9)
23public static FunctionPointerMethodSymbol CreateFromSource(FunctionPointerTypeSyntax syntax, Binder typeBinder, BindingDiagnosticBag diagnostics, ConsList<TypeSymbol> basesBeingResolved, bool suppressUseSiteDiagnostics) 330public static FunctionPointerMethodSymbol CreateFromMetadata(ModuleSymbol containingModule, CallingConvention callingConvention, ImmutableArray<ParamInfo<TypeSymbol>> retAndParamTypes) 543private FunctionPointerMethodSymbol(CallingConvention callingConvention, ImmutableArray<ParamInfo<TypeSymbol>> retAndParamTypes, bool useUpdatedEscapeRules) 547ParamInfo<TypeSymbol> retInfo = retAndParamTypes[0]; 558static ImmutableArray<FunctionPointerParameterSymbol> makeParametersFromMetadata(ReadOnlySpan<ParamInfo<TypeSymbol>> parameterTypes, FunctionPointerMethodSymbol parent) 566ParamInfo<TypeSymbol> param = parameterTypes[i]; 581static RefKind getRefKind(ParamInfo<TypeSymbol> param, ImmutableArray<CustomModifier> paramRefCustomMods, RefKind hasInRefKind, RefKind hasOutRefKind, bool requiresLocationAllowed) 800internal bool GetUnificationUseSiteDiagnosticRecursive(ref DiagnosticInfo? result, Symbol owner, ref HashSet<TypeSymbol> checkedTypes) 864internal sealed override bool HasAsyncMethodBuilderAttribute(out TypeSymbol? builderArgument)
Symbols\FunctionPointers\FunctionPointerTypeSymbol.cs (9)
19public static FunctionPointerTypeSymbol CreateFromSource(FunctionPointerTypeSyntax syntax, Binder typeBinder, BindingDiagnosticBag diagnostics, ConsList<TypeSymbol> basesBeingResolved, bool suppressUseSiteDiagnostics) 56public static FunctionPointerTypeSymbol CreateFromMetadata(ModuleSymbol containingModule, Cci.CallingConvention callingConvention, ImmutableArray<ParamInfo<TypeSymbol>> retAndParamTypes) 98internal override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol>? basesBeingResolved = null) => ImmutableArray<NamedTypeSymbol>.Empty; 100internal override bool Equals(TypeSymbol t2, TypeCompareKind compareKind) 136internal override bool ApplyNullableTransforms(byte defaultTransformFlag, ImmutableArray<byte> transforms, ref int position, out TypeSymbol result) 156internal override bool GetUnificationUseSiteDiagnosticRecursive(ref DiagnosticInfo? result, Symbol owner, ref HashSet<TypeSymbol> checkedTypes) 161internal override TypeSymbol MergeEquivalentTypes(TypeSymbol other, VarianceKind variance) 173internal 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)
83public TypeSymbol Type => TypeWithAnnotations.Type;
Symbols\MemberSignatureComparer.cs (7)
646private static bool HaveSameTypeConstraints(TypeParameterSymbol typeParameter1, TypeMap? typeMap1, TypeParameterSymbol typeParameter2, TypeMap? typeMap2, IEqualityComparer<TypeSymbol> comparer) 663var substitutedTypes1 = new HashSet<TypeSymbol>(comparer); 664var substitutedTypes2 = new HashSet<TypeSymbol>(comparer); 693private static bool AreConstraintTypesSubset(HashSet<TypeSymbol> constraintTypes1, HashSet<TypeSymbol> constraintTypes2, TypeParameterSymbol typeParameter2) 695foreach (var constraintType in constraintTypes1) 723private static void SubstituteConstraintTypes(ImmutableArray<TypeWithAnnotations> types, TypeMap? typeMap, HashSet<TypeSymbol> result)
Symbols\MemberSymbolExtensions.cs (4)
248internal static Symbol? GetReducedAndFilteredSymbol(this Symbol member, ImmutableArray<TypeWithAnnotations> typeArguments, TypeSymbol receiverType, CSharpCompilation compilation, bool checkFullyInferred) 468return ((TypeSymbol)m).CustomModifierCount(); 580internal static ImmutableArray<TypeSymbol> GetMemberTypeArgumentsNoUseSiteDiagnostics(this Symbol symbol) 592return 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 (6)
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) 357var elementType = decoder.GetTypeSymbolForSerializedType(elementTypeName);
Symbols\Metadata\PE\PEMethodSymbol.cs (4)
808Debug.Assert(TypeSymbol.Equals(propertyOrEventSymbol.ContainingType, _containingType, TypeCompareKind.ConsiderEverything2)); 839ParamInfo<TypeSymbol>[] paramInfo = new MetadataDecoder(moduleSymbol, this).GetSignatureForMethod(_handle, out signatureHeader, out mrEx); 877var returnType = paramInfo[0].Type.AsDynamicIfNoPia(_containingType); 1768internal 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) 640if (!TypeSymbol.Equals(referencedAssemblyResult, currResult, TypeCompareKind.ConsiderEverything2))
Symbols\Metadata\PE\PENamedTypeSymbol.cs (14)
708internal override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol> basesBeingResolved = null) 723internal override NamedTypeSymbol GetDeclaredBaseType(ConsList<TypeSymbol> basesBeingResolved) 743TypeSymbol decodedType = DynamicTypeDecoder.TransformType(baseType, 0, _handle, moduleSymbol); 755internal override ImmutableArray<NamedTypeSymbol> GetDeclaredInterfaces(ConsList<TypeSymbol> basesBeingResolved) 802TypeSymbol typeSymbol = tokenDecoder.GetTypeOfToken(interfaceHandle); 1467FieldInfo<TypeSymbol> fieldInfo = decoder.DecodeFieldSignature(fieldDef); 1468TypeSymbol type = fieldInfo.Type; 2038TypeSymbol @base = GetDeclaredBaseType(skipTransformsIfNecessary: true); 2126private static ExtendedErrorTypeSymbol CyclicInheritanceError(TypeSymbol declaredBase) 2528TypeSymbol @base = GetDeclaredBaseType(null); 2777var type = this.ContainingPEModule.TryDecodeAttributeWithTypeArgument(this.Handle, AttributeDescription.CoClassAttribute); 2909internal sealed override bool HasCollectionBuilderAttribute(out TypeSymbol? builderType, out string? methodName) 2950internal override bool HasAsyncMethodBuilderAttribute(out TypeSymbol? builderArgument) 3015internal 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); 399ImmutableArray<ModifierInfo<TypeSymbol>> refCustomModifiers, 400TypeSymbol type, 403ImmutableArray<ModifierInfo<TypeSymbol>> customModifiers, 445ImmutableArray<ModifierInfo<TypeSymbol>> refCustomModifiers,
Symbols\Metadata\PE\PEPropertySymbol.cs (9)
227ParamInfo<TypeSymbol>[] propertyParams, 294TypeSymbol originalPropertyType = returnInfo.Type; 340static bool anyUnexpectedRequiredModifiers(ParamInfo<TypeSymbol>[] propertyParams) 839ParamInfo<TypeSymbol>[] propertyParams, 841ParamInfo<TypeSymbol>[] getMethodParams, 843ParamInfo<TypeSymbol>[] setMethodParams) 892ParamInfo<TypeSymbol>[] propertyParams, 893ParamInfo<TypeSymbol>[] accessorParams, 1088ParamInfo<TypeSymbol>[] propertyParams,
Symbols\Metadata\PE\PETypeParameterSymbol.cs (4)
268var typeSymbol = tokenDecoder.DecodeGenericParameterConstraint(constraint.Type, out ImmutableArray<ModifierInfo<TypeSymbol>> modifiers); 279ModifierInfo<TypeSymbol> m = modifiers.Single(); 634internal override TypeSymbol GetDeducedBaseType(ConsList<TypeParameterSymbol> inProgress)
Symbols\Metadata\PE\SymbolFactory.cs (26)
14internal sealed class SymbolFactory : SymbolFactory<PEModuleSymbol, TypeSymbol> 18internal override TypeSymbol GetMDArrayTypeSymbol(PEModuleSymbol moduleSymbol, int rank, TypeSymbol elementType, ImmutableArray<ModifierInfo<TypeSymbol>> customModifiers, 29internal override TypeSymbol GetSpecialType(PEModuleSymbol moduleSymbol, SpecialType specialType) 34internal override TypeSymbol GetSystemTypeSymbol(PEModuleSymbol moduleSymbol) 39internal override TypeSymbol MakePointerTypeSymbol(PEModuleSymbol moduleSymbol, TypeSymbol type, ImmutableArray<ModifierInfo<TypeSymbol>> customModifiers) 49internal override TypeSymbol MakeFunctionPointerTypeSymbol(PEModuleSymbol moduleSymbol, Cci.CallingConvention callingConvention, ImmutableArray<ParamInfo<TypeSymbol>> retAndParamTypes) 54internal override TypeSymbol GetEnumUnderlyingType(PEModuleSymbol moduleSymbol, TypeSymbol type) 59internal override Cci.PrimitiveTypeCode GetPrimitiveTypeCode(PEModuleSymbol moduleSymbol, TypeSymbol type) 64internal override TypeSymbol GetSZArrayTypeSymbol(PEModuleSymbol moduleSymbol, TypeSymbol elementType, ImmutableArray<ModifierInfo<TypeSymbol>> customModifiers) 74internal override TypeSymbol GetUnsupportedMetadataTypeSymbol(PEModuleSymbol moduleSymbol, BadImageFormatException exception) 79internal override TypeSymbol SubstituteTypeParameters( 81TypeSymbol genericTypeDef, 82ImmutableArray<KeyValuePair<TypeSymbol, ImmutableArray<ModifierInfo<TypeSymbol>>>> arguments, 161internal override TypeSymbol MakeUnboundIfGeneric(PEModuleSymbol moduleSymbol, TypeSymbol type) 167private static TypeWithAnnotations CreateType(TypeSymbol type, ImmutableArray<ModifierInfo<TypeSymbol>> customModifiers)
Symbols\Metadata\PE\TupleTypeDecoder.cs (14)
26/// <see cref="DecodeTupleTypesIfApplicable(TypeSymbol, EntityHandle, PEModuleSymbol)"/> 80public static TypeSymbol DecodeTupleTypesIfApplicable( 81TypeSymbol metadataType, 117TypeSymbol type = metadataType.Type; 118TypeSymbol decoded = DecodeTupleTypesInternal(type, elementNames, hasTupleElementNamesAttribute); 124public static TypeSymbol DecodeTupleTypesIfApplicable( 125TypeSymbol metadataType, 131private static TypeSymbol DecodeTupleTypesInternal(TypeSymbol metadataType, ImmutableArray<string?> elementNames, bool hasTupleElementNamesAttribute) 136var decoded = decoder.DecodeType(metadataType); 155private TypeSymbol DecodeType(TypeSymbol type) 342TypeSymbol type = typeWithAnnotations.Type; 343TypeSymbol decoded = DecodeType(type);
Symbols\MethodSymbol.cs (10)
144internal abstract bool HasAsyncMethodBuilderAttribute(out TypeSymbol builderArgument); 249public TypeSymbol ReturnType => ReturnTypeWithAnnotations.Type; 747public MethodSymbol? ReduceExtensionMethod(TypeSymbol receiverType, CSharpCompilation? compilation) 759public MethodSymbol? ReduceExtensionMethod(TypeSymbol receiverType, CSharpCompilation? compilation, out bool wasFullyInferred) 825public virtual TypeSymbol ReceiverType 851public MethodSymbol Construct(params TypeSymbol[] typeArguments) 862public MethodSymbol Construct(ImmutableArray<TypeSymbol> typeArguments) 916internal TypeSymbol GetParameterType(int index) => ParameterTypesWithAnnotations[index].Type; 980HashSet<TypeSymbol> unificationCheckedTypes = null; 1248return Construct((TypeSymbol[])typeArguments);
Symbols\MissingMetadataTypeSymbol.cs (2)
366internal override bool Equals(TypeSymbol t2, TypeCompareKind comparison) 455internal override bool Equals(TypeSymbol t2, TypeCompareKind comparison)
Symbols\MissingModuleSymbol.cs (1)
174internal override bool GetUnificationUseSiteDiagnostic(ref DiagnosticInfo result, TypeSymbol dependentType)
Symbols\ModuleSymbol.cs (1)
289internal abstract bool GetUnificationUseSiteDiagnostic(ref DiagnosticInfo result, TypeSymbol dependentType);
Symbols\NamedTypeSymbol.cs (19)
915internal abstract NamedTypeSymbol GetDeclaredBaseType(ConsList<TypeSymbol> basesBeingResolved); 917internal abstract ImmutableArray<NamedTypeSymbol> GetDeclaredInterfaces(ConsList<TypeSymbol> basesBeingResolved); 936internal override bool Equals(TypeSymbol t2, TypeCompareKind comparison) 1072internal override bool ApplyNullableTransforms(byte defaultTransformFlag, ImmutableArray<byte> transforms, ref int position, out TypeSymbol result) 1106internal override TypeSymbol SetNullabilityForReferenceTypes(Func<TypeWithAnnotations, TypeWithAnnotations> transform) 1140internal override TypeSymbol MergeEquivalentTypes(TypeSymbol other, VarianceKind variance) 1252public NamedTypeSymbol Construct(params TypeSymbol[] typeArguments) 1263public NamedTypeSymbol Construct(ImmutableArray<TypeSymbol> typeArguments) 1273public NamedTypeSymbol Construct(IEnumerable<TypeSymbol> typeArguments) 1302internal abstract bool HasAsyncMethodBuilderAttribute(out TypeSymbol builderArgument); 1315private NamedTypeSymbol ConstructWithoutModifiers(ImmutableArray<TypeSymbol> typeArguments, bool unbound) 1414internal void GetAllTypeArguments(ref TemporaryArray<TypeSymbol> builder, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1483protected sealed override TypeSymbol OriginalTypeSymbolDefinition 1563HashSet<TypeSymbol> unificationCheckedTypes = null; 1590internal override bool GetUnificationUseSiteDiagnosticRecursive(ref DiagnosticInfo result, Symbol owner, ref HashSet<TypeSymbol> checkedTypes) 1765internal abstract bool HasCollectionBuilderAttribute(out TypeSymbol? builderType, out string? methodName); 1769/// Requires less computation than <see cref="TypeSymbol.TypeKind"/> == <see cref="TypeKind.Interface"/>. 1803TypeSymbol typeToCheck = this;
Symbols\NamespaceSymbol.cs (1)
229var types = this.GetTypeMembers(TypeSymbol.ImplicitTypeName);
Symbols\NativeIntegerTypeSymbol.cs (8)
149internal override NamedTypeSymbol GetDeclaredBaseType(ConsList<TypeSymbol> basesBeingResolved) => _underlyingType.GetDeclaredBaseType(basesBeingResolved); 151internal override ImmutableArray<NamedTypeSymbol> GetDeclaredInterfaces(ConsList<TypeSymbol> basesBeingResolved) => GetInterfaces(basesBeingResolved); 161internal override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol>? basesBeingResolved = null) => GetInterfaces(basesBeingResolved); 190internal override bool Equals(TypeSymbol? other, TypeCompareKind comparison) 221private ImmutableArray<NamedTypeSymbol> GetInterfaces(ConsList<TypeSymbol>? basesBeingResolved) 290internal sealed override bool HasCollectionBuilderAttribute(out TypeSymbol? builderType, out string? methodName) 297internal sealed override bool HasAsyncMethodBuilderAttribute(out TypeSymbol? builderArgument) 418internal sealed override bool HasAsyncMethodBuilderAttribute(out TypeSymbol? builderArgument)
Symbols\NonMissingAssemblySymbol.cs (1)
225System.Diagnostics.Debug.Assert(TypeSymbol.Equals(result1, result, TypeCompareKind.ConsiderEverything2)); // object identity may differ in error cases
Symbols\NonMissingModuleSymbol.cs (1)
77internal override bool GetUnificationUseSiteDiagnostic(ref DiagnosticInfo result, TypeSymbol dependentType)
Symbols\NoPiaAmbiguousCanonicalTypeSymbol.cs (1)
92internal override bool Equals(TypeSymbol t2, TypeCompareKind comparison)
Symbols\NoPiaIllegalGenericInstantiationSymbol.cs (1)
78internal override bool Equals(TypeSymbol t2, TypeCompareKind comparison)
Symbols\NoPiaMissingCanonicalTypeSymbol.cs (1)
116internal override bool Equals(TypeSymbol t2, TypeCompareKind comparison)
Symbols\NullableAnnotationExtensions.cs (3)
91internal static NullabilityInfo ToNullabilityInfo(this CodeAnalysis.NullableAnnotation annotation, TypeSymbol type) 102internal static NullabilityInfo ToNullabilityInfo(this NullableAnnotation annotation, TypeSymbol type) 126internal static CodeAnalysis.NullableAnnotation ToPublicAnnotation(TypeSymbol? type, NullableAnnotation annotation)
Symbols\OverriddenOrHiddenMembersResult.cs (2)
66if (TypeSymbol.Equals(baseType.OriginalDefinition, overriddenByDefinitionContainingTypeDefinition, TypeCompareKind.ConsiderEverything2)) 68if (TypeSymbol.Equals(baseType, overriddenByDefinitionContaining, TypeCompareKind.ConsiderEverything2))
Symbols\ParameterSymbol.cs (1)
54public TypeSymbol Type => TypeWithAnnotations.Type;
Symbols\PlaceholderTypeArgumentSymbol.cs (2)
14/// <see cref="TypeSymbol.IsValueType"/> with minimal binding. 62internal override bool Equals(TypeSymbol t2, TypeCompareKind comparison)
Symbols\PointerTypeSymbol.cs (9)
77public TypeSymbol PointedAtType => PointedAtTypeWithAnnotations.Type; 88internal override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol>? basesBeingResolved) 219TypeSymbol current = this; 229internal override bool Equals(TypeSymbol? t2, TypeCompareKind comparison) 254internal override bool ApplyNullableTransforms(byte defaultTransformFlag, ImmutableArray<byte> transforms, ref int position, out TypeSymbol result) 269internal override TypeSymbol SetNullabilityForReferenceTypes(Func<TypeWithAnnotations, TypeWithAnnotations> transform) 274internal override TypeSymbol MergeEquivalentTypes(TypeSymbol other, VarianceKind variance) 295internal override bool GetUnificationUseSiteDiagnosticRecursive(ref DiagnosticInfo result, Symbol owner, ref HashSet<TypeSymbol> checkedTypes)
Symbols\PropertySymbol.cs (3)
91public TypeSymbol Type => TypeWithAnnotations.Type; 415HashSet<TypeSymbol> unificationCheckedTypes = null; 475return TypeSymbol.Equals(this.ContainingType, other.ContainingType, compareKind) && ReferenceEquals(this.OriginalDefinition, other.OriginalDefinition);
Symbols\PublicModel\ArrayTypeSymbol.cs (1)
32internal override Symbols.TypeSymbol UnderlyingTypeSymbol => _underlying;
Symbols\PublicModel\DynamicTypeSymbol.cs (1)
29internal override Symbols.TypeSymbol UnderlyingTypeSymbol => _underlying;
Symbols\PublicModel\ErrorTypeSymbol.cs (1)
31internal override Symbols.TypeSymbol UnderlyingTypeSymbol => _underlying;
Symbols\PublicModel\FunctionPointerTypeSymbol.cs (1)
22internal override Symbols.TypeSymbol UnderlyingTypeSymbol => _underlying;
Symbols\PublicModel\MethodSymbol.cs (1)
216var csharpReceiver = receiverType.EnsureCSharpSymbolOrNull(nameof(receiverType));
Symbols\PublicModel\NonErrorNamedTypeSymbol.cs (1)
32internal override Symbols.TypeSymbol UnderlyingTypeSymbol => _underlying;
Symbols\PublicModel\PointerTypeSymbol.cs (1)
32internal override Symbols.TypeSymbol UnderlyingTypeSymbol => _underlying;
Symbols\PublicModel\PropertySymbol.cs (1)
123var csharpReceiver = receiverType.EnsureCSharpSymbolOrNull(nameof(receiverType));
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)
25internal abstract Symbols.TypeSymbol UnderlyingTypeSymbol { get; }
Symbols\ReducedExtensionMethodSymbol.cs (4)
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 606internal sealed override bool HasAsyncMethodBuilderAttribute(out TypeSymbol builderArgument)
Symbols\Retargeting\RetargetingMethodSymbol.cs (1)
385internal sealed override bool HasAsyncMethodBuilderAttribute(out TypeSymbol builderArgument)
Symbols\Retargeting\RetargetingNamedTypeSymbol.cs (6)
306private static ExtendedErrorTypeSymbol CyclicInheritanceError(TypeSymbol declaredBase) 342internal override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol> basesBeingResolved) 367internal override NamedTypeSymbol GetDeclaredBaseType(ConsList<TypeSymbol> basesBeingResolved) 379internal override ImmutableArray<NamedTypeSymbol> GetDeclaredInterfaces(ConsList<TypeSymbol> basesBeingResolved) 457internal sealed override bool HasCollectionBuilderAttribute(out TypeSymbol? builderType, out string? methodName) 467internal 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)
124TypeSymbol.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)
28TypeSymbol discardedExplicitInterfaceType; 41out TypeSymbol explicitInterfaceTypeOpt, 63public static string GetMemberName(string name, TypeSymbol explicitInterfaceTypeOpt, string aliasQualifierOpt) 151TypeSymbol explicitInterfaceType, 161TypeSymbol explicitInterfaceType, 171TypeSymbol explicitInterfaceType, 182TypeSymbol explicitInterfaceType,
Symbols\Source\GlobalExpressionVariable.cs (2)
130var originalType = _lazyType?.Value.DefaultType; 137TypeSymbol.Equals(originalType, type.Type, TypeCompareKind.ConsiderEverything2));
Symbols\Source\ImplicitNamedTypeSymbol.cs (4)
66internal override NamedTypeSymbol GetDeclaredBaseType(ConsList<TypeSymbol> basesBeingResolved) 71internal override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol> basesBeingResolved) 76internal override ImmutableArray<NamedTypeSymbol> GetDeclaredInterfaces(ConsList<TypeSymbol> basesBeingResolved) 191internal sealed override bool HasCollectionBuilderAttribute(out TypeSymbol? builderType, out string? methodName)
Symbols\Source\IndexedTypeParameterSymbol.cs (2)
125internal override bool Equals(TypeSymbol t2, TypeCompareKind comparison) 227internal override TypeSymbol GetDeducedBaseType(ConsList<TypeParameterSymbol> inProgress)
Symbols\Source\LambdaSymbol.cs (3)
36internal static readonly TypeSymbol ReturnTypeIsBeingInferred = new UnsupportedMetadataTypeSymbol(); 41internal static readonly TypeSymbol InferenceFailureReturnType = new UnsupportedMetadataTypeSymbol(); 391&& TypeSymbol.Equals(lambda.ReturnType, this.ReturnType, compareKind)
Symbols\Source\LocalFunctionOrSourceMemberMethodSymbol.cs (1)
38Debug.Assert(TypeSymbol.Equals(_lazyIteratorElementType.Value.Type, elementType.Type, TypeCompareKind.ConsiderEverything));
Symbols\Source\ParameterHelpers.cs (2)
584static bool collectTypeParameters(TypeSymbol type, PooledHashSet<TypeParameterSymbol> typeParameters, bool ignored) 938TypeSymbol parameterType = parameter.Type;
Symbols\Source\SourceAssemblySymbol.cs (11)
109internal ConcurrentSet<TypeSymbol> TypesReferencedInExternalMethods = new ConcurrentSet<TypeSymbol>(); 651TypeSymbol compilationRelaxationsAttribute = compilation.GetWellKnownType(WellKnownType.System_Runtime_CompilerServices_CompilationRelaxationsAttribute); 660TypeSymbol runtimeCompatibilityAttribute = compilation.GetWellKnownType(WellKnownType.System_Runtime_CompilerServices_RuntimeCompatibilityAttribute); 693TypeSymbol unverifiableCodeAttribute = compilation.GetWellKnownType(WellKnownType.System_Security_UnverifiableCodeAttribute); 705TypeSymbol securityPermissionAttribute = compilation.GetWellKnownType(WellKnownType.System_Security_Permissions_SecurityPermissionAttribute); 712TypeSymbol securityAction = compilation.GetWellKnownType(WellKnownType.System_Security_Permissions_SecurityAction); 1237if (uniqueAttributes == null || !uniqueAttributes.Contains((a) => TypeSymbol.Equals(a.AttributeClass, attributeClass, TypeCompareKind.ConsiderEverything2))) 2208TypeSymbol forwardedType = (TypeSymbol)arguments.Attribute.CommonConstructorArguments[0].ValueInternal; 2781private static string DefaultValue(TypeSymbol type)
Symbols\Source\SourceComplexParameterSymbol.cs (6)
1044else if (!compilation.Conversions.ClassifyConversionFromType((TypeSymbol)arg.TypeInternal, this.Type, isChecked: false, ref useSiteInfo).Kind.IsImplicitConversion()) 1102TypeSymbol intType = compilation.GetSpecialType(SpecialType.System_Int32); 1130TypeSymbol stringType = compilation.GetSpecialType(SpecialType.System_String); 1163TypeSymbol stringType = compilation.GetSpecialType(SpecialType.System_String); 1204TypeSymbol stringType = compilation.GetSpecialType(SpecialType.System_String); 1620var elementType = elementTypeWithAnnotations.Type;
Symbols\Source\SourceCustomEventSymbol.cs (2)
23private readonly TypeSymbol _explicitInterfaceType; 230TypeSymbol.CheckModifierMismatchOnImplementingMember(this.ContainingType, this, explicitlyImplementedEvent, isExplicit: true, diagnostics);
Symbols\Source\SourceDelegateClonedParameterSymbolForBeginAndEndInvoke.cs (1)
29internal override ParameterSymbol WithCustomModifiersAndParams(TypeSymbol newType, ImmutableArray<CustomModifier> newCustomModifiers, ImmutableArray<CustomModifier> newRefCustomModifiers, bool newIsParams)
Symbols\Source\SourceEventAccessorSymbol.cs (3)
115TypeSymbol eventTokenType = compilation.GetWellKnownType(WellKnownType.System_Runtime_InteropServices_WindowsRuntime_EventRegistrationToken); 131TypeSymbol voidType = compilation.GetSpecialType(SpecialType.System_Void); 142TypeSymbol voidType = compilation.GetSpecialType(SpecialType.System_Void);
Symbols\Source\SourceEventSymbol.cs (1)
703TypeSymbol overriddenEventType = eventWithCustomModifiers.Type;
Symbols\Source\SourceFixedFieldSymbol.cs (3)
90TypeSymbol intType = binder.GetSpecialType(SpecialType.System_Int32, diagnostics, sizeExpression); 110TypeSymbol elementType = ((PointerTypeSymbol)this.Type).PointedAtType; 184var elementType = ((PointerTypeSymbol)_field.Type).PointedAtType;
Symbols\Source\SourceLocalSymbol.cs (1)
678var type = this.Type;
Symbols\Source\SourceMemberContainerSymbol.cs (11)
1091Debug.Assert(!nonTypeMembers.Any(static s => s is TypeSymbol)); 1463internal override bool HasAsyncMethodBuilderAttribute(out TypeSymbol? builderArgument) 1472internal static bool HasAsyncMethodBuilderAttribute(Symbol symbol, [NotNullWhen(true)] out TypeSymbol? builderArgument) 1485builderArgument = (TypeSymbol)attr.CommonConstructorArguments[0].ValueInternal!; 1966static bool needsTupleElementNamesAttribute(TypeSymbol type) 1973var resultType = type.VisitType( 2661var type = field.NonPointerType(); 2698if (member is TypeSymbol) 3013return (!TypeSymbol.Equals(oldInstance, t, TypeCompareKind.AllNullableIgnoreOptions)) && ReferenceEquals(tOriginal, top); 3262Debug.Assert(!nonTypeMembersWithPartialImplementations.Any(static s => s is TypeSymbol)); 4478var propertyParamType = (((i == numParams - 1) && !getNotSet) ? propertySymbol.TypeWithAnnotations : propertyParams[i].TypeWithAnnotations).Type;
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (6)
320if (synthesizedImplementation.ForwardingMethod is not null || TypeSymbol.Equals(implementingMember.ContainingType, this, TypeCompareKind.ConsiderEverything2)) 362if (TypeSymbol.Equals(iface, implementedInterface, TypeCompareKind.ConsiderEverything2)) 1195internal static bool IsOrContainsErrorType(TypeSymbol typeSymbol) 1350TypeSymbol sourceType, 1351TypeSymbol targetType) 1780TypeSymbol.Equals(interface1.OriginalDefinition, interface2.OriginalDefinition, TypeCompareKind.ConsiderEverything2) &&
Symbols\Source\SourceMemberFieldSymbol.cs (2)
48protected void TypeChecks(TypeSymbol type, BindingDiagnosticBag diagnostics) 584var elementType = ((PointerTypeSymbol)type.Type).PointedAtType;
Symbols\Source\SourceMethodSymbol.cs (1)
98internal override bool HasAsyncMethodBuilderAttribute(out TypeSymbol? builderArgument)
Symbols\Source\SourceMethodSymbolWithAttributes.cs (2)
1413static void checkAndReportManagedTypes(TypeSymbol type, RefKind refKind, SyntaxNode syntax, bool isParam, BindingDiagnosticBag diagnostics) 1615var returnType = methodSymbol.ReturnType;
Symbols\Source\SourceNamedTypeSymbol.cs (12)
63TypeSymbol bt = baseBinder.BindType(t, BindingDiagnosticBag.Discarded).Type; 65if (TypeSymbol.Equals(bt, @base, TypeCompareKind.ConsiderEverything2)) 1036TypeSymbol? builderType = attributeData.CommonConstructorArguments[0].ValueInternal as TypeSymbol; 1188var builderType = attribute.CommonConstructorArguments[0].ValueInternal as TypeSymbol; 1240internal static bool IsValidCollectionBuilderType([NotNullWhen(true)] TypeSymbol? builderType) 1375internal sealed override bool HasCollectionBuilderAttribute(out TypeSymbol? builderType, out string? methodName) 1809internal override bool Equals(TypeSymbol t2, TypeCompareKind comparison) 1932bool fieldSupported = TypeSymbol.IsInlineArrayElementFieldSupported(elementField); 1937TypeSymbol returnType = conversion.ReturnType; 1938TypeSymbol 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) 446private Tuple<NamedTypeSymbol, ImmutableArray<NamedTypeSymbol>> MakeOneDeclaredBases(ConsList<TypeSymbol> newBasesBeingResolved, SingleTypeDeclaration decl, BindingDiagnosticBag diagnostics) 475TypeSymbol baseType; 638void checkPrimaryConstructorBaseType(BaseTypeSyntax baseTypeSyntax, TypeSymbol baseType) 672private ImmutableArray<NamedTypeSymbol> MakeAcyclicInterfaces(ConsList<TypeSymbol> basesBeingResolved, BindingDiagnosticBag diagnostics)
Symbols\Source\SourceNamedTypeSymbol_Enum.cs (1)
62var type = baseBinder.BindType(typeSyntax, diagnostics).Type;
Symbols\Source\SourceNamedTypeSymbol_Extension.cs (6)
157static void AppendClrType(TypeSymbol type, ImmutableArray<CustomModifier> modifiers, StringBuilder builder) 193static void appendNamedType(TypeSymbol type, StringBuilder builder, NamedTypeSymbol namedType) 464static void appendType(TypeSymbol type, StringBuilder builder) 903AppendClrType((TypeSymbol)argument.ValueInternal, modifiers: [], builder); 1175internal static Symbol? ReduceExtensionMember(CSharpCompilation? compilation, Symbol extensionMember, TypeSymbol receiverType, out bool wasExtensionFullyInferred) 1215static NamedTypeSymbol? inferExtensionTypeArguments(NamedTypeSymbol extension, TypeSymbol receiverType, CSharpCompilation? compilation, out bool wasExtensionFullyInferred)
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)
33TypeSymbol explicitInterfaceType; 978protected sealed override TypeSymbol ExplicitInterfaceType 1009private readonly TypeSymbol _explicitInterfaceType; 1022TypeSymbol explicitInterfaceType, 1041protected 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)
135internal abstract ParameterSymbol WithCustomModifiersAndParams(TypeSymbol newType, ImmutableArray<CustomModifier> newCustomModifiers, ImmutableArray<CustomModifier> newRefCustomModifiers, bool newIsParams);
Symbols\Source\SourcePropertyClonedParameterSymbolForAccessors.cs (1)
25internal override ParameterSymbol WithCustomModifiersAndParams(TypeSymbol newType, ImmutableArray<CustomModifier> newCustomModifiers, ImmutableArray<CustomModifier> newRefCustomModifiers, bool newIsParams)
Symbols\Source\SourcePropertySymbol.cs (2)
76TypeSymbol? explicitInterfaceType; 107TypeSymbol? explicitInterfaceType,
Symbols\Source\SourcePropertySymbolBase.cs (5)
56private readonly TypeSymbol _explicitInterfaceType; 87TypeSymbol? explicitInterfaceType, 1037TypeSymbol.CheckModifierMismatchOnImplementingMember(this.ContainingType, this, explicitlyImplementedProperty, isExplicit: true, diagnostics); 1206else if (TypeSymbol.HaveInitOnlyMismatch(thisAccessor, otherAccessor)) 1876var type = this.Type;
Symbols\Source\SourceTypeParameterSymbol.cs (1)
111internal override TypeSymbol GetDeducedBaseType(ConsList<TypeParameterSymbol> inProgress)
Symbols\Source\SourceUserDefinedConversionSymbol.cs (2)
40TypeSymbol explicitInterfaceType; 57TypeSymbol explicitInterfaceType,
Symbols\Source\SourceUserDefinedOperatorSymbol.cs (2)
46TypeSymbol explicitInterfaceType; 63TypeSymbol explicitInterfaceType,
Symbols\Source\SourceUserDefinedOperatorSymbolBase.cs (16)
22private readonly TypeSymbol? _explicitInterfaceType; 27TypeSymbol explicitInterfaceType, 465protected sealed override TypeSymbol? ExplicitInterfaceType => _explicitInterfaceType; 635var source = this.GetParameterType(0); 636var target = this.ReturnType; 637var source0 = source.StrippedType(); 638var target0 = target.StrippedType(); 745TypeSymbol same; 746TypeSymbol different; 867var parameterType = this.GetParameterType(0); 893private bool MatchesContainingType(TypeSymbol type, bool checkStrippedType) 914internal static bool ExtensionOperatorParameterTypeMatchesExtendedType(TypeSymbol type, TypeSymbol extendedType) 919private bool IsContainingType(TypeSymbol type) 924public static bool IsSelfConstrainedTypeParameter(TypeSymbol type, NamedTypeSymbol containingType) 933private bool IsSelfConstrainedTypeParameter(TypeSymbol type)
Symbols\Source\SynthesizedSourceOrdinaryMethodSymbol.cs (1)
60protected sealed override TypeSymbol? ExplicitInterfaceType => null;
Symbols\Source\ThisParameterSymbol.cs (2)
137private readonly TypeSymbol _containingType; 143internal ThisParameterSymbol(MethodSymbol? forMethod, TypeSymbol containingType)
Symbols\Source\TypeParameterConstraintClause.cs (2)
173TypeSymbol type = constraintType.IsResolved ? constraintType.Type : constraintType.DefaultType; 233TypeSymbol type = constraintType.IsResolved ? constraintType.Type : constraintType.DefaultType;
Symbols\SubstitutedFieldSymbol.cs (1)
119return (object)other != null && TypeSymbol.Equals(_containingType, other.ContainingType, compareKind) && OriginalDefinition == other.OriginalDefinition;
Symbols\SubstitutedMethodSymbol.cs (4)
44Debug.Assert(TypeSymbol.Equals(originalDefinition.ContainingType, containingSymbol.OriginalDefinition, TypeCompareKind.ConsiderEverything2)); 159public override TypeSymbol ReceiverType 448if (!TypeSymbol.Equals(this.ContainingType, other.ContainingType, compareKind)) return false; 485internal sealed override bool HasAsyncMethodBuilderAttribute(out TypeSymbol builderArgument)
Symbols\SubstitutedNamedTypeSymbol.cs (6)
149internal sealed override NamedTypeSymbol GetDeclaredBaseType(ConsList<TypeSymbol> basesBeingResolved) 154internal sealed override ImmutableArray<NamedTypeSymbol> GetDeclaredInterfaces(ConsList<TypeSymbol> basesBeingResolved) 179internal sealed override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol> basesBeingResolved) 189internal abstract override bool GetUnificationUseSiteDiagnosticRecursive(ref DiagnosticInfo result, Symbol owner, ref HashSet<TypeSymbol> checkedTypes); 446internal sealed override bool HasCollectionBuilderAttribute(out TypeSymbol? builderType, out string? methodName) 451internal sealed override bool HasAsyncMethodBuilderAttribute(out TypeSymbol? builderArgument)
Symbols\SubstitutedTypeParameterSymbol.cs (1)
180internal override TypeSymbol GetDeducedBaseType(ConsList<TypeParameterSymbol> inProgress)
Symbols\Symbol.cs (7)
1208internal bool DeriveUseSiteInfoFromType(ref UseSiteInfo<AssemblySymbol> result, TypeSymbol type) 1340internal static bool GetUnificationUseSiteDiagnosticRecursive<T>(ref DiagnosticInfo result, ImmutableArray<T> types, Symbol owner, ref HashSet<TypeSymbol> checkedTypes) where T : TypeSymbol 1353internal static bool GetUnificationUseSiteDiagnosticRecursive(ref DiagnosticInfo result, ImmutableArray<TypeWithAnnotations> types, Symbol owner, ref HashSet<TypeSymbol> checkedTypes) 1366internal static bool GetUnificationUseSiteDiagnosticRecursive(ref DiagnosticInfo result, ImmutableArray<CustomModifier> modifiers, Symbol owner, ref HashSet<TypeSymbol> checkedTypes) 1379internal static bool GetUnificationUseSiteDiagnosticRecursive(ref DiagnosticInfo result, ImmutableArray<ParameterSymbol> parameters, Symbol owner, ref HashSet<TypeSymbol> checkedTypes) 1393internal static bool GetUnificationUseSiteDiagnosticRecursive(ref DiagnosticInfo result, ImmutableArray<TypeParameterSymbol> typeParameters, Symbol owner, ref HashSet<TypeSymbol> checkedTypes)
Symbols\Symbol_Attributes.cs (1)
481boundAttribute.CommonConstructorArguments[0].ValueInternal is TypeSymbol &&
Symbols\SymbolExtensions.cs (13)
87public static bool IsNoMoreVisibleThan(this Symbol symbol, TypeSymbol type, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 219public static bool IsContainingSymbolOfAllTypeParameters(this Symbol containingSymbol, TypeSymbol type) 228public static bool IsContainingSymbolOfAllTypeParameters(this Symbol containingSymbol, ImmutableArray<TypeSymbol> types) 233private static readonly Func<TypeSymbol, Symbol, bool, bool> s_hasInvalidTypeParameterFunc = 236private static bool HasInvalidTypeParameter(TypeSymbol type, Symbol? containingSymbol) 268Debug.Assert(!(symbol is TypeSymbol)); 407internal static TypeSymbol? EnsureCSharpSymbolOrNull(this ITypeSymbol? symbol, string paramName) 409return (TypeSymbol?)EnsureCSharpSymbolOrNull((ISymbol?)symbol, paramName); 517returnType = TypeWithAnnotations.Create((TypeSymbol)symbol); 580internal static ITypeSymbol? GetPublicSymbol(this TypeSymbol? symbol) 701internal static ImmutableArray<ITypeSymbol> GetPublicSymbols(this ImmutableArray<TypeSymbol> symbols) 765internal static TypeSymbol? GetSymbol(this ITypeSymbol? symbol) 767return symbol.GetSymbol<TypeSymbol>();
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)
227internal override NamedTypeSymbol GetDeclaredBaseType(ConsList<TypeSymbol> basesBeingResolved) => BaseTypeNoUseSiteDiagnostics; 229internal override ImmutableArray<NamedTypeSymbol> GetDeclaredInterfaces(ConsList<TypeSymbol> basesBeingResolved) => _interfaces; 247internal override bool HasCollectionBuilderAttribute(out TypeSymbol? builderType, out string? methodName) 260internal override bool HasAsyncMethodBuilderAttribute(out TypeSymbol? builderArgument) 268internal override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol>? basesBeingResolved = null) => _interfaces;
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListTypeParameterSymbol.cs (1)
61internal override TypeSymbol GetDeducedBaseType(ConsList<TypeParameterSymbol> inProgress) => ContainingAssembly.GetSpecialType(SpecialType.System_Object);
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListTypeSymbol.cs (7)
276TypeSymbol fieldType = kind switch 739TypeSymbol fieldType = fieldReference.Type; 909internal override NamedTypeSymbol GetDeclaredBaseType(ConsList<TypeSymbol> basesBeingResolved) => BaseTypeNoUseSiteDiagnostics; 911internal override ImmutableArray<NamedTypeSymbol> GetDeclaredInterfaces(ConsList<TypeSymbol> basesBeingResolved) => _interfaces; 935internal override bool HasCollectionBuilderAttribute(out TypeSymbol? builderType, out string? methodName) 948internal override bool HasAsyncMethodBuilderAttribute(out TypeSymbol? builderArgument) 956internal 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\SynthesizedRecordDeconstruct.cs (1)
66var type = positionalMember switch
Symbols\Synthesized\Records\SynthesizedRecordEquals.cs (1)
138var parameterType = f.Type;
Symbols\Synthesized\Records\SynthesizedRecordPropertySymbol.cs (1)
71private static bool ShouldUseInit(TypeSymbol container)
Symbols\Synthesized\SynthesizedAccessorValueParameterSymbol.cs (1)
139TypeSymbol 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)
164internal override NamedTypeSymbol GetDeclaredBaseType(ConsList<TypeSymbol> basesBeingResolved) => _baseType; 166internal override ImmutableArray<NamedTypeSymbol> GetDeclaredInterfaces(ConsList<TypeSymbol> basesBeingResolved) => ImmutableArray<NamedTypeSymbol>.Empty; 178internal override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol> basesBeingResolved = null) => ImmutableArray<NamedTypeSymbol>.Empty; 221internal sealed override bool HasCollectionBuilderAttribute(out TypeSymbol? builderType, out string? methodName) 228internal sealed override bool HasAsyncMethodBuilderAttribute(out TypeSymbol? builderArgument)
Symbols\Synthesized\SynthesizedEmbeddedExtensionMarkerNameAttributeSymbol.cs (1)
29TypeSymbol systemStringType)
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)
319internal sealed override bool HasAsyncMethodBuilderAttribute(out TypeSymbol builderArgument) 572internal SubmissionEntryPoint(NamedTypeSymbol containingType, TypeWithAnnotations returnType, TypeSymbol submissionArrayType) : 647Debug.Assert(TypeSymbol.Equals(initializeResult.Type, _returnType.Type, TypeCompareKind.ConsiderEverything2));
Symbols\Synthesized\SynthesizedFieldSymbol.cs (1)
25TypeSymbol type,
Symbols\Synthesized\SynthesizedFieldSymbolBase.cs (1)
54var type = typeWithAnnotations.Type;
Symbols\Synthesized\SynthesizedGlobalMethodSymbol.cs (4)
24private TypeSymbol _returnType; 38internal SynthesizedGlobalMethodSymbol(SynthesizedPrivateImplementationDetailsType privateImplType, TypeSymbol returnType, string name) 46protected void SetReturnType(TypeSymbol returnType) 361internal sealed override bool HasAsyncMethodBuilderAttribute(out TypeSymbol builderArgument)
Symbols\Synthesized\SynthesizedHotReloadExceptionConstructorSymbol.cs (2)
14internal SynthesizedHotReloadExceptionConstructorSymbol(NamedTypeSymbol containingType, TypeSymbol stringType, TypeSymbol intType) :
Symbols\Synthesized\SynthesizedHotReloadExceptionSymbol.cs (7)
41TypeSymbol stringType, 42TypeSymbol intType) 141internal override NamedTypeSymbol GetDeclaredBaseType(ConsList<TypeSymbol> basesBeingResolved) => _baseType; 142internal override ImmutableArray<NamedTypeSymbol> GetDeclaredInterfaces(ConsList<TypeSymbol> basesBeingResolved) => []; 147internal override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol>? basesBeingResolved = null) => []; 167internal sealed override bool HasCollectionBuilderAttribute(out TypeSymbol? builderType, out string? methodName) 174internal 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)
158internal override NamedTypeSymbol GetDeclaredBaseType(ConsList<TypeSymbol> basesBeingResolved) => BaseTypeNoUseSiteDiagnostics; 160internal override ImmutableArray<NamedTypeSymbol> GetDeclaredInterfaces(ConsList<TypeSymbol> basesBeingResolved) => ImmutableArray<NamedTypeSymbol>.Empty; 172internal override bool HasCollectionBuilderAttribute(out TypeSymbol? builderType, out string? methodName) 185internal sealed override bool HasAsyncMethodBuilderAttribute(out TypeSymbol? builderArgument) 193internal override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol>? basesBeingResolved = null) => ImmutableArray<NamedTypeSymbol>.Empty; 262internal override TypeSymbol GetDeducedBaseType(ConsList<TypeParameterSymbol> inProgress) => ContainingAssembly.GetSpecialType(SpecialType.System_Object);
Symbols\Synthesized\SynthesizedInteractiveInitializerMethod.cs (5)
22private readonly TypeSymbol _resultType; 23private readonly TypeSymbol _returnType; 238internal TypeSymbol ResultType 261out TypeSymbol resultType, 262out TypeSymbol returnType)
Symbols\Synthesized\SynthesizedIntrinsicOperatorSymbol.cs (12)
18private readonly TypeSymbol _containingType; 21private readonly TypeSymbol _returnType; 23public SynthesizedIntrinsicOperatorSymbol(TypeSymbol leftType, string name, TypeSymbol rightType, TypeSymbol returnType) 49public SynthesizedIntrinsicOperatorSymbol(TypeSymbol container, string name, TypeSymbol returnType) 442TypeSymbol.Equals(_containingType, other._containingType, compareKind) && 443TypeSymbol.Equals(_returnType, other._returnType, compareKind)) 447if (!TypeSymbol.Equals(_parameters[i].Type, other._parameters[i].Type, compareKind)) 468TypeSymbol type, 520internal sealed override bool HasAsyncMethodBuilderAttribute(out TypeSymbol builderArgument)
Symbols\Synthesized\SynthesizedLambdaCacheFieldSymbol.cs (1)
19public SynthesizedLambdaCacheFieldSymbol(NamedTypeSymbol containingType, TypeSymbol type, string name, MethodSymbol topLevelMethod, bool isReadOnly, bool isStatic)
Symbols\Synthesized\SynthesizedMethodSymbol.cs (1)
100internal sealed override bool HasAsyncMethodBuilderAttribute(out TypeSymbol builderArgument)
Symbols\Synthesized\SynthesizedParameterlessThrowMethod.cs (1)
17internal SynthesizedParameterlessThrowMethod(SynthesizedPrivateImplementationDetailsType privateImplType, TypeSymbol returnType, string synthesizedMethodName, MethodSymbol exceptionConstructor)
Symbols\Synthesized\SynthesizedPrivateImplementationDetailsType.cs (5)
150internal override NamedTypeSymbol GetDeclaredBaseType(ConsList<TypeSymbol> basesBeingResolved) => _objectType; 152internal override ImmutableArray<NamedTypeSymbol> GetDeclaredInterfaces(ConsList<TypeSymbol> basesBeingResolved) => ImmutableArray<NamedTypeSymbol>.Empty; 170internal override bool HasAsyncMethodBuilderAttribute(out TypeSymbol? builderArgument) 176internal override bool HasCollectionBuilderAttribute(out TypeSymbol? builderType, out string? methodName) 191internal 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)
440internal sealed override bool HasAsyncMethodBuilderAttribute(out TypeSymbol? builderArgument)
Symbols\Synthesized\SynthesizedStringHashFunctionSymbol.cs (4)
18internal SynthesizedStringSwitchHashMethod(SynthesizedPrivateImplementationDetailsType privateImplType, TypeSymbol returnType, TypeSymbol paramType) 27internal SynthesizedSpanSwitchHashMethod(SynthesizedPrivateImplementationDetailsType privateImplType, TypeSymbol returnType, TypeSymbol paramType, bool isReadOnlySpan)
Symbols\Synthesized\SynthesizedThrowSwitchExpressionExceptionMethod.cs (2)
16internal SynthesizedThrowSwitchExpressionExceptionMethod(SynthesizedPrivateImplementationDetailsType privateImplType, TypeSymbol returnType, TypeSymbol paramType)
Symbols\SynthesizedSimpleMethodTypeParameterSymbol.cs (1)
125internal override TypeSymbol GetDeducedBaseType(ConsList<TypeParameterSymbol> inProgress)
Symbols\Tuples\TupleErrorFieldSymbol.cs (1)
190TypeSymbol.Equals(ContainingType, other.ContainingType, compareKind);
Symbols\Tuples\TupleFieldSymbol.cs (1)
172TypeSymbol.Equals(_containingTuple, other._containingTuple, compareKind);
Symbols\Tuples\TupleTypeSymbol.cs (3)
277internal static void ReportTupleNamesMismatchesIfAny(TypeSymbol destination, BoundTupleLiteral literal, BindingDiagnosticBag diagnostics) 853private TypeSymbol MergeTupleNames(NamedTypeSymbol other, NamedTypeSymbol mergedType) 1112if (TypeSymbol.Equals(underlyingMemberDefinition.ContainingType, TupleUnderlyingType.OriginalDefinition, TypeCompareKind.ConsiderEverything))
Symbols\TypeMap.cs (3)
23public static readonly Func<TypeWithAnnotations, TypeSymbol> AsTypeSymbol = t => t.Type; 35internal static ImmutableArray<TypeSymbol> AsTypeSymbols(ImmutableArray<TypeWithAnnotations> typesOpt) 141Debug.Assert(TypeSymbol.Equals(oldOwner.ConstructedFrom, oldOwner, TypeCompareKind.ConsiderEverything2));
Symbols\TypeParameterBounds.cs (2)
27TypeSymbol deducedBaseType) 80public readonly TypeSymbol DeducedBaseType;
Symbols\TypeParameterSymbol.cs (17)
36protected sealed override TypeSymbol OriginalTypeSymbolDefinition 100((TypeSymbol)constraint.Type.OriginalDefinition).AddUseSiteInfo(ref useSiteInfo); 243internal sealed override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol> basesBeingResolved = null) 309internal TypeSymbol DeducedBaseTypeNoUseSiteDiagnostics 318internal TypeSymbol DeducedBaseType(ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 321var result = DeducedBaseTypeNoUseSiteDiagnostics; 325((TypeSymbol)result.OriginalDefinition).AddUseSiteInfo(ref useSiteInfo); 349var current = DeducedBaseType(ref useSiteInfo); 390internal abstract TypeSymbol GetDeducedBaseType(ConsList<TypeParameterSymbol> inProgress); 392private static bool ConstraintImpliesReferenceType(TypeSymbol constraint) 402internal static bool NonTypeParameterConstraintImpliesReferenceType(TypeSymbol constraint) 646internal sealed override bool GetUnificationUseSiteDiagnosticRecursive(ref DiagnosticInfo result, Symbol owner, ref HashSet<TypeSymbol> checkedTypes) 651internal override bool Equals(TypeSymbol t2, TypeCompareKind comparison) 686internal override bool ApplyNullableTransforms(byte defaultTransformFlag, ImmutableArray<byte> transforms, ref int position, out TypeSymbol result) 692internal override TypeSymbol SetNullabilityForReferenceTypes(Func<TypeWithAnnotations, TypeWithAnnotations> transform) 697internal 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)) 1054private static Symbol FindMostSpecificImplementationInInterfaces(Symbol interfaceMember, TypeSymbol implementingType, 1087static bool stopLookup(MethodSymbol interfaceAccessor, TypeSymbol implementingType) 1150TypeSymbol implementingType, 1463private static bool IsExplicitlyImplementedViaAccessors(bool checkPendingExplicitImplementations, Symbol interfaceMember, TypeSymbol currType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, out Symbol implementingMember) 1500private static bool TryGetExplicitImplementationAssociatedPropertyOrEvent(bool checkPendingExplicitImplementations, MethodSymbol interfaceAccessor, TypeSymbol currType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, out Symbol associated) 1544private static void CheckForImplementationOfCorrespondingPropertyOrEvent(MethodSymbol interfaceMethod, TypeSymbol implementingType, bool implementingTypeIsFromSomeCompilation, 1596else if ((object)correspondingImplementingAccessor != null && ((object)implicitImpl == null || TypeSymbol.Equals(correspondingImplementingAccessor.ContainingType, implicitImpl.ContainingType, TypeCompareKind.ConsiderEverything2))) 1627private static void ReportDefaultInterfaceImplementationMatchDiagnostics(Symbol interfaceMember, TypeSymbol implementingType, Symbol implicitImpl, BindingDiagnosticBag diagnostics) 1675private static void ReportImplicitImplementationMatchDiagnostics(Symbol interfaceMember, TypeSymbol implementingType, Symbol implicitImpl, BindingDiagnosticBag diagnostics) 1770internal static void CheckModifierMismatchOnImplementingMember(TypeSymbol implementingType, Symbol implementingMember, Symbol interfaceMember, bool isExplicit, BindingDiagnosticBag diagnostics) 1801TypeSymbol implementingType, 1807ReportMismatchInReturnType<(TypeSymbol implementingType, bool isExplicit)> reportMismatchInReturnType = 1830ReportMismatchInParameterType<(TypeSymbol implementingType, bool isExplicit)> reportMismatchInParameterType = 1987private static void ReportImplicitImplementationMismatchDiagnostics(Symbol interfaceMember, TypeSymbol implementingType, Symbol closestMismatch, BindingDiagnosticBag diagnostics) 2009TypeSymbol interfaceMemberReturnType; 2082private static Location GetInterfaceLocation(Symbol interfaceMember, TypeSymbol implementingType) 2096private static bool ReportAnyMismatchedConstraints(MethodSymbol interfaceMethod, TypeSymbol implementingType, MethodSymbol implicitImpl, BindingDiagnosticBag diagnostics) 2142internal static Location GetImplicitImplementationDiagnosticLocation(Symbol interfaceMember, TypeSymbol implementingType, Symbol member) 2144if (TypeSymbol.Equals(member.ContainingType, implementingType, TypeCompareKind.ConsiderEverything2)) 2174TypeSymbol currType, 2458public static bool Equals(TypeSymbol? left, TypeSymbol? right, TypeCompareKind comparison) 2470public static bool operator ==(TypeSymbol left, TypeSymbol right) 2474public static bool operator !=(TypeSymbol left, TypeSymbol right) 2478public static bool operator ==(Symbol left, TypeSymbol right) 2482public static bool operator !=(Symbol left, TypeSymbol right) 2486public static bool operator ==(TypeSymbol left, Symbol right) 2490public static bool operator !=(TypeSymbol left, Symbol right)
Symbols\TypeSymbolExtensions.cs (173)
27public static bool ImplementsInterface(this TypeSymbol subType, TypeSymbol superInterface, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 31if (@interface.IsInterface && TypeSymbol.Equals(@interface, superInterface, TypeCompareKind.ConsiderEverything2)) 39public static bool CanBeAssignedNull(this TypeSymbol type) 44public static bool CanContainNull(this TypeSymbol type) 50public static bool CanBeConst(this TypeSymbol typeSymbol) 70public static bool IsTypeParameterDisallowingAnnotationInCSharp8(this TypeSymbol type) 91public static bool IsPossiblyNullableReferenceTypeTypeParameter(this TypeSymbol type) 96public static bool IsNonNullableValueType(this TypeSymbol typeArgument) 106public static bool IsVoidType(this TypeSymbol type) 111public static bool IsNullableTypeOrTypeParameter(this TypeSymbol? type) 140public static bool IsNullableType(this TypeSymbol type) 145public static bool IsValidNullableTypeArgument(this TypeSymbol type) 153public static TypeSymbol GetNullableUnderlyingType(this TypeSymbol type) 158public static bool IsNullableType(this TypeSymbol? type, [NotNullWhen(true)] out TypeSymbol? underlyingType) 171public static TypeWithAnnotations GetNullableUnderlyingTypeWithAnnotations(this TypeSymbol type) 180public static TypeSymbol StrippedType(this TypeSymbol type) 185public static TypeSymbol EnumUnderlyingTypeOrSelf(this TypeSymbol type) 190public static bool IsNativeIntegerOrNullableThereof(this TypeSymbol? type) 195public static bool IsObjectType(this TypeSymbol type) 200public static bool IsStringType(this TypeSymbol type) 205public static bool IsCharType(this TypeSymbol type) 210public static bool IsIntegralType(this TypeSymbol type) 215public static NamedTypeSymbol? GetEnumUnderlyingType(this TypeSymbol? type) 220public static bool IsEnumType(this TypeSymbol type) 226public static bool IsValidEnumType(this TypeSymbol type) 239public static bool IsValidAttributeParameterType(this TypeSymbol type, CSharpCompilation compilation) 250public static TypedConstantKind GetAttributeParameterTypedConstantKind(this TypeSymbol type, CSharpCompilation compilation) 314public static bool IsValidExtensionParameterType(this TypeSymbol type) 327public static bool IsValidInOrRefReadonlyExtensionParameterType(this TypeSymbol type) 332public static bool IsInterfaceType(this TypeSymbol type) 338public static bool IsClassType(this TypeSymbol type) 344public static bool IsStructType(this TypeSymbol type) 350public static bool IsErrorType(this TypeSymbol type) 361public static bool IsDynamic(this TypeSymbol type) 366public static bool IsTypeParameter(this TypeSymbol type) 372public static bool IsArray(this TypeSymbol type) 378public static bool IsSZArray(this TypeSymbol type) 384internal static bool IsArrayInterface(this TypeSymbol type, out TypeWithAnnotations typeArgument) 404public static bool IsFunctionPointer(this TypeSymbol type) 409public static bool IsPointerOrFunctionPointer(this TypeSymbol type) 422internal static ImmutableArray<NamedTypeSymbol> GetAllInterfacesOrEffectiveInterfaces(this TypeSymbol type) 443public static NamedTypeSymbol? GetDelegateType(this TypeSymbol? type) 454public static TypeSymbol? GetDelegateOrFunctionPointerType(this TypeSymbol? type) 456return (TypeSymbol?)GetDelegateType(type) ?? type as FunctionPointerTypeSymbol; 463public static bool IsExpressionTree(this TypeSymbol type) 472public static bool IsNonGenericExpressionType(this TypeSymbol type) 482public static bool IsGenericOrNonGenericExpressionType(this TypeSymbol _type, out bool isGenericType) 522public static bool IsPossibleArrayGenericInterface(this TypeSymbol type) 545internal static bool IsErrorOrRefLikeOrAllowsRefLikeType(this TypeSymbol type) 550internal static bool IsRefLikeOrAllowsRefLikeType(this TypeSymbol type) 573public static bool IsDelegateType(this TypeSymbol type) 579public static ImmutableArray<ParameterSymbol> DelegateParameters(this TypeSymbol type) 589public static ImmutableArray<ParameterSymbol> DelegateOrFunctionPointerParameters(this TypeSymbol type) 602public static bool TryGetElementTypesWithAnnotationsIfTupleType(this TypeSymbol type, out ImmutableArray<TypeWithAnnotations> elementTypes) 615public static MethodSymbol? DelegateInvokeMethod(this TypeSymbol type) 626public static ConstantValue? GetDefaultValue(this TypeSymbol type) 674public static SpecialType GetSpecialTypeSafe(this TypeSymbol? type) 679public static bool IsAtLeastAsVisibleAs(this TypeSymbol type, Symbol sym, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 684public static TypeSymbol? FindTypeLessVisibleThan(this TypeSymbol type, Symbol sym, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 693var result = type.VisitType(static (type1, arg, unused) => IsTypeLessVisibleThan(type1, arg.Symbol!, ref arg.UseSiteInfo), 708private static bool IsTypeLessVisibleThan(TypeSymbol type, Symbol sym, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 732public static TypeSymbol? VisitType<T>( 733this TypeSymbol type, 734Func<TypeSymbol, T, bool, bool> predicate, 760public static TypeSymbol? VisitType<T>( 762TypeSymbol? type, 764Func<TypeSymbol, T, bool, bool>? typePredicate, 781TypeSymbol current = type ?? (useDefaultType ? typeWithAnnotationsOpt.DefaultType : typeWithAnnotationsOpt.Type); 797var result = VisitType(default, containingType, typeWithAnnotationsPredicate, typePredicate, arg, canDigThroughNullable, useDefaultType, visitCustomModifiers); 830var result = VisitType( 881(TypeWithAnnotations nextTypeWithAnnotations, TypeSymbol? nextType) = getNextIterationElements(fields[i].TypeWithAnnotations, canDigThroughNullable); 882var result = VisitType( 912(TypeWithAnnotations nextTypeWithAnnotations, TypeSymbol? nextType) = getNextIterationElements(typeArguments[i], canDigThroughNullable); 913var result = VisitType( 943var result = visitFunctionPointerType((FunctionPointerTypeSymbol)current, typeWithAnnotationsPredicate, typePredicate, arg, useDefaultType, canDigThroughNullable, visitCustomModifiers, out next); 961static (TypeWithAnnotations, TypeSymbol?) getNextIterationElements(TypeWithAnnotations type, bool canDigThroughNullable) 964static 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) 973var result = VisitType( 991(TypeWithAnnotations nextTypeWithAnnotations, TypeSymbol? nextType) = getNextIterationElements(currentPointer.Parameters[i].TypeWithAnnotations, canDigThroughNullable); 1193public static bool IsUnboundGenericType(this TypeSymbol type) 1209public static bool ContainsTypeParameter(this TypeSymbol type, TypeParameterSymbol? parameter = null) 1211var result = type.VisitType(s_containsTypeParameterPredicate, parameter); 1215private static readonly Func<TypeSymbol, TypeParameterSymbol?, bool, bool> s_containsTypeParameterPredicate = 1216(type, parameter, unused) => type.TypeKind == TypeKind.TypeParameter && (parameter is null || TypeSymbol.Equals(type, parameter, TypeCompareKind.ConsiderEverything2)); 1218public static bool ContainsTypeParameter(this TypeSymbol type, Symbol typeParameterContainer) 1222var result = type.VisitType(s_isTypeParameterWithSpecificContainerPredicate, typeParameterContainer); 1226private static readonly Func<TypeSymbol, Symbol, bool, bool> s_isTypeParameterWithSpecificContainerPredicate = 1229public static bool ContainsTypeParameters(this TypeSymbol type, HashSet<TypeParameterSymbol> parameters) 1231var result = type.VisitType(s_containsTypeParametersPredicate, parameters); 1235private static readonly Func<TypeSymbol, HashSet<TypeParameterSymbol>, bool, bool> s_containsTypeParametersPredicate = 1238public static bool ContainsMethodTypeParameter(this TypeSymbol type) 1240var result = type.VisitType(s_containsMethodTypeParameterPredicate, null); 1244private static readonly Func<TypeSymbol, object?, bool, bool> s_containsMethodTypeParameterPredicate = 1250public static bool ContainsDynamic(this TypeSymbol type) 1252var result = type.VisitType(s_containsDynamicPredicate, null, canDigThroughNullable: true); 1256private static readonly Func<TypeSymbol, object?, bool, bool> s_containsDynamicPredicate = (type, unused1, unused2) => type.TypeKind == TypeKind.Dynamic; 1258internal static bool ContainsNativeIntegerWrapperType(this TypeSymbol type) 1260var result = type.VisitType((type, unused1, unused2) => type.IsNativeIntegerWrapperType, (object?)null, canDigThroughNullable: true); 1269internal static bool ContainsErrorType(this TypeSymbol type) 1271var result = type.VisitType((type, unused1, unused2) => type.IsErrorType(), (object?)null, canDigThroughNullable: true); 1278internal static bool ContainsTuple(this TypeSymbol type) => 1279type.VisitType((TypeSymbol t, object? _1, bool _2) => t.IsTupleType, null) is object; 1284internal static bool ContainsTupleNames(this TypeSymbol type) => 1285type.VisitType((TypeSymbol t, object? _1, bool _2) => !t.TupleElementNames.IsDefault, null) is object; 1290internal static bool ContainsFunctionPointer(this TypeSymbol type) => 1291type.VisitType((TypeSymbol t, object? _, bool _) => t.IsFunctionPointer(), null) is object; 1293internal static bool ContainsPointerOrFunctionPointer(this TypeSymbol type) => 1294type.VisitType((TypeSymbol t, object? _, bool _) => t.TypeKind is TypeKind.Pointer or TypeKind.FunctionPointer, null) is object; 1311internal static TypeSymbol? GetNonErrorGuess(this TypeSymbol type) 1313var result = ExtendedErrorTypeSymbol.ExtractNonErrorType(type); 1322internal static TypeKind GetNonErrorTypeKindGuess(this TypeSymbol type) 1332internal static bool IsValidV6SwitchGoverningType(this TypeSymbol type, bool isTargetTypeOfUserDefinedOp = false) 1377internal static bool IsSpan(this TypeSymbol type) 1390internal static bool IsReadOnlySpan(this TypeSymbol type) 1403internal static bool IsSpanChar(this TypeSymbol type) 1414internal static bool IsReadOnlySpanChar(this TypeSymbol type) 1425internal static bool IsSpanOrReadOnlySpanChar(this TypeSymbol type) 1443internal static bool IsRestrictedType(this TypeSymbol type, 1459public static bool IsIntrinsicType(this TypeSymbol type) 1486public static bool IsPartial(this TypeSymbol type) 1491public static bool HasFileLocalTypes(this TypeSymbol type) 1493var foundType = type.VisitType(predicate: (type, _, _) => type is NamedTypeSymbol { IsFileLocal: true }, arg: (object?)null); 1506public static bool IsPointerType(this TypeSymbol type) 1511internal static int FixedBufferElementSizeInBytes(this TypeSymbol type) 1517internal static bool IsValidVolatileFieldType(this TypeSymbol type) 1551public static bool MarkCheckedIfNecessary(this TypeSymbol type, ref HashSet<TypeSymbol> checkedTypes) 1555checkedTypes = new HashSet<TypeSymbol>(); 1561internal static bool IsVoidPointer(this TypeSymbol type) 1570internal static bool IsPrimitiveRecursiveStruct(this TypeSymbol t) 1654public static TypeSymbol AsDynamicIfNoPia(this TypeSymbol type, NamedTypeSymbol containingType) 1656return type.TryAsDynamicIfNoPia(containingType, out TypeSymbol? result) ? result : type; 1659public static bool TryAsDynamicIfNoPia(this TypeSymbol type, NamedTypeSymbol containingType, [NotNullWhen(true)] out TypeSymbol? result) 1679internal static bool IsVerifierReference(this TypeSymbol type) 1687internal static bool IsVerifierValue(this TypeSymbol type) 1839internal static bool IsNonGenericTaskType(this TypeSymbol type, CSharpCompilation compilation) 1857internal static bool IsGenericTaskType(this TypeSymbol type, CSharpCompilation compilation) 1870internal static bool IsIAsyncEnumerableType(this TypeSymbol type, CSharpCompilation compilation) 1880internal static bool IsIAsyncEnumeratorType(this TypeSymbol type, CSharpCompilation compilation) 1900internal static bool IsCustomTaskType(this NamedTypeSymbol type, [NotNullWhen(true)] out TypeSymbol? builderArgument) 1917internal static TypeSymbol NormalizeTaskTypes(this TypeSymbol type, CSharpCompilation compilation) 1926private static bool NormalizeTaskTypesInType(CSharpCompilation compilation, ref TypeSymbol type) 1965var type = typeWithAnnotations.Type; 1987var typeArgNormalized = typeWithModifier.Type; 2130internal static bool IsWellKnownTypeInAttribute(this TypeSymbol typeSymbol) 2133internal static bool IsWellKnownTypeRequiresLocationAttribute(this TypeSymbol typeSymbol) 2136internal static bool IsWellKnownTypeUnmanagedType(this TypeSymbol typeSymbol) 2139internal static bool IsWellKnownTypeIsExternalInit(this TypeSymbol typeSymbol) 2142internal static bool IsWellKnownTypeOutAttribute(this TypeSymbol typeSymbol) => typeSymbol.IsWellKnownInteropServicesTopLevelType("OutAttribute"); 2145internal static bool IsWellKnownTypeLock(this TypeSymbol typeSymbol) 2151internal static bool IsMicrosoftCodeAnalysisEmbeddedAttribute(this TypeSymbol typeSymbol) 2162private static bool IsWellKnownInteropServicesTopLevelType(this TypeSymbol typeSymbol, string name) 2172private static bool IsWellKnownCompilerServicesTopLevelType(this TypeSymbol typeSymbol, string name) 2182internal static bool IsCompilerServicesTopLevelType(this TypeSymbol typeSymbol) 2185internal static bool IsWellKnownSetsRequiredMembersAttribute(this TypeSymbol type) 2188internal static bool IsWellKnownINumberBaseType(this TypeSymbol type) 2195internal static bool IsWellKnownDiagnosticsCodeAnalysisTopLevelType(this TypeSymbol typeSymbol) 2198private static bool IsContainedInNamespace(this TypeSymbol typeSymbol, string outerNS, string midNS, string? innerNS = null) 2231internal static int TypeToIndex(this TypeSymbol type) 2256TypeSymbol underlyingType = type.GetNullableUnderlyingType(); 2285internal 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 (90)
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) 1202var resolved = asValueType ?
Symbols\TypeWithState.cs (5)
16public readonly TypeSymbol? Type; 23public static TypeWithState ForType(TypeSymbol? type) 28public static TypeWithState Create(TypeSymbol? type, NullableFlowState defaultState) 42var type = typeWithAnnotations.Type; 69private TypeWithState(TypeSymbol? type, NullableFlowState state)
Symbols\UnboundGenericType.cs (1)
105internal override bool Equals(TypeSymbol t2, TypeCompareKind comparison)
Symbols\VarianceSafety.cs (3)
292TypeSymbol type, 389TypeSymbol typeArg = namedType.TypeArgumentsWithAnnotationsNoUseSiteDiagnostics[i].Type; 475if (!(context is TypeSymbol) && context.IsStatic && !context.IsAbstract && !context.IsVirtual)
Utilities\TypeSymbolExtensions.cs (9)
21public static int CustomModifierCount(this TypeSymbol type) 87public static bool HasCustomModifiers(this TypeSymbol type, bool flagNonDefaultArraySizesOrLowerBounds) 165public static bool CanUnifyWith(this TypeSymbol thisType, TypeSymbol otherType) 179internal static TypeSymbol GetNextBaseTypeNoUseSiteDiagnostics(this TypeSymbol type, ConsList<TypeSymbol> basesBeingResolved, CSharpCompilation compilation, ref PooledHashSet<NamedTypeSymbol> visited) 210private static TypeSymbol GetNextDeclaredBase(NamedTypeSymbol type, ConsList<TypeSymbol> basesBeingResolved, CSharpCompilation compilation, ref PooledHashSet<NamedTypeSymbol> visited)
Utilities\ValueSetFactory.cs (1)
56public static IValueSetFactory? ForType(TypeSymbol type)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (98)
CodeGen\CodeGenAsyncLocalsTests.cs (2)
976IEnumerable<IGrouping<TypeSymbol, FieldSymbol>> spillFieldsByType = stateMachineClass.GetMembers().Where(m => m.Kind == SymbolKind.Field && m.Name.StartsWith("<>7__wrap", StringComparison.Ordinal)).Cast<FieldSymbol>().GroupBy(x => x.Type); 979Assert.Equal(1, spillFieldsByType.Single(x => TypeSymbol.Equals(x.Key, comp.GetSpecialType(SpecialType.System_Int32), TypeCompareKind.ConsiderEverything2)).Count());
CodeGen\CodeGenFunctionPointersTests.cs (11)
99var funcPtr = m.ReturnType; 121var funcPtr = m.ReturnType; 143var funcPtr = m.ParameterTypesWithAnnotations[0].Type; 167var funcPtr = m.ParameterTypesWithAnnotations[0].Type; 194var returnType = m.ReturnType; 203var paramType = m.Parameters[0].Type; 226var paramType = m.Parameters[0].Type; 645var returnType = m.ReturnType; 646var paramType = m.Parameters[0].Type; 796static void validateProperty(PropertySymbol property, Action<TypeSymbol> verifier) 7074static void verifyArray(TypeSymbol type)
CodeGen\CodeGenReadonlyStructTests.cs (4)
851TypeSymbol type = namedType.TypeParameters[0]; 901type = (TypeSymbol)comp.CreatePointerTypeSymbol(comp.ObjectType); 1015TypeSymbol type = namedType.TypeParameters[0]; 1065type = (TypeSymbol)comp.CreatePointerTypeSymbol(comp.ObjectType);
CodeGen\CodeGenTupleTest.cs (75)
493TypeSymbol typeArg = iface.TypeArguments()[0]; 695TypeSymbol typeArg = constraint.TypeArguments()[0]; 1005var first = field2Type.TypeArguments()[0]; 1010var second = first.TupleElementTypesWithAnnotations[0].Type; 1616var xSymbol = model.GetDeclaredSymbol(x).GetSymbol<SourceLocalSymbol>().Type; 5789TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 5826TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 5827TypeSymbol stringType = comp.GetSpecialType(SpecialType.System_String); 5853TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 5870TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 5871TypeSymbol stringType = comp.GetSpecialType(SpecialType.System_String); 5947TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 5948TypeSymbol stringType = comp.GetSpecialType(SpecialType.System_String); 5968TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 5969TypeSymbol stringType = comp.GetSpecialType(SpecialType.System_String); 5987TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 5988TypeSymbol stringType = comp.GetSpecialType(SpecialType.System_String); 6006TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 6024TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 6025TypeSymbol stringType = comp.GetSpecialType(SpecialType.System_String); 6050TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 6051TypeSymbol stringType = comp.GetSpecialType(SpecialType.System_String); 6076TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 6077TypeSymbol stringType = comp.GetSpecialType(SpecialType.System_String); 6101TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 6102TypeSymbol stringType = comp.GetSpecialType(SpecialType.System_String); 6126TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 6127TypeSymbol stringType = comp.GetSpecialType(SpecialType.System_String); 6152TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 6153TypeSymbol stringType = comp.GetSpecialType(SpecialType.System_String); 6186TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 6339TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 6364TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 6365TypeSymbol stringType = comp.GetSpecialType(SpecialType.System_String); 6390ImmutableArray.Create<TypeSymbol>(intType, stringType), 6412TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 6413TypeSymbol stringType = comp.GetSpecialType(SpecialType.System_String); 6428TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 6429TypeSymbol stringType = comp.GetSpecialType(SpecialType.System_String); 6444TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 6459TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 6460TypeSymbol stringType = comp.GetSpecialType(SpecialType.System_String); 6479TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 6480TypeSymbol stringType = comp.GetSpecialType(SpecialType.System_String); 6499TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 6500TypeSymbol stringType = comp.GetSpecialType(SpecialType.System_String); 6520TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 6521TypeSymbol stringType = comp.GetSpecialType(SpecialType.System_String); 6543TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 6560TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 11589private static void AssertTupleTypeEquality(TypeSymbol tuple) 11611private static void AssertTupleTypeMembersEquality(TypeSymbol tuple1, TypeSymbol tuple2) 12002var m4TupleRestTuple = ((FieldSymbol)m4Tuple.GetMembers("Rest").Single()).Type; 12231var m5TupleRestTuple = ((FieldSymbol)m5Tuple.GetMembers("Rest").Single()).Type; 12273var m5TupleRestTupleRestTuple = ((FieldSymbol)m5TupleRestTuple.GetMembers("Rest").Single()).Type; 12462var m7Tuple = c.GetMember<MethodSymbol>("M7").ReturnType; 12620var m8TupleRestTuple = ((FieldSymbol)m8Tuple.GetMembers("Rest").Single()).Type; 13528var m9Tuple = c.GetMember<MethodSymbol>("M9").ReturnType; 18843TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 18844TypeSymbol stringType = comp.GetSpecialType(SpecialType.System_String); 18904TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 18905TypeSymbol stringType = comp.GetSpecialType(SpecialType.System_String); 18906TypeSymbol objectType = comp.GetSpecialType(SpecialType.System_Object); 19822var m3 = comp.GetMember<MethodSymbol>("Derived.M3").ReturnType; 20565Assert.Equal("void C2.M1()", c2.FindImplementationForInterfaceMember(((TypeSymbol)c2Interfaces[0]).GetMember("M1")).ToTestDisplayString()); 20567c2.FindImplementationForInterfaceMember(((TypeSymbol)c1Interfaces[0]).GetMember("M1")).ToTestDisplayString()); 20569var m2 = (MethodSymbol)((TypeSymbol)c2).GetMember("I1<System.ValueTuple<System.Int32,System.Int32>>.M2"); 20578c2.FindImplementationForInterfaceMember(((TypeSymbol)c2Interfaces[0]).GetMember("M2"))); 20580c2.FindImplementationForInterfaceMember(((TypeSymbol)c1Interfaces[0]).GetMember("M2"))); 20812c3.FindImplementationForInterfaceMember(((TypeSymbol)c3Interfaces[0]).GetMember("M")).ToTestDisplayString()); 26751var tuple = iEnumerable.TypeArguments()[0]; 26824var tuple = iEnumerable.TypeArguments()[0]; 28599var tuple = m.ReturnType; 28631var tuple = m.ReturnType;
CodeGen\DestructorTests.cs (2)
600var intType = systemNamespace.GetMember<TypeSymbol>("Int32");
CodeGen\WinMdDelegateTests.cs (1)
225var fieldType = field.Type;
Emit\EmitMetadataTests.cs (3)
447var parameter1Type = parameter1.Type; 2086var invokeReturn = invoke.ReturnType; 2088var endInvokeReturn = endInvoke.ReturnType;
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (22)
Emit\EditAndContinue\EditAndContinueStateMachineTests.cs (4)
10761var ism1 = compilation1.GetMember<TypeSymbol>("System.Runtime.CompilerServices.IteratorStateMachineAttribute"); 10946var asm1 = compilation1.GetMember<TypeSymbol>("System.Runtime.CompilerServices.AsyncStateMachineAttribute");
Emit\EditAndContinue\EditAndContinueTests.cs (3)
13569var mX1 = compilationA1.GetMember<TypeSymbol>("X"); 13586SemanticEdit.Create(SemanticEditKind.Insert, null, compilationB1.GetMember<TypeSymbol>("Y"))),
Emit\EditAndContinue\SymbolMatcherTests.cs (6)
346var elementType = compilation1.GetMember<TypeSymbol>("C.D"); 377var elementType = compilation1.GetMember<TypeSymbol>("C.D"); 409var elementType = compilation1.GetMember<TypeSymbol>("C.D");
Emit\NumericIntPtrTests.cs (9)
1604static bool isNativeInt(TypeSymbol type, bool signed) 1609static bool isNullableNativeInt(TypeSymbol type, bool signed) 10354var nintType = method.Parameters[0].Type; 10358var intPtrType = method.Parameters[1].Type; 10367var nuintType = method.Parameters[2].Type; 10371var uintPtrType = method.Parameters[3].Type; 10383static void verifyIntPtr(TypeSymbol type) 10392static void verifyUIntPtr(TypeSymbol type) 10401static void verifyCommon(TypeSymbol type)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (39)
Attributes\AttributeTests.cs (12)
2883Assert.Equal(1, invokeMethod.GetReturnTypeAttributes().Where(a => TypeSymbol.Equals(a.AttributeClass, returnTypeAttrType, TypeCompareKind.ConsiderEverything2)).Count()); 2925Assert.Equal(1, endInvokeMethod.GetReturnTypeAttributes().Where(a => TypeSymbol.Equals(a.AttributeClass, returnTypeAttrType, TypeCompareKind.ConsiderEverything2)).Count()); 3119var nenum = top.GetMember<TypeSymbol>("NestedEnum"); 4020attrs = setter.GetReturnTypeAttributes().Where(a => TypeSymbol.Equals(a.AttributeClass, attributeTypeForReturn, TypeCompareKind.ConsiderEverything2)); 4033attrs = getter.GetReturnTypeAttributes().Where(a => TypeSymbol.Equals(a.AttributeClass, attributeTypeForReturn, TypeCompareKind.ConsiderEverything2)); 5094Assert.Equal(1, gooMethod.GetReturnTypeAttributes().Where(a => TypeSymbol.Equals(a.AttributeClass, b1Class, TypeCompareKind.ConsiderEverything2)).Count()); 5095Assert.Equal(1, gooMethod.GetReturnTypeAttributes().Where(a => TypeSymbol.Equals(a.AttributeClass, b2Class, TypeCompareKind.ConsiderEverything2)).Count()); 11150var program = module.GlobalNamespace.GetMember<TypeSymbol>("Program"); 11244var holder = module.GlobalNamespace.GetMember<TypeSymbol>("Holder");
Attributes\AttributeTests_IsByRefLike.cs (1)
1037private static void AssertReferencedIsByRefLike(TypeSymbol type, bool hasObsolete = true, bool hasCompilerFeatureRequired = false)
Attributes\AttributeTests_Nullable.cs (10)
69var imc1 = (TypeSymbol)lib2_comp.GlobalNamespace.GetMember("I0"); 89var imc2 = (TypeSymbol)client_comp.GlobalNamespace.GetMember("I0"); 133var lib2_c0 = (TypeSymbol)lib2_comp.GlobalNamespace.GetMember("C0"); 168var lib3_c0 = (TypeSymbol)lib2_comp.GlobalNamespace.GetMember("C0"); 275var imc1 = (TypeSymbol)lib2_comp.GlobalNamespace.GetMember("I0");
Attributes\AttributeTests_Tuples.cs (5)
274var typeSymbols = ArrayBuilder<TypeSymbol>.GetInstance(); 488var firstTuple = field6Type.TypeArguments().Single(); 492var secondTuple = firstTuple.TupleElementTypesWithAnnotations[1].Type; 940var typeArg = constraint.TypeArguments().Single(); 1040var typeArg = interfaceImpl.TypeArguments().Single();
Attributes\AttributeTests_WellKnownAttributes.cs (2)
4980var valueTupleS = comp.GetTypeByMetadataName("ValueTupleS").GetMember("M").GetTypeOrReturnType().Type; 5012var unbound = comp2.GetTypeByMetadataName("Unbound").BaseType().TypeArgumentsWithAnnotationsNoUseSiteDiagnostics[0].Type;
Semantics\CollectionExpressionTests.cs (4)
19014TypeSymbol builderType; 21115TypeSymbol builderType; 21175TypeSymbol builderType; 21285TypeSymbol builderType;
Semantics\InlineArrayTests.cs (5)
1577var buffer = m.GlobalNamespace.GetMember<FieldSymbol>("C.F").Type; 1612var buffer = m.GlobalNamespace.GetMember<FieldSymbol>("C.F").Type; 1647var buffer = m.GlobalNamespace.GetMember<FieldSymbol>("C.F").Type; 1682var buffer = m.GlobalNamespace.GetMember<FieldSymbol>("C.F").Type; 1717var buffer = m.GlobalNamespace.GetMember<FieldSymbol>("C.F").Type;
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (124)
Semantics\BindingTests.cs (2)
1967var method = module.GlobalNamespace.GetMember<TypeSymbol>("C").GetMember<MethodSymbol>("F"); 1989var method = module.GlobalNamespace.GetMember<TypeSymbol>("C").GetMember<MethodSymbol>("F");
Semantics\DeconstructionTests.cs (1)
4723var aaType = model.GetTypeInfo(aa).Type.GetSymbol();
Semantics\DelegateTypeTests.cs (1)
14880internal override TypeSymbol UnderlyingTypeSymbol => _underlying;
Semantics\DynamicTests.cs (5)
2155var c = compilation.GlobalNamespace.GetMember<TypeSymbol>("C"); 2158var erasedType = eraser.EraseDynamic(f.Type); 2183var derived = compilation.GlobalNamespace.GetMember<TypeSymbol>("Derived");
Semantics\ImplicitlyTypeArraysTests.cs (2)
44var typeM = compilation.GlobalNamespace.GetMember<TypeSymbol>("M");
Semantics\ImplicitlyTypedLocalsTests.cs (4)
27var fieldA = compilation.GlobalNamespace.GetMember<TypeSymbol>("C").GetMember<FieldSymbol>("a"); 28var typeVar = compilation.GlobalNamespace.GetMember<TypeSymbol>("var"); 44var fieldA = compilation.GlobalNamespace.GetMember<TypeSymbol>("C").GetMember<FieldSymbol>("a");
Semantics\InheritanceBindingTests.cs (4)
8498var tuple = c2Goo.Parameters[0].Type.GetMemberTypeArgumentsNoUseSiteDiagnostics()[0]; 8582var tuple = c2Goo.ReturnType.GetMemberTypeArgumentsNoUseSiteDiagnostics()[0]; 8651var tuple = dGoo.Parameters[0].Type.GetMemberTypeArgumentsNoUseSiteDiagnostics()[0]; 8720var tuple = dGoo.ReturnType.GetMemberTypeArgumentsNoUseSiteDiagnostics()[0];
Semantics\NativeIntegerTests.cs (18)
404var underlyingTypeArgument = underlyingInterface.TypeArgumentsWithAnnotationsNoUseSiteDiagnostics[i].Type; 405var nativeIntegerTypeArgument = nativeIntegerInterface.TypeArgumentsWithAnnotationsNoUseSiteDiagnostics[i].Type; 784var typeA = comp.GetMember<FieldSymbol>("A.F1").Type; 865var typeA = comp.GetMember<FieldSymbol>("A.F1").Type; 980var typeA = comp.GetMember<FieldSymbol>("A.F1").Type; 1072var t1B = comp.GetMember<FieldSymbol>("B.F1").Type; 1073var t2B = comp.GetMember<FieldSymbol>("B.F2").Type; 1158var type1 = getConstraintType(comp); 1178var type2 = getConstraintType(comp); 1183static TypeSymbol getConstraintType(CSharpCompilation comp) => 4844static bool isNativeInt(TypeSymbol type, bool signed) 4850static bool isNullableNativeInt(TypeSymbol type, bool signed) 14737var type1 = getInterface(comp, "C1"); 14738var type2 = getInterface(comp, "C2"); 14739var type3 = getInterface(comp, "C3"); 14740var type4 = getInterface(comp, "C4"); 14741var type5 = getInterface(comp, "C5"); 14747static TypeSymbol getInterface(CSharpCompilation comp, string typeName) =>
Semantics\NullableReferenceTypesTests.cs (29)
17024Assert.Equal("void C2.M1()", c2.FindImplementationForInterfaceMember(((TypeSymbol)c2Interfaces[0]).GetMember("M1")).ToTestDisplayString(includeNonNullable: true)); 17026c2.FindImplementationForInterfaceMember(((TypeSymbol)c1Interfaces[0]).GetMember("M1")).ToTestDisplayString(includeNonNullable: true)); 17028var m2 = (MethodSymbol)((TypeSymbol)c2).GetMember("I1<A>.M2"); 17037c2.FindImplementationForInterfaceMember(((TypeSymbol)c2Interfaces[0]).GetMember("M2"))); 17039c2.FindImplementationForInterfaceMember(((TypeSymbol)c1Interfaces[0]).GetMember("M2"))); 17103Assert.Equal("void C1.M1()", c2.FindImplementationForInterfaceMember(((TypeSymbol)c2Interfaces[0]).GetMember("M1")).ToTestDisplayString(includeNonNullable: true)); 17105c2.FindImplementationForInterfaceMember(((TypeSymbol)c1Interfaces[0]).GetMember("M1")).ToTestDisplayString(includeNonNullable: true)); 17107var m2 = (MethodSymbol)((TypeSymbol)c1).GetMember("I1<A>.M2"); 17116c2.FindImplementationForInterfaceMember(((TypeSymbol)c2Interfaces[0]).GetMember("M2"))); 17118c2.FindImplementationForInterfaceMember(((TypeSymbol)c1Interfaces[0]).GetMember("M2"))); 17369var cMabImplementations = ((MethodSymbol)((TypeSymbol)c).GetMember("I1<T>.M")).ExplicitInterfaceImplementations; 17372var cMcdImplementations = ((MethodSymbol)((TypeSymbol)c).GetMember("I1<U>.M")).ExplicitInterfaceImplementations; 17428var method = (MethodSymbol)((TypeSymbol)c3).GetMember("I1<A>.M"); 17439c3.FindImplementationForInterfaceMember(((TypeSymbol)c3Interfaces[0]).GetMember("M"))); 17509var method = (MethodSymbol)((TypeSymbol)c3).GetMember("I1<A>.M"); 17520c3.FindImplementationForInterfaceMember(((TypeSymbol)c3Interfaces[0]).GetMember("M"))); 17593var method = (MethodSymbol)((TypeSymbol)c3).GetMember("I1<A>.M"); 17604c3.FindImplementationForInterfaceMember(((TypeSymbol)c3Interfaces[1]).GetMember("M"))); 17674var method = (MethodSymbol)((TypeSymbol)c3).GetMember("I1<A>.M"); 17685c3.FindImplementationForInterfaceMember(((TypeSymbol)c3Interfaces[0]).GetMember("M"))); 115868var type2 = comp.GetMember<MethodSymbol>("C.M").ReturnType; 115891var type2 = comp.GetMember<MethodSymbol>("C.M").ReturnType; 116018private static void AssertHashCodesMatch(TypeSymbol c, TypeSymbol c2) 139626var tuple = c2Goo.Parameters[0].Type.GetMemberTypeArgumentsNoUseSiteDiagnostics()[0]; 139714var tuple = c2Goo.ReturnType.GetMemberTypeArgumentsNoUseSiteDiagnostics()[0]; 139787var tuple = dGoo.Parameters[0].Type.GetMemberTypeArgumentsNoUseSiteDiagnostics()[0]; 139860var tuple = dGoo.ReturnType.GetMemberTypeArgumentsNoUseSiteDiagnostics()[0]; 139893var tuple = dGoo.Parameters[1].Type;
Semantics\OperatorTests.cs (22)
7496TypeSymbol type; 7531TypeSymbol type, 7562TypeSymbol underlying = type; 7858TypeSymbol[] types = new TypeSymbol[typeNames.Length]; 7879foreach (var leftType in types) 7881foreach (var rightType in types) 8018TypeSymbol[] types = new TypeSymbol[typeNames.Length]; 8039foreach (var leftType in types) 8041foreach (var rightType in types) 8069TypeSymbol leftType, 8070TypeSymbol rightType, 8171(TypeSymbol.Equals(leftType, rightType, TypeCompareKind.ConsiderEverything2) || compilation.Conversions.ClassifyConversionFromType(leftType, rightType, ref useSiteDiagnostics).IsReference)) 8229else if (op == BinaryOperatorKind.Subtraction && leftType.IsPointerType() && TypeSymbol.Equals(leftType, rightType, TypeCompareKind.ConsiderEverything2)) 8236TypeSymbol.Equals((signature = compilation.BuiltInOperators.GetSignature(result)).RightType, leftType.EnumUnderlyingTypeOrSelf(), TypeCompareKind.ConsiderEverything2)) 8243TypeSymbol.Equals((signature = compilation.BuiltInOperators.GetSignature(result)).LeftType, rightType.EnumUnderlyingTypeOrSelf(), TypeCompareKind.ConsiderEverything2)) 8248leftType.IsEnumType() && TypeSymbol.Equals(leftType, rightType, TypeCompareKind.ConsiderEverything2)) 8258leftType.IsEnumType() && TypeSymbol.Equals(leftType, rightType, TypeCompareKind.ConsiderEverything2)) 8265leftType.IsEnumType() && TypeSymbol.Equals(leftType, rightType, TypeCompareKind.ConsiderEverything2)) 8270leftType.IsDelegateType() && TypeSymbol.Equals(leftType, rightType, TypeCompareKind.ConsiderEverything2)) 8343!TypeSymbol.Equals(leftType, rightType, TypeCompareKind.ConsiderEverything2) &&
Semantics\OverloadResolutionTests.cs (23)
611var type = compilation.GetMember<FieldSymbol>("C.F0").Type; 612var normalized = type.NormalizeTaskTypes(compilation); 691var type = compilation.GetMember<FieldSymbol>("C.F0").Type; 692var normalized = type.NormalizeTaskTypes(compilation); 717private static NamedTypeSymbol GetUnderlyingTupleTypeRest(TypeSymbol type) 774var type = compilation.GetMember<FieldSymbol>("C.F0").Type; 775var normalized = type.NormalizeTaskTypes(compilation); 807var type = compilation.GetMember<FieldSymbol>("C.F0").Type; 808var normalized = type.NormalizeTaskTypes(compilation); 845var type = compilation.GetMember<FieldSymbol>("C.F0").Type; 846var normalized = type.NormalizeTaskTypes(compilation); 885var type = compilation.GetMember<FieldSymbol>($"C.{fieldName}").Type; 887var normalizedType = type.NormalizeTaskTypes(compilation); 932var type = compilation.GetMember<FieldSymbol>("C.F0").Type; 933var normalized = type.NormalizeTaskTypes(compilation); 975var type = compilation.GetMember<FieldSymbol>("C.F0").Type; 977var normalized = type.NormalizeTaskTypes(compilation); 1023var type = compilation.GetMember<FieldSymbol>("C.F0").Type; 1024var normalized = type.NormalizeTaskTypes(compilation); 1076var type = compilation.GetMember<FieldSymbol>("C.F0").Type; 1077var normalized = type.NormalizeTaskTypes(compilation); 1120var type = compilation.GetMember<FieldSymbol>("C.F").Type; 1121var normalized = type.NormalizeTaskTypes(compilation);
Semantics\ScriptSemanticsTests.cs (1)
425Assert.Equal(TypeSymbol.ImplicitTypeName, member.Name);
Semantics\StructConstructorTests.cs (1)
3221var typeA = comp.GetMember<FieldSymbol>("S2.X").Type;
Semantics\UnsafeTests.cs (11)
5945var returnType = method.ReturnType; 5949var parameterType = method.GetParameterType(0); 7852var structType = compilation.GlobalNamespace.GetMember<TypeSymbol>("S"); 7919var structType = compilation.GlobalNamespace.GetMember<TypeSymbol>("S"); 8858var pointerType = methodSymbol.Parameters[0].Type; 10247var arraySymbol = compilation.GlobalNamespace.GetMember<TypeSymbol>("C").GetMember<FieldSymbol>("a"); 10316var arraySymbol = compilation.GlobalNamespace.GetMember<TypeSymbol>("C").GetMember<FieldSymbol>("a"); 12342var s = CreateCompilation(text).GlobalNamespace.GetMember<TypeSymbol>("S");
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (354)
Compilation\GetSemanticInfoBrokenCodeTests.cs (1)
180var type = comp.GlobalNamespace.GetMember<NamedTypeSymbol>(TypeSymbol.ImplicitTypeName);
Compilation\GetSemanticInfoTests.cs (2)
4064Assert.Equal(SpecialType.System_Collections_Generic_ICollection_T, ((TypeSymbol)reducedFrom1.Parameters[0].Type.OriginalDefinition).SpecialType); 4075Assert.Equal(SpecialType.System_Collections_Generic_ICollection_T, ((TypeSymbol)reducedFrom2.Parameters[0].Type.OriginalDefinition).SpecialType);
Compilation\ReferenceManagerTests.cs (2)
1823var implicitTypeCount1 = comp1.GlobalNamespace.GetMember<NamespaceSymbol>("A").GetMembers(TypeSymbol.ImplicitTypeName).Length; 1829var implicitTypeCount2 = comp2.GlobalNamespace.GetMember<NamespaceSymbol>("A").GetMembers(TypeSymbol.ImplicitTypeName).Length;
Compilation\SemanticModelAPITests.cs (1)
470var s = v.Type;
DocumentationComments\CrefTests.cs (9)
1432var typeArgument = actualSymbol.GetMemberTypeArgumentsNoUseSiteDiagnostics().Single(); 1457var typeArgument = actualSymbol.GetMemberTypeArgumentsNoUseSiteDiagnostics().Single(); 1483var typeArgument = actualSymbol.GetMemberTypeArgumentsNoUseSiteDiagnostics().Single(); 1509var typeArgument = actualSymbol.GetMemberTypeArgumentsNoUseSiteDiagnostics().Single(); 1530var expectedSymbol = compilation.GlobalNamespace.GetMember<NamedTypeSymbol>("B").TypeArguments()[0]; 1606var typeArgument = actualSymbol.GetMemberTypeArgumentsNoUseSiteDiagnostics().Single(); 1669var actualParameterType = actualWinner.GetParameters().Single().Type; 1670AssertEx.All(actualWinner.ContainingType.TypeArguments(), typeParam => TypeSymbol.Equals(typeParam, actualParameterType, TypeCompareKind.ConsiderEverything2)); //CONSIDER: Would be different in Dev11. 1707var actualParameterType = actualWinner.GetParameters().Single().Type;
DocumentationComments\DocumentationCommentIDTests.cs (5)
48var symbol = field.Type; 78var symbol = field.Type; 272var symbol = field.Type; 416var method = comp.GlobalNamespace.GetMember<NamedTypeSymbol>("Test").GetMember<MethodSymbol>("Clone").ReturnType; 436var method = comp.GlobalNamespace.GetMember<NamedTypeSymbol>("Test").GetMember<MethodSymbol>("Clone").ReturnType;
SymbolDisplay\SymbolDisplayTests.cs (4)
3149var hostTypeSymbol = comp.GetHostObjectTypeSymbol(); 3157var nestedTypeSymbol = (TypeSymbol)hostTypeSymbol.GetMember("NestedType"); 8934var type = comp.GetMember<FieldSymbol>("Program.D").Type;
Symbols\AnonymousTypesSemanticsTests.cs (1)
1065private static void CheckAnonymousType(TypeSymbol type, string name, string metadataName)
Symbols\AnonymousTypesSymbolTests.cs (1)
1091private void TestAnonymousTypeProperty(NamedTypeSymbol type, string typeViewName, string name, TypeSymbol propType)
Symbols\CompilationCreationTests.cs (70)
74TypeSymbol c107 = c1.GlobalNamespace.GetTypeMembers("C107").Single(); 160var retval1 = asm2[1].GlobalNamespace.GetTypeMembers("Class4"). 191var retval2 = asm3[1].GlobalNamespace.GetTypeMembers("Class4"). 214var retval3 = type1.GetMembers("Foo1").OfType<MethodSymbol>().Single().ReturnType; 219var retval4 = type1.GetMembers("Foo2").OfType<MethodSymbol>().Single().ReturnType; 224var retval5 = type1.GetMembers("Foo3").OfType<MethodSymbol>().Single().ReturnType; 250var retval6 = asm4[1].GlobalNamespace.GetTypeMembers("Class4"). 277var retval7 = type2.GetMembers("Foo1").OfType<MethodSymbol>().Single().ReturnType; 282var retval8 = type2.GetMembers("Foo2").OfType<MethodSymbol>().Single().ReturnType; 287var retval9 = type2.GetMembers("Foo3").OfType<MethodSymbol>().Single().ReturnType; 302var retval10 = type3.GetMembers("Foo1").OfType<MethodSymbol>().Single().ReturnType; 307var retval11 = type3.GetMembers("Foo2").OfType<MethodSymbol>().Single().ReturnType; 312var retval12 = type3.GetMembers("Foo3").OfType<MethodSymbol>().Single().ReturnType; 317var retval13 = type3.GetMembers("Foo4").OfType<MethodSymbol>().Single().ReturnType; 322var retval14 = type3.GetMembers("Foo5").OfType<MethodSymbol>().Single().ReturnType; 368var retval15 = type4.GetMembers("Foo1").OfType<MethodSymbol>().Single().ReturnType; 372var retval16 = type4.GetMembers("Foo2").OfType<MethodSymbol>().Single().ReturnType; 376var retval17 = type4.GetMembers("Foo3").OfType<MethodSymbol>().Single().ReturnType; 391var retval18 = type5.GetMembers("Foo1").OfType<MethodSymbol>().Single().ReturnType; 395var retval19 = type5.GetMembers("Foo2").OfType<MethodSymbol>().Single().ReturnType; 399var retval20 = type5.GetMembers("Foo3").OfType<MethodSymbol>().Single().ReturnType; 403var retval21 = type5.GetMembers("Foo4").OfType<MethodSymbol>().Single().ReturnType; 408var retval22 = type5.GetMembers("Foo5").OfType<MethodSymbol>().Single().ReturnType; 743var retval1 = asm2[1].GlobalNamespace.GetTypeMembers("Class4"). 839var retval2 = asm3[1].GlobalNamespace.GetTypeMembers("Class4"). 862var retval3 = type1.GetMembers("Foo1").OfType<MethodSymbol>().Single().ReturnType; 867var retval4 = type1.GetMembers("Foo2").OfType<MethodSymbol>().Single().ReturnType; 872var retval5 = type1.GetMembers("Foo3").OfType<MethodSymbol>().Single().ReturnType; 980var retval6 = asm4[1].GlobalNamespace.GetTypeMembers("Class4"). 1007var retval7 = type2.GetMembers("Foo1").OfType<MethodSymbol>().Single().ReturnType; 1012var retval8 = type2.GetMembers("Foo2").OfType<MethodSymbol>().Single().ReturnType; 1017var retval9 = type2.GetMembers("Foo3").OfType<MethodSymbol>().Single().ReturnType; 1032var retval10 = type3.GetMembers("Foo1").OfType<MethodSymbol>().Single().ReturnType; 1037var retval11 = type3.GetMembers("Foo2").OfType<MethodSymbol>().Single().ReturnType; 1042var retval12 = type3.GetMembers("Foo3").OfType<MethodSymbol>().Single().ReturnType; 1047var retval13 = type3.GetMembers("Foo4").OfType<MethodSymbol>().Single().ReturnType; 1052var retval14 = type3.GetMembers("Foo5").OfType<MethodSymbol>().Single().ReturnType; 1096var retval15 = type4.GetMembers("Foo1").OfType<MethodSymbol>().Single().ReturnType; 1101var retval16 = type4.GetMembers("Foo2").OfType<MethodSymbol>().Single().ReturnType; 1105var retval17 = type4.GetMembers("Foo3").OfType<MethodSymbol>().Single().ReturnType; 1120var retval18 = type5.GetMembers("Foo1").OfType<MethodSymbol>().Single().ReturnType; 1124var retval19 = type5.GetMembers("Foo2").OfType<MethodSymbol>().Single().ReturnType; 1128var retval20 = type5.GetMembers("Foo3").OfType<MethodSymbol>().Single().ReturnType; 1132var retval21 = type5.GetMembers("Foo4").OfType<MethodSymbol>().Single().ReturnType; 1137var retval22 = type5.GetMembers("Foo5").OfType<MethodSymbol>().Single().ReturnType; 1450var retval1 = asm2[1].GlobalNamespace.GetTypeMembers("Class4"). 1509var retval2 = asm3[1].GlobalNamespace.GetTypeMembers("Class4"). 1536var retval3 = type1.GetMembers("Foo1").OfType<MethodSymbol>().Single().ReturnType; 1541var retval4 = type1.GetMembers("Foo2").OfType<MethodSymbol>().Single().ReturnType; 1546var retval5 = type1.GetMembers("Foo3").OfType<MethodSymbol>().Single().ReturnType; 1601var retval6 = asm4[1].GlobalNamespace.GetTypeMembers("Class4"). 1628var retval7 = type2.GetMembers("Foo1").OfType<MethodSymbol>().Single().ReturnType; 1633var retval8 = type2.GetMembers("Foo2").OfType<MethodSymbol>().Single().ReturnType; 1638var retval9 = type2.GetMembers("Foo3").OfType<MethodSymbol>().Single().ReturnType; 1653var retval10 = type3.GetMembers("Foo1").OfType<MethodSymbol>().Single().ReturnType; 1658var retval11 = type3.GetMembers("Foo2").OfType<MethodSymbol>().Single().ReturnType; 1663var retval12 = type3.GetMembers("Foo3").OfType<MethodSymbol>().Single().ReturnType; 1668var retval13 = type3.GetMembers("Foo4").OfType<MethodSymbol>().Single().ReturnType; 1673var retval14 = type3.GetMembers("Foo5").OfType<MethodSymbol>().Single().ReturnType; 1728var retval15 = type4.GetMembers("Foo1").OfType<MethodSymbol>().Single().ReturnType; 1737var retval16 = type4.GetMembers("Foo2").OfType<MethodSymbol>().Single().ReturnType; 1741var retval17 = type4.GetMembers("Foo3").OfType<MethodSymbol>().Single().ReturnType; 1756var retval18 = type5.GetMembers("Foo1").OfType<MethodSymbol>().Single().ReturnType; 1760var retval19 = type5.GetMembers("Foo2").OfType<MethodSymbol>().Single().ReturnType; 1764var retval20 = type5.GetMembers("Foo3").OfType<MethodSymbol>().Single().ReturnType; 1768var retval21 = type5.GetMembers("Foo4").OfType<MethodSymbol>().Single().ReturnType; 1773var retval22 = type5.GetMembers("Foo5").OfType<MethodSymbol>().Single().ReturnType; 2321var retval4 = foo1.ReturnType; 2520var retval5 = type3.GetMembers("Foo4").OfType<MethodSymbol>().Single().ReturnType; 2608return current is TypeSymbol type && type.TypeKind == kind;
Symbols\ConversionTests.cs (15)
30var types = new TypeSymbol[] 233var f1Type = ((FieldSymbol)(classX.ChildSymbol("f1"))).Type; 234var f2Type = ((FieldSymbol)(classX.ChildSymbol("f2"))).Type; 235var f3Type = ((FieldSymbol)(classX.ChildSymbol("f3"))).Type; 236var f4Type = ((FieldSymbol)(classX.ChildSymbol("f4"))).Type; 237var f5Type = ((FieldSymbol)(classX.ChildSymbol("f5"))).Type; 238var f6Type = ((FieldSymbol)(classX.ChildSymbol("f6"))).Type; 239var f7Type = ((FieldSymbol)(classX.ChildSymbol("f7"))).Type; 240var f8Type = ((FieldSymbol)(classX.ChildSymbol("f8"))).Type; 241var f9Type = ((FieldSymbol)(classX.ChildSymbol("f9"))).Type; 242var f10Type = ((FieldSymbol)(classX.ChildSymbol("f10"))).Type; 243var g1Type = ((FieldSymbol)(classI.ChildSymbol("g1"))).Type; 244var g2Type = ((FieldSymbol)(classI.ChildSymbol("g2"))).Type; 309var typeIntArray = classC.GetMember<FieldSymbol>("a").Type; 312var typeIntArrayWithCustomModifiers = interfaceI3.GetMember<MethodSymbol>("M1").Parameters.Single().Type;
Symbols\CovariantReturnTests.cs (3)
344bool hasReturnConversion(TypeSymbol fromType, TypeSymbol toType) 359var constructedType = genericType.Construct(typeArguments.Select(n => (TypeSymbol)comp.GlobalNamespace.GetMember(n)));
Symbols\ErrorTypeSymbolTests.cs (1)
107Assert.Equal(TypeSymbol.Equals(typeA, typeB, TypeCompareKind.ConsiderEverything2), expectedEqual);
Symbols\ExtendedPartialMethodsTests.cs (1)
3029static void verifyArray(TypeSymbol type)
Symbols\FunctionPointerTypeSymbolTests.cs (7)
977var ptr1Ref = comp.GetMember<FieldSymbol>("C.ptr1Ref").Type; 978var ptr1RefReadonly = comp.GetMember<FieldSymbol>("C.ptr1RefReadonly").Type; 979var ptr2Ref = comp.GetMember<FieldSymbol>("C.ptr2Ref").Type; 980var ptr2In = comp.GetMember<FieldSymbol>("C.ptr2In").Type; 981var ptr2Out = comp.GetMember<FieldSymbol>("C.ptr2Out").Type; 1510var f1 = c.GetField("Field1").Type; 1511var f2 = c.GetField("Field2").Type;
Symbols\GenericConstraintTests.cs (3)
3416var constraintType = ((SourceOrdinaryMethodSymbol)m).TypeParameters[0].ConstraintTypesNoUseSiteDiagnostics[0].Type; 4968private void CheckTypeParameterContainingSymbols(MethodSymbol containingMethod, TypeSymbol type, int nReferencesExpected) 6640TypeSymbol typeSymbol = tokenDecoder.GetTypeOfToken(constraintTypeHandle);
Symbols\IndexerTests.cs (3)
2560Assert.True(((TypeSymbol)compilation.GlobalNamespace.GetTypeMembers("C").Single()).GetMembers().Any(x => x.IsIndexer())); 2564Assert.True(((TypeSymbol)compilation.GlobalNamespace.GetTypeMembers("C").Single()).GetMembers().Any(x => x.IsIndexer())); 2641var type = model.GetTypeInfo(syntax).Type.GetSymbol();
Symbols\Metadata\PE\BaseTypeResolution.cs (1)
204internal static void AssertBaseType(TypeSymbol @base, string name)
Symbols\Metadata\PE\LoadCustomModifiers.cs (1)
166var propertyType = property.Type;
Symbols\Metadata\PE\LoadingAttributes.cs (5)
343var c1 = (TypeSymbol)assemblies[0].Modules[0].GlobalNamespace.GetMember("C1"); 344var c3 = (TypeSymbol)assemblies[0].Modules[0].GlobalNamespace.GetMember("C3"); 346a.VerifyNamedArgumentValue(0, "TA", TypedConstantKind.Array, new TypeSymbol[] { c1, c3 });
Symbols\Metadata\PE\NoPiaInstantiationOfGenericClassAndStruct.cs (2)
97var outer = ((NamedTypeSymbol)importedField.Type).TypeArguments().Single(); 100var inner = ((NamedTypeSymbol)outer).TypeArguments().Single();
Symbols\Metadata\PE\TypeForwarders.cs (2)
66Assert.True(module1.TypeRefHandleToTypeMap.Values.Contains((TypeSymbol)base4.OriginalDefinition)); 67Assert.True(module1.TypeRefHandleToTypeMap.Values.Contains((TypeSymbol)base6.OriginalDefinition));
Symbols\MockNamedTypeSymbol.cs (5)
250internal override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol> basesBeingResolved) 260internal override NamedTypeSymbol GetDeclaredBaseType(ConsList<TypeSymbol> basesBeingResolved) 265internal override ImmutableArray<NamedTypeSymbol> GetDeclaredInterfaces(ConsList<TypeSymbol> basesBeingResolved) 362internal sealed override bool HasCollectionBuilderAttribute(out TypeSymbol? builderType, out string? methodName) 369internal sealed override bool HasAsyncMethodBuilderAttribute(out TypeSymbol? builderArgument)
Symbols\ModuleInitializers\IgnoredTests.cs (22)
40var rootModuleType = (TypeSymbol)module.GlobalNamespace.GetMember("<Module>"); 66var rootModuleType = (TypeSymbol)module.GlobalNamespace.GetMember("<Module>"); 92var rootModuleType = (TypeSymbol)module.GlobalNamespace.GetMember("<Module>"); 117var rootModuleType = (TypeSymbol)module.GlobalNamespace.GetMember("<Module>"); 142var rootModuleType = (TypeSymbol)module.GlobalNamespace.GetMember("<Module>"); 167var rootModuleType = (TypeSymbol)module.GlobalNamespace.GetMember("<Module>"); 192var rootModuleType = (TypeSymbol)module.GlobalNamespace.GetMember("<Module>"); 217var rootModuleType = (TypeSymbol)module.GlobalNamespace.GetMember("<Module>"); 238var rootModuleType = (TypeSymbol)module.GlobalNamespace.GetMember("<Module>"); 259var rootModuleType = (TypeSymbol)module.GlobalNamespace.GetMember("<Module>"); 292var rootModuleType = (TypeSymbol)module.GlobalNamespace.GetMember("<Module>");
Symbols\ModuleInitializers\ModuleInitializersTests.cs (4)
94var rootModuleType = (TypeSymbol)module.GlobalNamespace.GetMember("<Module>"); 129var rootModuleType = (TypeSymbol)module.GlobalNamespace.GetMember("<Module>");
Symbols\OverriddenOrHiddenMembersTests.cs (2)
84var ofD = ImmutableArray.Create<TypeSymbol>(D); 98var ofV = ImmutableArray.Create<TypeSymbol>(D_MofV.TypeParameters[0]);
Symbols\Retargeting\NoPia.cs (22)
2058Assert.Equal("Pia", ((TypeSymbol)args[0].ValueInternal).ContainingAssembly.Name); 2073Assert.Equal("Pia", ((TypeSymbol)args[0].ValueInternal).ContainingAssembly.Name); 2088Assert.Equal("Pia", ((TypeSymbol)args[0].ValueInternal).ContainingAssembly.Name); 2103Assert.Equal("Pia", ((TypeSymbol)args[0].ValueInternal).ContainingAssembly.Name); 2183Assert.Equal("Pia", ((TypeSymbol)args[0].ValueInternal).ContainingAssembly.Name); 2198Assert.Equal("Pia", ((TypeSymbol)args[0].ValueInternal).ContainingAssembly.Name); 2213Assert.Equal("Pia", ((TypeSymbol)args[0].ValueInternal).ContainingAssembly.Name); 2228Assert.Equal("Pia", ((TypeSymbol)args[0].ValueInternal).ContainingAssembly.Name); 2308Assert.Equal("LocalTypes2", ((TypeSymbol)args[0].ValueInternal).ContainingAssembly.Name); 2309Assert.Equal("LocalTypes2", ((TypeSymbol)args[1].ValueInternal).ContainingAssembly.Name); 2323Assert.Equal("LocalTypes2", ((TypeSymbol)args[0].ValueInternal).ContainingAssembly.Name); 2324Assert.Equal("LocalTypes2", ((TypeSymbol)args[1].ValueInternal).ContainingAssembly.Name); 2338Assert.Equal("LocalTypes2", ((TypeSymbol)args[0].ValueInternal).ContainingAssembly.Name); 2339Assert.Equal("LocalTypes2", ((TypeSymbol)args[1].ValueInternal).ContainingAssembly.Name); 2353Assert.Equal("LocalTypes2", ((TypeSymbol)args[0].ValueInternal).ContainingAssembly.Name); 2354Assert.Equal("LocalTypes2", ((TypeSymbol)args[1].ValueInternal).ContainingAssembly.Name); 2420Assert.Equal("Pia", ((TypeSymbol)args[0].ValueInternal).ContainingAssembly.Name); 2435Assert.Equal("Pia", ((TypeSymbol)args[0].ValueInternal).ContainingAssembly.Name); 2516Assert.Equal("Pia", ((TypeSymbol)args[0].ValueInternal).ContainingAssembly.Name); 2531Assert.Equal("Pia", ((TypeSymbol)args[0].ValueInternal).ContainingAssembly.Name); 2546Assert.Equal("Pia", ((TypeSymbol)args[0].ValueInternal).ContainingAssembly.Name); 2561Assert.Equal("Pia", ((TypeSymbol)args[0].ValueInternal).ContainingAssembly.Name);
Symbols\Retargeting\RetargetCustomAttributes.cs (4)
93m => ((MethodSymbol)m).ParameterCount == 1 && TypeSymbol.Equals(((MethodSymbol)m).GetParameterType(0), oldMsCorLib_systemType, TypeCompareKind.ConsiderEverything2)); 96m => ((MethodSymbol)m).ParameterCount == 1 && TypeSymbol.Equals(((MethodSymbol)m).GetParameterType(0), newMsCorLib_systemType, TypeCompareKind.ConsiderEverything2)); 128TestAttributeRetargeting(symbol.GetReturnTypeAttributes().Where(a => TypeSymbol.Equals(a.AttributeClass, newMsCorLib_debuggerTypeProxyAttributeType, TypeCompareKind.ConsiderEverything2))); 131Assert.Empty(symbol.GetReturnTypeAttributes().Where(a => TypeSymbol.Equals(a.AttributeClass, oldMsCorLib_debuggerTypeProxyAttributeType, TypeCompareKind.ConsiderEverything2)));
Symbols\Retargeting\RetargetingTests.cs (13)
278var i_a_v2 = compilation1_v2.GetTypeByMetadataName("I`1").Construct(ImmutableArray.Create<TypeSymbol>(a_v2)); 299var i_ct_v2 = compilation1_v2.GetTypeByMetadataName("I`1").Construct(ImmutableArray.Create<TypeSymbol>(c.TypeParameters[0])); 649var sourceTypeParameterConstraint = sourceTypeParameter.ConstraintTypes().Single(); 656var retargetingTypeParameterConstraint = retargetingTypeParameter.ConstraintTypes().Single(); 910static TypeSymbol getModifierTypeSymbol(ImmutableArray<CustomModifier> modifiers) 913void assert(bool consistent, TypeSymbol originalType, TypeSymbol retargetedType) 1240CheckTypes((TypeSymbol)a, (TypeSymbol)b); 1261public void CheckTypes(TypeSymbol a, TypeSymbol b) 1271CheckTypes((TypeSymbol)a, (TypeSymbol)b);
Symbols\Source\BaseClassTests.cs (1)
1340var garg = c.BaseType().TypeArguments()[0];
Symbols\Source\ClsComplianceTests.cs (1)
3174type = type.Construct(ArrayBuilder<TypeSymbol>.GetInstance(type.Arity, intType).ToImmutableAndFree());
Symbols\Source\CustomModifierCopyTests.cs (2)
2130var paramType = s.GetParameters().Single().Type; 2131var comparisonType = isArrayType ? ((ArrayTypeSymbol)paramType).ElementType : paramType;
Symbols\Source\DelegateTests.cs (1)
169var lastParameterType = beginInvoke.Parameters[invoke.Parameters.Length].Type;
Symbols\Source\EventTests.cs (1)
2262var baseEventType = baseEvent.Type;
Symbols\Source\FieldTests.cs (2)
66Assert.Equal<TypeSymbol>(a, sym.Type); 93Assert.Equal<TypeSymbol>(a, f.Type);
Symbols\Source\FileModifierTests.cs (1)
2464void verifyConstructedFileType(TypeSymbol type)
Symbols\Source\MethodTests.cs (3)
194var t2 = element.Type; 367var refP = p1.Type; 375var outP = p2.Type;
Symbols\Source\PropertyTests.cs (1)
1877var type = field.Type;
Symbols\Source\TypeMapTests.cs (4)
22private TypeSymbol TypeArg(TypeSymbol t) 84Assert.Equal(aebfc, DeepConstruct(c, ImmutableArray.Create<TypeSymbol>(e, f))); // exercise DeepConstruct 92private static NamedTypeSymbol DeepConstruct(NamedTypeSymbol type, ImmutableArray<TypeSymbol> typeArguments)
Symbols\SymbolDistinguisherTests.cs (4)
214var sourceType = sourceAssembly.GlobalNamespace.GetMember<NamedTypeSymbol>("C").GetMember<FieldSymbol>("F").Type; 215var referencedType = referencedAssembly.GlobalNamespace.GetMember<NamedTypeSymbol>("C").GetMember<FieldSymbol>("F").Type; 239var sourceType = sourceAssembly.GlobalNamespace.GetMember<NamedTypeSymbol>("S").GetMember<FieldSymbol>("F").Type; 240var referencedType = referencedAssembly.GlobalNamespace.GetMember<NamedTypeSymbol>("S").GetMember<FieldSymbol>("F").Type;
Symbols\SymbolErrorTests.cs (10)
16983var fieldType = fieldSym.Type; 17020var fieldType = fieldSym.Type; 17028Assert.True((TypeSymbol.Equals(classBinN1, (TypeSymbol)errorFieldType.CandidateSymbols[0], TypeCompareKind.ConsiderEverything2) && TypeSymbol.Equals(classBinN2, (TypeSymbol)errorFieldType.CandidateSymbols[1], TypeCompareKind.ConsiderEverything2)) || 17029(TypeSymbol.Equals(classBinN2, (TypeSymbol)errorFieldType.CandidateSymbols[0], TypeCompareKind.ConsiderEverything2) && TypeSymbol.Equals(classBinN1, (TypeSymbol)errorFieldType.CandidateSymbols[1], TypeCompareKind.ConsiderEverything2)),
Symbols\SymbolExtensionTests.cs (8)
103var anonymousType = model.GetSymbolInfo(identifier).Symbol.GetSymbol<TypeSymbol>(); 121var anonymousType = model.GetSymbolInfo(identifier).Symbol.GetSymbol<TypeSymbol>(); 139var anonymousType = model.GetSymbolInfo(identifier).Symbol.GetSymbol<TypeSymbol>(); 158var anonymousType = model.GetSymbolInfo(identifier).Symbol.GetSymbol<TypeSymbol>();
Symbols\TypedConstantTests.cs (4)
24private readonly TypeSymbol _intType; 25private readonly TypeSymbol _stringType; 26private readonly TypeSymbol _enumString1; 27private readonly TypeSymbol _enumString2;
Symbols\TypeResolutionTests.cs (6)
125var intSym = c.Assembly.GetTypeByReflectionType(typeof(int)); 129var strcmpSym = c.Assembly.GetTypeByReflectionType(typeof(StringComparison)); 133var arraySym = c.Assembly.GetTypeByReflectionType(typeof(List<int>[][,,])); 137var ptrSym = c.Assembly.GetTypeByReflectionType(typeof(char).MakePointerType().MakePointerType()); 142var nestedSym1 = c.Assembly.GetTypeByReflectionType(typeof(C<int, bool>.D.E<double, float>.F<byte>)); 151var err = c.Assembly.GetTypeByReflectionType(typeof(C<Process, bool>.D.E<double, float>.F<byte>));
Symbols\TypeTests.cs (26)
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; 1366private static TypeSymbol ExtractErrorGuess(NamedTypeSymbol typeSymbol) 1507var memType = (mem as FieldSymbol).Type; 1511var underType = memType.GetNullableUnderlyingType(); 1616var deleType = (mem as EventSymbol).Type; 1618var memType = deleType.DelegateInvokeMethod().ReturnType; 1635var underType = memType.GetNullableUnderlyingType(); 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; 2620var uniqueTypes = new HashSet<TypeSymbol>(); 2631var nestedTypes = typeMembers.OfType<TypeSymbol>().ToArray(); 2634foreach (var nestedType in nestedTypes)
Symbols\TypeUnificationTests.cs (67)
51var structType = @class.GetMember<FieldSymbol>("i").Type; 52var classType = @class.GetMember<FieldSymbol>("s").Type; 53var interfaceType = @class.GetMember<FieldSymbol>("f").Type; 54var enumType = @class.GetMember<FieldSymbol>("e").Type; 55var errorType = @class.GetMember<FieldSymbol>("err").Type; 56var voidType = @class.GetMember<MethodSymbol>("M").ReturnType; 58var arrayType1 = @class.GetMember<FieldSymbol>("a1").Type; 59var arrayType2 = @class.GetMember<FieldSymbol>("a2").Type; 60var arrayType3 = @class.GetMember<FieldSymbol>("a3").Type; 61var pointerType1 = @class.GetMember<FieldSymbol>("p1").Type; 62var pointerType2 = @class.GetMember<FieldSymbol>("p2").Type; 63var genericType1 = @class.GetMember<FieldSymbol>("g1").Type; 64var genericType2 = @class.GetMember<FieldSymbol>("g2").Type; 83foreach (var t1 in types) 85foreach (var t2 in types) 135var structType = @class.GetMember<FieldSymbol>("i").Type; 136var classType = @class.GetMember<FieldSymbol>("s").Type; 137var interfaceType = @class.GetMember<FieldSymbol>("f").Type; 138var errorType = @class.GetMember<FieldSymbol>("e").Type; 139var voidType = @class.GetMember<MethodSymbol>("M").ReturnType; 141var arrayType1 = @class.GetMember<FieldSymbol>("a1").Type; 142var arrayType2 = @class.GetMember<FieldSymbol>("a2").Type; 143var arrayType3 = @class.GetMember<FieldSymbol>("a3").Type; 144var pointerType1 = @class.GetMember<FieldSymbol>("p1").Type; 145var pointerType2 = @class.GetMember<FieldSymbol>("p2").Type; 146var functionPointerType = @class.GetMember<FieldSymbol>("fp1").Type; 147var genericType1 = @class.GetMember<FieldSymbol>("g1").Type; 148var genericType2 = @class.GetMember<FieldSymbol>("g2").Type; 150var typeParam1 = @class.GetMember<FieldSymbol>("tp1").Type; 151var typeParam2 = @class.GetMember<FieldSymbol>("tp2").Type; 166foreach (var t in substitutableTypes) 179foreach (var t in unsubstitutableTypes) 208var arrayType1 = @class.GetMember<FieldSymbol>("a1").Type; 209var arrayType2 = @class.GetMember<FieldSymbol>("a2").Type; 210var arrayType3 = @class.GetMember<FieldSymbol>("a3").Type; 212var genericType1 = @class.GetMember<FieldSymbol>("g1").Type; 213var genericType2 = @class.GetMember<FieldSymbol>("g2").Type; 214var genericType3 = @class.GetMember<FieldSymbol>("g3").Type; 250var type1 = @class.GetMember<FieldSymbol>("g1").Type; 251var type2 = @class.GetMember<FieldSymbol>("g2").Type; 252var type3 = @class.GetMember<FieldSymbol>("g3").Type; 253var type4 = @class.GetMember<FieldSymbol>("g4").Type; 254var type5 = @class.GetMember<FieldSymbol>("g5").Type; 255var type6 = @class.GetMember<FieldSymbol>("g6").Type; 256var type7 = @class.GetMember<FieldSymbol>("g7").Type; 260foreach (var t1 in types1To4) 262foreach (var t2 in types1To4) 301var type1 = @class.GetMember<FieldSymbol>("g1").Type; 302var type2 = @class.GetMember<FieldSymbol>("g2").Type; 303var type3 = @class.GetMember<FieldSymbol>("g3").Type; 304var type4 = @class.GetMember<FieldSymbol>("g4").Type; 305var type5 = @class.GetMember<FieldSymbol>("g5").Type; 306var type6 = @class.GetMember<FieldSymbol>("g6").Type; 310foreach (var t1 in types1To4) 312foreach (var t2 in types1To4) 338var containedType = @class.GetMember<FieldSymbol>("contained").Type; 339var containingType = @class.GetMember<FieldSymbol>("containing").Type; 371var type1 = @class.GetMember<FieldSymbol>("t1").Type; 372var type2 = @class.GetMember<FieldSymbol>("t2").Type; 373var type3 = @class.GetMember<FieldSymbol>("t3").Type; 374var type4 = @class.GetMember<FieldSymbol>("t4").Type; 375var type5 = @class.GetMember<FieldSymbol>("t5").Type; 376var type6 = @class.GetMember<FieldSymbol>("t6").Type; 424private static void AssertCanUnify(TypeSymbol t1, TypeSymbol t2) 430private static void AssertCannotUnify(TypeSymbol t1, TypeSymbol t2)
Microsoft.CodeAnalysis.CSharp.Test.Utilities (43)
CSharpTestBase.cs (2)
2529private static ImmutableArray<ILVisualizer.LocalInfo> ToLocalDefinitions(ImmutableArray<LocalInfo<TypeSymbol>> localInfos, ILBuilder builder) 2541var typeRef = localInfos[i].Type;
Extensions.cs (19)
366return @this.GetAttributes().Where(a => TypeSymbol.Equals(a.AttributeClass, c, TypeCompareKind.ConsiderEverything2)); 381return @this.GetAttributes().Where(a => TypeSymbol.Equals(a.AttributeClass, c, TypeCompareKind.ConsiderEverything2)).First(); 431var typeSym = arg.ValueInternal as TypeSymbol; 437var expTypeSym = expected as TypeSymbol; 469private static bool IsEqual(TypeSymbol typeSym, Type expType) 572var propertyOrEventType = propertyOrEvent.GetTypeOrReturnType().Type; 669public static NamedTypeSymbol BaseType(this TypeSymbol symbol) 674public static ImmutableArray<NamedTypeSymbol> Interfaces(this TypeSymbol symbol) 679public static ImmutableArray<NamedTypeSymbol> AllInterfaces(this TypeSymbol symbol) 684public static ImmutableArray<TypeSymbol> TypeArguments(this NamedTypeSymbol symbol) 689public static ImmutableArray<TypeSymbol> ConstraintTypes(this TypeParameterSymbol symbol) 787ImmutableArray<TypeSymbol> elementTypes, 795public static INamedTypeSymbol Construct(this INamedTypeSymbol definition, params TypeSymbol[] typeArguments) 887public static Conversion ClassifyConversionFromType(this ConversionsBase conversions, TypeSymbol source, TypeSymbol destination, ref HashSet<DiagnosticInfo> useSiteDiagnostics, bool forCast = false) 910public static Conversion ClassifyConversionFromExpression(this Conversions conversions, BoundExpression sourceExpression, TypeSymbol destination, ref HashSet<DiagnosticInfo> useSiteDiagnostics, bool forCast = false) 924ConsList<TypeSymbol> basesBeingResolved,
FunctionPointerUtilities.cs (13)
271public static void VerifyFunctionPointerSymbol(TypeSymbol type, CallingConvention expectedConvention, (RefKind RefKind, Action<TypeSymbol> TypeVerifier) returnVerifier, params (RefKind RefKind, Action<TypeSymbol> TypeVerifier)[] argumentVerifiers) 332public static Action<TypeSymbol> IsVoidType() => typeSymbol => Assert.True(typeSymbol.IsVoidType()); 334public static Action<TypeSymbol> IsSpecialType(SpecialType specialType) 337public static Action<TypeSymbol> IsTypeName(string typeName) 340public static Action<TypeSymbol> IsArrayType(Action<TypeSymbol> arrayTypeVerifier) 347public static Action<TypeSymbol> IsUnsupportedType() 350public static Action<TypeSymbol> IsFunctionPointerTypeSymbol(CallingConvention callingConvention, (RefKind, Action<TypeSymbol>) returnVerifier, params (RefKind, Action<TypeSymbol>)[] argumentVerifiers) 353public static Action<TypeSymbol> IsErrorType()
NativeIntegerAttributesVisitor.cs (1)
37protected override bool TypeRequiresAttribute(TypeSymbol? type) => type?.ContainsNativeIntegerWrapperType() == true;
NullableAttributesVisitor.cs (1)
119protected override bool TypeRequiresAttribute(TypeSymbol? type)
RequiredMemberAttributesVisitor.cs (1)
76protected override bool TypeRequiresAttribute(TypeSymbol? type)
TestAttributesVisitor.cs (3)
140var type = (symbol as TypeSymbol) ?? symbol.GetTypeOrReturnType().Type; 202protected abstract bool TypeRequiresAttribute(TypeSymbol? type);
UsesIsNullableVisitor.cs (3)
141private bool AddIfUsesIsNullable(Symbol symbol, TypeSymbol type, ConsList<TypeParameterSymbol> inProgress) 157var typeSymbol = type.Type; 162private bool UsesIsNullable(TypeSymbol type, ConsList<TypeParameterSymbol> inProgress)
Microsoft.CodeAnalysis.CSharp.WinRT.UnitTests (8)
Metadata\WinMdDumpTest.cs (1)
416private static void AppendSignatureType(StringBuilder result, TypeSymbol type, RefKind refKind)
Metadata\WinMdEventTests.cs (3)
2752var ert = ns1.GetMember<TypeSymbol>("EventRegistrationToken"); 3606var eventType = @event.Type;
Metadata\WinMdMetadataTests.cs (4)
133var clas = wns2.GetMember<TypeSymbol>("Colors"); 176var clas = wns3.GetMember<TypeSymbol>("DecimalFormatter");