7 types derived from TypeSymbol
Microsoft.CodeAnalysis.CSharp (7)
Symbols\ArrayTypeSymbol.cs (1)
19internal abstract partial class ArrayTypeSymbol : TypeSymbol
Symbols\DynamicTypeSymbol.cs (1)
14internal sealed partial class DynamicTypeSymbol : TypeSymbol
Symbols\FunctionPointers\FunctionPointerTypeSymbol.cs (1)
16internal sealed partial class FunctionPointerTypeSymbol : TypeSymbol
Symbols\FunctionTypeSymbol.cs (1)
35internal sealed class FunctionTypeSymbol : TypeSymbol
Symbols\NamedTypeSymbol.cs (1)
25internal abstract partial class NamedTypeSymbol : TypeSymbol, INamedTypeSymbolInternal
Symbols\PointerTypeSymbol.cs (1)
18internal sealed partial class PointerTypeSymbol : TypeSymbol
Symbols\TypeParameterSymbol.cs (1)
20internal abstract partial class TypeParameterSymbol : TypeSymbol, ITypeParameterSymbolInternal
5131 references to TypeSymbol
Microsoft.CodeAnalysis.CSharp (4362)
Binder\Binder.cs (4)
772TypeSymbol? throughTypeOpt = null) 780TypeSymbol throughTypeOpt, 783ConsList<TypeSymbol>? basesBeingResolved = null) 853TypeSymbol getType()
Binder\Binder.IdentifierUsedAsValueFinder.cs (2)
210TypeSymbol type, 252TypeSymbol type,
Binder\Binder.NamespaceOrTypeOrAliasSymbolWithAnnotations.cs (3)
30Debug.Assert(!(symbol is TypeSymbol)); 58var type = symbol as TypeSymbol;
Binder\Binder.QueryUnboundLambdaState.cs (1)
58public override void GenerateAnonymousFunctionConversionError(BindingDiagnosticBag diagnostics, TypeSymbol targetType)
Binder\Binder.ValueChecks.cs (8)
777TypeSymbol.Equals( 1210? TypeSymbol.Equals(fieldSymbol.ContainingType, containing.ContainingType, TypeCompareKind.AllIgnoreOptions) 1212: TypeSymbol.Equals(fieldSymbol.ContainingType.OriginalDefinition, containing.ContainingType.OriginalDefinition, TypeCompareKind.AllIgnoreOptions))) 1543var accessThroughType = this.GetAccessThroughType(receiver); 1592var accessThroughType = this.GetAccessThroughType(receiver); 2447var receiverType = receiverOpt?.Type; 4610var type = expression.Type; 4787if (!TypeSymbol.Equals(field.ContainingType, containingSymbol.ContainingSymbol as NamedTypeSymbol, TypeCompareKind.AllIgnoreOptions))
Binder\Binder.WithQueryLambdaParametersBinder.cs (1)
105LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\Binder_AnonymousTypes.cs (3)
88TypeSymbol fieldType = GetAnonymousTypeFieldType(boundExpressions[i], fieldInitializer, diagnostics, ref hasError); 211private TypeSymbol GetAnonymousTypeFieldType(BoundExpression expression, CSharpSyntaxNode errorSyntax, BindingDiagnosticBag diagnostics, ref bool hasError) 214TypeSymbol? expressionType = expression.Type;
Binder\Binder_Attributes.cs (11)
529TypeSymbol namedArgumentType; 589private TypeSymbol BindNamedAttributeArgumentType(AttributeArgumentSyntax namedArgument, Symbol namedArgumentNameSymbol, NamedTypeSymbol attributeType, BindingDiagnosticBag diagnostics) 593return (TypeSymbol)namedArgumentNameSymbol; 602TypeSymbol? namedArgumentType = null; 731!((TypeSymbol)reorderedArgument.TypeInternal!).Equals(parameter.Type, TypeCompareKind.AllIgnoreOptions)) 826Conversion conversion = conversions.ClassifyBuiltInConversion((TypeSymbol)argument.TypeInternal, parameter.Type, isChecked: false, ref discardedUseSiteInfo); 982var type = node.Type; 984var operandType = operand.Type; 1002var typeOfArgument = (TypeSymbol?)node.SourceType.Type; 1080var type = node.Type;
Binder\Binder_Await.cs (9)
40TypeSymbol awaitExpressionType = info.GetResult?.ReturnType ?? (hasErrors ? CreateErrorType() : Compilation.DynamicType); 84var type = expression.Type; 262Debug.Assert(TypeSymbol.Equals(expression.Type, getAwaiterArgument.Type, TypeCompareKind.ConsiderEverything)); 286TypeSymbol awaiterType = getAwaiter.Type!; 367private bool GetIsCompletedProperty(TypeSymbol awaiterType, SyntaxNode node, TypeSymbol awaitedExpressionType, BindingDiagnosticBag diagnostics, [NotNullWhen(true)] out PropertySymbol? isCompletedProperty) 410private bool AwaiterImplementsINotifyCompletion(TypeSymbol awaiterType, SyntaxNode node, BindingDiagnosticBag diagnostics) 434private bool GetGetResultMethod(BoundExpression awaiterExpression, SyntaxNode node, TypeSymbol awaitedExpressionType, BindingDiagnosticBag diagnostics, out MethodSymbol? getResultMethod, [NotNullWhen(true)] out BoundExpression? getAwaiterGetResultCall) 436var awaiterType = awaiterExpression.Type;
Binder\Binder_Constraints.cs (4)
420var possibleFileType = containingSymbol switch 422TypeSymbol typeSymbol => typeSymbol, 424MethodSymbol method => (TypeSymbol)method.ContainingSymbol, 520TypeSymbol type = typeWithAnnotations.Type;
Binder\Binder_Conversions.cs (36)
20TypeSymbol destination, 33TypeSymbol destination, 45TypeSymbol destination, 58TypeSymbol destination, 99TypeSymbol destination, 213TypeSymbol? type = source.Type; 342SyntaxNode syntax, BoundUnconvertedObjectCreationExpression node, Conversion conversion, bool isCast, TypeSymbol destination, 376TypeSymbol type, AnalyzedArguments arguments, BindingDiagnosticBag diagnostics) 412TypeSymbol destination, 451private BoundExpression ConvertSwitchExpression(BoundUnconvertedSwitchExpression source, TypeSymbol destination, Conversion? conversionIfTargetTyped, BindingDiagnosticBag diagnostics, bool hasErrors = false) 483TypeSymbol destination, 549TypeSymbol conversionParameterType = conversion.BestUserDefinedConversionAnalysis.Operator.GetParameterType(0); 553!TypeSymbol.Equals(conversion.BestUserDefinedConversionAnalysis.FromType, conversionParameterType, TypeCompareKind.ConsiderEverything2)) 569TypeSymbol conversionReturnType = conversion.BestUserDefinedConversionAnalysis.Operator.ReturnType; 570TypeSymbol conversionToType = conversion.BestUserDefinedConversionAnalysis.ToType; 574!TypeSymbol.Equals(conversionToType, conversionReturnType, TypeCompareKind.ConsiderEverything2)) 589if (conversionToType.IsNullableType() && TypeSymbol.Equals(conversionToType.GetNullableUnderlyingType(), conversionReturnType, TypeCompareKind.ConsiderEverything2)) 645private BoundExpression CreateFunctionTypeConversion(SyntaxNode syntax, BoundExpression source, Conversion conversion, bool isCast, ConversionGroup? conversionGroup, TypeSymbol destination, BindingDiagnosticBag diagnostics) 693private BoundExpression CreateAnonymousFunctionConversion(SyntaxNode syntax, BoundExpression source, Conversion conversion, bool isCast, ConversionGroup? conversionGroup, TypeSymbol destination, BindingDiagnosticBag diagnostics) 720private BoundExpression CreateMethodGroupConversion(SyntaxNode syntax, BoundExpression source, Conversion conversion, bool isCast, ConversionGroup? conversionGroup, TypeSymbol destination, BindingDiagnosticBag diagnostics) 739private static void CheckValidScopedMethodConversion(SyntaxNode syntax, MethodSymbol lambdaOrMethod, TypeSymbol targetType, bool invokedAsExtensionMethod, BindingDiagnosticBag diagnostics) 777private static void CheckLambdaConversion(LambdaSymbol lambdaSymbol, TypeSymbol targetType, BindingDiagnosticBag diagnostics) 865private BoundExpression CreateStackAllocConversion(SyntaxNode syntax, BoundExpression source, Conversion conversion, bool isCast, ConversionGroup? conversionGroup, TypeSymbol destination, BindingDiagnosticBag diagnostics) 870var elementType = boundStackAlloc.ElementType; 871TypeSymbol stackAllocType; 893private BoundExpression CreateTupleLiteralConversion(SyntaxNode syntax, BoundTupleLiteral sourceTuple, Conversion conversion, bool isCast, ConversionGroup? conversionGroup, TypeSymbol destination, BindingDiagnosticBag diagnostics) 899var destinationWithoutNullable = destination; 969if (!TypeSymbol.Equals(sourceTuple.Type, destination, TypeCompareKind.ConsiderEverything2)) 1274internal bool MethodIsCompatibleWithDelegateOrFunctionPointer(BoundExpression? receiverOpt, bool isExtensionMethod, MethodSymbol method, TypeSymbol delegateType, Location errorLocation, BindingDiagnosticBag diagnostics) 1344var methodReturnType = method.ReturnType; 1345var delegateReturnType = delegateOrFuncPtrMethod.ReturnType; 1383static bool hasConversion(TypeKind targetKind, Conversions conversions, TypeSymbol source, TypeSymbol destination, 1439TypeSymbol delegateOrFuncPtrType, 1534TypeSymbol destination, 1635TypeSymbol destination,
Binder\Binder_Crefs.cs (7)
299TypeSymbol returnType = BindCrefParameterOrReturnType(syntax.Type, syntax, diagnostics); 303symbol.Kind != SymbolKind.Method || TypeSymbol.Equals(((MethodSymbol)symbol).ReturnType, returnType, TypeCompareKind.ConsiderEverything2), returnType); 421if (containerType.Name == memberName && (hasParameterList || containerType.Arity == 0 || !TypeSymbol.Equals(this.ContainingType, containerType.OriginalDefinition, TypeCompareKind.ConsiderEverything2))) 552private static bool ContainsNestedTypeOfUnconstructedGenericType(TypeSymbol type) 938TypeSymbol type = BindCrefParameterOrReturnType(parameter.Type, (MemberCrefSyntax)parameterListSyntax.Parent, diagnostics); 949private TypeSymbol BindCrefParameterOrReturnType(TypeSyntax typeSyntax, MemberCrefSyntax memberCrefSyntax, BindingDiagnosticBag diagnostics) 969TypeSymbol type = parameterOrReturnTypeBinder.BindType(typeSyntax, localDiagnostics).Type;
Binder\Binder_Deconstruct.cs (11)
128var type = boundRHS.Type ?? voidType; 159TypeSymbol returnType = hasErrors ? CreateErrorType() : lhsTuple.Type!; 220TypeSymbol? mergedTupleType = MakeMergedTupleType(checkedVariables, (BoundTupleLiteral)boundRHS, syntax, hadErrors ? null : diagnostics); 243TypeSymbol type, 251ImmutableArray<TypeSymbol> tupleOrDeconstructedTypes; 349private void SetInferredTypes(ArrayBuilder<DeconstructionVariable> variables, ImmutableArray<TypeSymbol> foundTypes, BindingDiagnosticBag diagnostics) 367private BoundExpression SetInferredType(BoundExpression expression, TypeSymbol type, BindingDiagnosticBag diagnostics) 471private TypeSymbol? MakeMergedTupleType(ArrayBuilder<DeconstructionVariable> lhsVariables, BoundTupleLiteral rhsLiteral, CSharpSyntaxNode syntax, BindingDiagnosticBag? diagnostics) 481TypeSymbol? mergedType = element.Type; 855var type = declTypeWithAnnotations.Type; 948Debug.Assert(TypeSymbol.Equals(declTypeWithAnnotations.Type, fieldType.Type, TypeCompareKind.ConsiderEverything2));
Binder\Binder_Expressions.cs (106)
196TypeSymbol resultType = expr.Type; 261internal BoundExpression BindToTypeForErrorRecovery(BoundExpression expression, TypeSymbol type = null) 289var commonType = expr.Type; 303TypeSymbol type = op.Type; 448TypeSymbol varType, 544TypeSymbol exprType = expr.Type; 807internal virtual BoundSwitchExpressionArm BindSwitchExpressionArm(SwitchExpressionArmSyntax node, TypeSymbol switchGoverningType, BindingDiagnosticBag diagnostics) 1184TypeSymbol typedReferenceType = this.Compilation.GetSpecialType(SpecialType.System_TypedReference); 1208TypeSymbol typedReferenceType = GetSpecialType(SpecialType.System_TypedReference, diagnostics, node); 1232TypeSymbol typedReferenceType = this.Compilation.GetSpecialType(SpecialType.System_TypedReference); 1233TypeSymbol typeType = this.GetWellKnownType(WellKnownType.System_Type, diagnostics, node); 1274TypeSymbol runtimeArgumentHandleType = GetSpecialType(SpecialType.System_RuntimeArgumentHandle, diagnostics, node); 1338TypeSymbol type = typeWithAnnotations.Type; 1366var type = typeWithAnnotations.Type; 1391TypeSymbol type = typeWithAnnotations.Type; 1403internal static bool CheckManagedAddr(CSharpCompilation compilation, TypeSymbol type, Location location, BindingDiagnosticBag diagnostics, bool errorForManaged = false) 1413internal static bool CheckManagedAddr(CSharpCompilation compilation, TypeSymbol type, ManagedKind managedKind, Location location, BindingDiagnosticBag diagnostics, bool errorForManaged = false) 1437internal static ConstantValue GetConstantSizeOf(TypeSymbol type) 1448TypeSymbol type = typeWithAnnotations.Type; 1777private bool IsBadLocalOrParameterCapture(Symbol symbol, TypeSymbol type, RefKind refKind) 1807TypeSymbol type; 1974return new BoundTypeExpression(node, null, (TypeSymbol)symbol, hasErrors: isError); 2135TypeSymbol hostObjectType = Compilation.GetHostObjectTypeSymbol(); 2240var type = symbol as TypeSymbol; 2296TypeSymbol baseType = this.ContainingType is null ? null : this.ContainingType.BaseTypeNoUseSiteDiagnostics; 2328TypeSymbol targetType = targetTypeWithAnnotations.Type; 2334!TypeSymbol.Equals(targetType.GetNullableUnderlyingType(), operand.Type, TypeCompareKind.ConsiderEverything2)) 2352TypeSymbol intType = GetSpecialType(SpecialType.System_Int32, diagnostics, node); 2353TypeSymbol indexType = GetWellKnownType(WellKnownType.System_Index, diagnostics, node); 2389TypeSymbol rangeType = GetWellKnownType(WellKnownType.System_Range, diagnostics, node); 2460TypeSymbol indexType = GetWellKnownType(WellKnownType.System_Index, diagnostics, operand); 2490TypeSymbol targetType = targetTypeWithAnnotations.Type; 2511TypeSymbol targetType) 2643var targetElementType = targetElementTypesWithAnnotations[i].Type; 2914var type = declType.Type; 3012TypeSymbol fieldType = expressionVariableField.GetFieldType(this.FieldsBeingBound).Type; 3026internal static void CheckRestrictedTypeInAsyncMethod(Symbol containingSymbol, TypeSymbol type, BindingDiagnosticBag diagnostics, SyntaxNode syntax, bool forUsingExpression = false) 3414TypeSymbol bestType = BestTypeInferrer.InferBestType(boundInitializerExpressions, this.Conversions, ref useSiteInfo, out _); 3441TypeSymbol bestType = BestTypeInferrer.InferBestType(boundInitializerExpressions, this.Conversions, ref useSiteInfo, out _); 3569TypeSymbol elemType = type.ElementType; 3807TypeSymbol type = GetStackAllocType(node, elementType, diagnostics, out bool hasErrors); 3890private TypeSymbol GetStackAllocType(SyntaxNode node, TypeWithAnnotations elementTypeWithAnnotations, BindingDiagnosticBag diagnostics, out bool hasErrors) 3950TypeSymbol type, 3951TypeSymbol elementType, 4130TypeSymbol constructorReturnType = constructor.ReturnType; 4432var type = typeWithAnnotations.Type; 4433var originalType = type; 4659private BoundExpression BindClassCreationExpression(ObjectCreationExpressionSyntax node, NamedTypeSymbol type, string typeName, BindingDiagnosticBag diagnostics, TypeSymbol initializerType = null) 4732private BoundExpression MakeBadExpressionForObjectCreation(ObjectCreationExpressionSyntax node, TypeSymbol type, AnalyzedArguments analyzedArguments, BindingDiagnosticBag diagnostics, bool wasCompilerGenerated = false) 4738private BoundExpression MakeBadExpressionForObjectCreation(SyntaxNode node, TypeSymbol type, AnalyzedArguments analyzedArguments, InitializerExpressionSyntax? initializerOpt, SyntaxNode? typeSyntax, BindingDiagnosticBag diagnostics, bool wasCompilerGenerated = false) 4759TypeSymbol type, 4790TypeSymbol type, 4812TypeSymbol initializerType, 4920var initializerType = implicitReceiver.Type; 5307TypeSymbol initializerType, 5361private bool CollectionInitializerTypeImplementsIEnumerable(TypeSymbol initializerType, CSharpSyntaxNode node, BindingDiagnosticBag diagnostics) 5373TypeSymbol collectionsIEnumerableType = this.GetSpecialType(SpecialType.System_Collections_IEnumerable, diagnostics, node); 5392TypeSymbol initializerType, 5639TypeSymbol initializerTypeOpt = null, 5843Debug.Assert(TypeSymbol.Equals(interfaceType.ComImportCoClass, coClassType, TypeCompareKind.ConsiderEverything2)); 6241TypeSymbol type = null; 6327TypeSymbol pointedAtType; 6404var leftType = boundValue.Type; 6412if (TypeSymbol.Equals(boundType.Type, leftType, TypeCompareKind.AllIgnoreOptions)) 6437private bool IsPotentialColorColorReceiver(IdentifierNameSyntax id, TypeSymbol type) 6442TypeSymbol.Equals(BindNamespaceOrType(id, BindingDiagnosticBag.Discarded).Type, type, TypeCompareKind.AllIgnoreOptions); 6546TypeSymbol leftType = boundLeft.Type; 6761TypeSymbol leftType, 6868var leftType = boundLeft.Type; 6935private void LookupInstanceMember(LookupResult lookupResult, TypeSymbol leftType, bool leftIsBaseReference, string rightName, int rightArity, bool invoked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 7009private bool WouldUsingSystemFindExtension(TypeSymbol receiver, string methodName) 7021private bool ImplementsWinRTAsyncInterface(TypeSymbol type) 7026private bool IsWinRTAsyncInterface(TypeSymbol type) 7035TypeSymbol.Equals(namedType, Compilation.GetWellKnownType(WellKnownType.Windows_Foundation_IAsyncAction), TypeCompareKind.ConsiderEverything2) || 7036TypeSymbol.Equals(namedType, Compilation.GetWellKnownType(WellKnownType.Windows_Foundation_IAsyncActionWithProgress_T), TypeCompareKind.ConsiderEverything2) || 7037TypeSymbol.Equals(namedType, Compilation.GetWellKnownType(WellKnownType.Windows_Foundation_IAsyncOperation_T), TypeCompareKind.ConsiderEverything2) || 7038TypeSymbol.Equals(namedType, Compilation.GetWellKnownType(WellKnownType.Windows_Foundation_IAsyncOperationWithProgress_T2), TypeCompareKind.ConsiderEverything2); 7097private TypeSymbol GetNonMethodMemberType(Symbol symbolOpt) 7099TypeSymbol resultType = null; 7277TypeSymbol returnType, 7464TypeSymbol receiverType = receiver.Type; 7532TypeSymbol fieldType = fieldSymbol.GetFieldType(this.FieldsBeingBound).Type; 7615Debug.Assert(symbol is not TypeSymbol); 7637if (!symbol.IsStatic && !(symbol is TypeSymbol) && 7943var exprType = expr.Type; 8024TypeSymbol resultType = indexOrRangeWellknownType == WellKnownType.System_Range 8120TypeSymbol type = GetWellKnownType(wellKnownType, ref useSiteInfo); 8142TypeSymbol type = GetSpecialType(specialType, attemptDiagnostics, node); 8155private BoundExpression TryImplicitConversionToArrayIndex(BoundExpression expr, TypeSymbol targetType, SyntaxNode node, BindingDiagnosticBag diagnostics) 8199TypeSymbol pointedAtType = pointerType.PointedAtType; 8542var argType = argument.Type; 8544TypeSymbol.Equals(argType, Compilation.GetWellKnownType(WellKnownType.System_Index), TypeCompareKind.ConsiderEverything) ? ThreeState.True : 8545TypeSymbol.Equals(argType, Compilation.GetWellKnownType(WellKnownType.System_Range), TypeCompareKind.ConsiderEverything) ? ThreeState.False : 8799TypeSymbol receiverType, 8850TypeSymbol propertyType = GetCommonTypeOrReturnType(propertyGroup) ?? CreateErrorType(); 8878TypeSymbol returnType = null, 8898TypeSymbol returnType = null, 8924TypeSymbol returnType, 8952TypeSymbol returnType = null, 9024TypeSymbol returnType = null, 9294internal static bool ReportDelegateInvokeUseSiteDiagnostic(BindingDiagnosticBag diagnostics, TypeSymbol possibleDelegateType, 9348var receiverType = receiver.Type; 9357var accessType = access.Type; 9488var receiverType = receiver.Type; 9519var 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)
373Func<BoundUnconvertedInterpolatedString, int, (ImmutableArray<ImmutableArray<BoundExpression>>, TypeSymbol), BoundExpression> interpolationFactory = 375Func<BoundBinaryOperator, BoundExpression, BoundExpression, (ImmutableArray<ImmutableArray<BoundExpression>>, TypeSymbol), BoundExpression> binaryOperatorFactory = 382static BoundInterpolatedString createInterpolation(BoundUnconvertedInterpolatedString expression, int i, (ImmutableArray<ImmutableArray<BoundExpression>> AppendCalls, TypeSymbol _) arg) 394static BoundBinaryOperator createBinaryOperator(BoundBinaryOperator original, BoundExpression left, BoundExpression right, (ImmutableArray<ImmutableArray<BoundExpression>> _, TypeSymbol @string) arg) 528TypeSymbol objectType = GetSpecialType(SpecialType.System_Object, diagnostics, syntax); 956TypeSymbol placeholderType;
Binder\Binder_Invocation.cs (21)
196TypeSymbol objType = GetSpecialType(SpecialType.System_Object, diagnostics, node); 886if (call.ReceiverOpt.Type.IsRestrictedType() && !TypeSymbol.Equals(call.Method.ContainingType, call.ReceiverOpt.Type, TypeCompareKind.ConsiderEverything2)) 1013var returnType = methodResult.Member.ReturnType; 1166var parameterType = parameter.Type; 1348TypeSymbol parameterType = parameter.Type; 1418TypeSymbol constantType = Compilation.GetSpecialType(defaultConstantValue.SpecialType); 1480TypeSymbol.Equals(containingMethod.ContainingType, method.ContainingType, TypeCompareKind.ConsiderEverything) && 1620var returnType = GetCommonTypeOrReturnType(methods) ?? new ExtendedErrorTypeSymbol(this.Compilation, string.Empty, arity: 0, errorInfo: null); 1621var methodContainer = (object)receiver != null && (object)receiver.Type != null 1701var parameterType = GetCorrespondingParameterType(analyzedArguments, i, parameterList); 1722var candidateType = getCorrespondingParameterType(i); 1770TypeSymbol getCorrespondingParameterType(int i) 1773TypeSymbol candidateType = null; 1776var parameterType = GetCorrespondingParameterType(analyzedArguments, i, parameterList); 1804private static TypeSymbol GetCorrespondingParameterType(AnalyzedArguments analyzedArguments, int i, ImmutableArray<ParameterSymbol> parameterList) 1836TypeSymbol returnType = new ExtendedErrorTypeSymbol(this.Compilation, string.Empty, arity: 0, errorInfo: null); 1837var methodContainer = expr.Type ?? this.ContainingType; 1848private static TypeSymbol GetCommonTypeOrReturnType<TMember>(ImmutableArray<TMember> members) 1851TypeSymbol type = null; 1854TypeSymbol returnType = members[i].GetTypeOrReturnType().Type; 1859else if (!TypeSymbol.Equals(type, returnType, TypeCompareKind.ConsiderEverything2))
Binder\Binder_Lambda.cs (1)
294var type = returnType.Type;
Binder\Binder_Lookup.cs (80)
32ConsList<TypeSymbol> basesBeingResolved, 61private Binder LookupSymbolsWithFallback(LookupResult result, string name, int arity, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, ConsList<TypeSymbol> basesBeingResolved = null, LookupOptions options = LookupOptions.Default) 82LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 116LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 130ConsList<TypeSymbol> basesBeingResolved, 148private void LookupMembersWithFallback(LookupResult result, NamespaceOrTypeSymbol nsOrType, string name, int arity, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, ConsList<TypeSymbol> basesBeingResolved = null, LookupOptions options = LookupOptions.Default) 164protected void LookupMembersInternal(LookupResult result, NamespaceOrTypeSymbol nsOrType, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 175this.LookupMembersInType(result, (TypeSymbol)nsOrType, name, arity, basesBeingResolved, options, originalBinder, diagnose, ref useSiteInfo); 180protected void LookupMembersInType(LookupResult result, TypeSymbol type, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 220private void LookupMembersInErrorType(LookupResult result, ErrorTypeSymbol errorType, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 229TypeSymbol candidateType = errorType.CandidateSymbols.First() as TypeSymbol; 255protected void LookupMembersInSubmissions(LookupResult result, TypeSymbol submissionClass, CompilationUnitSyntax declarationSyntax, bool inUsings, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, 404ConsList<TypeSymbol> basesBeingResolved, 492ConsList<TypeSymbol> basesBeingResolved, 763protected static void LookupMembersWithoutInheritance(LookupResult result, TypeSymbol type, string name, int arity, 764LookupOptions options, Binder originalBinder, TypeSymbol accessThroughType, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, ConsList<TypeSymbol> basesBeingResolved) 780TypeSymbol type, 783ConsList<TypeSymbol> basesBeingResolved, 795TypeSymbol type, 798ConsList<TypeSymbol> basesBeingResolved, 801TypeSymbol accessThroughType, 808TypeSymbol currentType = type; 976TypeSymbol.Equals(iFaceOriginal, idictSymbol, TypeCompareKind.ConsiderEverything2) || 979TypeSymbol.Equals(iFaceOriginal, iroDictSymbol, TypeCompareKind.ConsiderEverything2) || 981TypeSymbol.Equals(iFaceOriginal, iListSymbol, TypeCompareKind.ConsiderEverything2) || 982TypeSymbol.Equals(iFaceOriginal, iCollectionSymbol, TypeCompareKind.ConsiderEverything2) || 983TypeSymbol.Equals(iFaceOriginal, inccSymbol, TypeCompareKind.ConsiderEverything2) || 984TypeSymbol.Equals(iFaceOriginal, inpcSymbol, TypeCompareKind.ConsiderEverything2); 988private static Symbol GetNearestOtherSymbol(ConsList<TypeSymbol> list, TypeSymbol type) 990TypeSymbol other = type; 992for (; list != null && list != ConsList<TypeSymbol>.Empty; list = list.Tail) 994if (TypeSymbol.Equals(list.Head, type.OriginalDefinition, TypeCompareKind.ConsiderEverything2)) 996if (TypeSymbol.Equals(other, type, TypeCompareKind.ConsiderEverything2) && list.Tail != null && list.Tail != ConsList<TypeSymbol>.Empty) 1017ConsList<TypeSymbol> basesBeingResolved, 1020TypeSymbol accessThroughType, 1029((options & LookupOptions.NamespacesOrTypesOnly) == 0 || !(current.IsSingleViable && TypeSymbol.Equals(current.SingleSymbolOrDefault.ContainingType, type, TypeCompareKind.AllIgnoreOptions)))) // The nested type will shadow everything from bases 1036private static ImmutableArray<NamedTypeSymbol> GetBaseInterfaces(NamedTypeSymbol type, ConsList<TypeSymbol> basesBeingResolved, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1089static void addAllInterfaces(NamedTypeSymbol @interface, HashSet<NamedTypeSymbol> visited, ArrayBuilder<NamedTypeSymbol> result, ConsList<TypeSymbol> basesBeingResolved, ConsList<NamedTypeSymbol> cycleGuard) 1120ConsList<TypeSymbol> basesBeingResolved, 1123TypeSymbol accessThroughType, 1150private void LookupMembersInInterface(LookupResult current, NamedTypeSymbol type, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1168private void LookupMembersInTypeParameter(LookupResult current, TypeParameterSymbol typeParameter, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1187private static bool IsDerivedType(NamedTypeSymbol baseType, NamedTypeSymbol derivedType, ConsList<TypeSymbol> basesBeingResolved, CSharpCompilation compilation, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1189Debug.Assert(!TypeSymbol.Equals(baseType, derivedType, TypeCompareKind.ConsiderEverything2)); 1195if (TypeSymbol.Equals(b, baseType, TypeCompareKind.ConsiderEverything2)) return true; 1208if (TypeSymbol.Equals(b, baseType, TypeCompareKind.ConsiderEverything2)) 1224private void MergeHidingLookupResults(LookupResult resultHiding, LookupResult resultHidden, ConsList<TypeSymbol> basesBeingResolved, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1295if ((options & LookupOptions.NamespacesOrTypesOnly) != 0 && nsOrType is TypeSymbol) 1319if ((options & LookupOptions.NamespacesOrTypesOnly) != 0 && nsOrType is TypeSymbol) 1385internal SingleLookupResult CheckViability(Symbol symbol, int arity, LookupOptions options, TypeSymbol accessThroughType, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, ConsList<TypeSymbol> basesBeingResolved = null) 1412(unwrappedSymbol is not TypeSymbol && IsInstance(unwrappedSymbol) || !(unwrappedSymbol.IsAbstract || unwrappedSymbol.IsVirtual))) 1579internal bool CanAddLookupSymbolInfo(Symbol symbol, LookupOptions options, LookupSymbolsInfo info, TypeSymbol accessThroughType, AliasSymbol aliasSymbol = null) 1631private static TypeSymbol RefineAccessThroughType(LookupOptions options, TypeSymbol accessThroughType) 1667internal bool IsAccessible(Symbol symbol, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, TypeSymbol accessThroughType = null, ConsList<TypeSymbol> basesBeingResolved = null) 1686internal bool IsAccessible(Symbol symbol, TypeSymbol accessThroughType, out bool failedThroughTypeCheck, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, ConsList<TypeSymbol> basesBeingResolved = null) 1698/// Should only be called by <see cref="IsAccessible(Symbol, TypeSymbol, out bool, ref CompoundUseSiteInfo{AssemblySymbol}, ConsList{TypeSymbol})"/>, 1701internal virtual bool IsAccessibleHelper(Symbol symbol, TypeSymbol accessThroughType, out bool failedThroughTypeCheck, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, ConsList<TypeSymbol> basesBeingResolved) 1728TypeSymbol type = null; 1859this.AddMemberLookupSymbolsInfoInType(result, (TypeSymbol)nsOrType, options, originalBinder); 1863private void AddMemberLookupSymbolsInfoInType(LookupSymbolsInfo result, TypeSymbol type, LookupOptions options, Binder originalBinder) 1887protected void AddMemberLookupSymbolsInfoInSubmissions(LookupSymbolsInfo result, TypeSymbol scriptClass, bool inUsings, LookupOptions options, Binder originalBinder) 1960private static void AddMemberLookupSymbolsInfoWithoutInheritance(LookupSymbolsInfo result, TypeSymbol type, LookupOptions options, Binder originalBinder, TypeSymbol accessThroughType) 1972private void AddWinRTMembersLookupSymbolsInfo(LookupSymbolsInfo result, NamedTypeSymbol type, LookupOptions options, Binder originalBinder, TypeSymbol accessThroughType) 1987private void AddMemberLookupSymbolsInfoInClass(LookupSymbolsInfo result, TypeSymbol type, LookupOptions options, Binder originalBinder, TypeSymbol accessThroughType) 2018private void AddMemberLookupSymbolsInfoInInterface(LookupSymbolsInfo result, TypeSymbol type, LookupOptions options, Binder originalBinder, TypeSymbol accessThroughType)
Binder\Binder_Operators.cs (62)
197var leftType = left.Type; 267TypeSymbol delegateType = left.Type; 286TypeSymbol type; 347TypeSymbol type = operand.Type; 521TypeSymbol leftType = left.Type; 522TypeSymbol rightType = right.Type; 630TypeSymbol resultType = signature.ReturnType; 696TypeSymbol leftType = left.Type; 697TypeSymbol rightType = right.Type; 849bool isReadOnlySpanOfByte(TypeSymbol? type) 1024var type = left.Type; 1126bool typesAreSame = TypeSymbol.Equals(signature.LeftType, signature.RightType, TypeCompareKind.ConsiderEverything2) && TypeSymbol.Equals(signature.LeftType, signature.ReturnType, TypeCompareKind.ConsiderEverything2); 1128bool typeMatchesContainer = TypeSymbol.Equals(signature.ReturnType.StrippedType(), t, TypeCompareKind.ConsiderEverything2) || 1235private bool HasApplicableBooleanOperator(NamedTypeSymbol containingType, string name, TypeSymbol argumentType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, out MethodSymbol @operator) 1259private TypeSymbol GetBinaryOperatorErrorType(BinaryOperatorKind kind, BindingDiagnosticBag diagnostics, CSharpSyntaxNode node) 1449static bool isNuint(TypeSymbol type) 1629internal static TypeSymbol GetEnumType(BinaryOperatorKind kind, BoundExpression left, BoundExpression right) 1681TypeSymbol resultTypeSymbol, 1694TypeSymbol enumType = GetEnumType(kind, left, right); 1695TypeSymbol underlyingType = enumType.GetEnumUnderlyingType()!; 1705TypeSymbol operandType = (operandSpecialType == underlyingType.SpecialType) ? 1741TypeSymbol resultType = kind == BinaryOperatorKind.EnumSubtraction ? underlyingType : enumType; 1756TypeSymbol resultTypeSymbol, 2256var operandType = operand.Type; 2349private bool CheckConstraintLanguageVersionAndRuntimeSupportForOperator(SyntaxNode node, MethodSymbol? methodOpt, bool isUnsignedRightShift, TypeSymbol? constrainedToTypeOpt, BindingDiagnosticBag diagnostics) 2436TypeSymbol pointedAtType; 2443private static void BindPointerIndirectionExpressionInternal(CSharpSyntaxNode node, BoundExpression operand, BindingDiagnosticBag diagnostics, out TypeSymbol pointedAtType, out bool hasErrors) 2500TypeSymbol operandType = operand.Type; 2522TypeSymbol pointerType = new PointerTypeSymbol(TypeWithAnnotations.Create(operandType)); 2746var resultType = signature.ReturnType; 2803TypeSymbol resultTypeSymbol, 3147private bool IsOperatorErrors(CSharpSyntaxNode node, TypeSymbol operandType, BoundTypeExpression typeExpression, BindingDiagnosticBag diagnostics) 3149var targetType = typeExpression.Type; 3176var resultType = (TypeSymbol)GetSpecialType(SpecialType.System_Boolean, diagnostics, node); 3218var targetType = typeExpression.Type; 3277var operandType = operand.Type; 3298TypeSymbol targetType = targetTypeWithAnnotations.Type; 3308TypeSymbol operandType, 3309TypeSymbol targetType, 3343TypeSymbol operandType, 3344TypeSymbol targetType, 3621TypeSymbol targetType = targetTypeWithAnnotations.Type; 3624var resultType = targetType; 3725var operandType = operand.Type; 3776TypeSymbol operandType, 3777TypeSymbol targetType, 3838TypeSymbol operandType, 3839TypeSymbol targetType, 3869internal static ConstantValue GetAsOperatorConstantResult(TypeSymbol operandType, TypeSymbol targetType, ConversionKind conversionKind, ConstantValue operandConstantValue) 3932TypeSymbol optLeftType = leftOperand.Type; // "A" 3933TypeSymbol optRightType = rightOperand.Type; // "B" 3935TypeSymbol optLeftType0 = isLeftNullable ? // "A0" 4108TypeSymbol leftType = leftOperand.Type; 4124var underlyingLeftType = leftType.GetNullableUnderlyingType(); 4227TypeSymbol? bestType = BestTypeInferrer.InferBestTypeForConditionalOperator(trueExpr, falseExpr, this.Conversions, out bool hadMultipleCandidates, ref useSiteInfo); 4237TypeSymbol type; 4272TypeSymbol trueType = trueExpr.Type; 4273TypeSymbol falseType = falseExpr.Type; 4275TypeSymbol type;
Binder\Binder_Patterns.cs (66)
24TypeSymbol? expressionType = expression.Type; 49TypeSymbol boolType, 165TypeSymbol inputType, 191TypeSymbol inputType, 203TypeSymbol inputType, 227TypeSymbol sliceType; 260TypeSymbol inputType, 261TypeSymbol elementType, 290TypeSymbol inputType, 297TypeSymbol elementType; 300TypeSymbol narrowedType = inputType.StrippedType(); 346private bool IsCountableAndIndexable(SyntaxNode node, TypeSymbol inputType, out PropertySymbol? lengthProperty) 354private bool BindLengthAndIndexerForListPattern(SyntaxNode node, TypeSymbol inputType, BindingDiagnosticBag diagnostics, 401private static BoundPattern BindDiscardPattern(DiscardPatternSyntax node, TypeSymbol inputType, BindingDiagnosticBag diagnostics) 409TypeSymbol inputType, 419TypeSymbol inputType, 427var convertedType = convertedExpression.Type ?? inputType; 453private bool ShouldBlockINumberBaseConversion(Conversion patternConversion, TypeSymbol inputType) 498TypeSymbol inputType, 526TypeSymbol inputType, 544TypeSymbol inputType, 579TypeSymbol inputType, 714TypeSymbol inputType, 715TypeSymbol patternType, 795TypeSymbol expressionType, 796TypeSymbol patternType, 829TypeSymbol inputType, 844TypeSymbol inputType, 919TypeSymbol inputType, 940internal static bool IsZeroElementTupleType(TypeSymbol type) 949TypeSymbol inputType, 965TypeSymbol declType = declTypeWithAnnotations.Type; 1058TypeSymbol elementType = isError ? CreateErrorType() : outPlaceholders[i].Type; 1146TypeSymbol declType, 1163TypeSymbol elementType = isError ? CreateErrorType() : elementTypesWithAnnotations[i].Type; 1188TypeSymbol declType, 1226TypeSymbol declType, 1275bool hasBaseInterface(TypeSymbol type, NamedTypeSymbol possibleBaseInterface) 1309TypeSymbol inputType, 1335TypeSymbol inputType, 1368var strippedInputType = inputType.StrippedType(); 1413TypeSymbol elementType = isError ? CreateErrorType() : outPlaceholders[i].Type; 1436TypeSymbol elementType = isError ? CreateErrorType() : elementTypes[i].Type; 1451TypeSymbol inputType, 1465TypeSymbol memberType; 1484TypeSymbol receiverType = member.Receiver?.Type ?? inputType; 1501TypeSymbol inputType, ExpressionSyntax expr, BindingDiagnosticBag diagnostics, ref bool hasErrors) 1520TypeSymbol memberType = symbol switch 1531TypeSymbol inputType, 1603TypeSymbol inputType, 1616TypeSymbol inputType, 1685internal static BinaryOperatorKind RelationalOperatorType(TypeSymbol type) => type.SpecialType switch 1708TypeSymbol inputType, 1722TypeSymbol inputType, 1737var narrowedTypeCandidates = ArrayBuilder<TypeSymbol>.GetInstance(2); 1740var narrowedType = leastSpecificType(node, narrowedTypeCandidates, diagnostics) ?? inputType; 1745static void collectCandidates(BoundPattern pat, ArrayBuilder<TypeSymbol> candidates) 1758TypeSymbol? leastSpecificType(SyntaxNode node, ArrayBuilder<TypeSymbol> candidates, BindingDiagnosticBag diagnostics) 1762TypeSymbol? bestSoFar = candidates[0]; 1766TypeSymbol candidate = candidates[i]; 1772TypeSymbol candidate = candidates[i]; 1773TypeSymbol? spoiler = lessSpecificCandidate(candidate, bestSoFar, ref useSiteInfo); 1789TypeSymbol? lessSpecificCandidate(TypeSymbol bestSoFar, TypeSymbol possiblyLessSpecificCandidate, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\Binder_Query.cs (1)
820private 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)
238TypeSymbol elementType = GetIteratorElementType().Type; 404var type = boundExpr.Type; 1023TypeSymbol initializerType = initializerOpt?.Type; 1231private bool IsValidFixedVariableInitializer(TypeSymbol declType, ref BoundExpression initializerOpt, BindingDiagnosticBag diagnostics) 1241TypeSymbol initializerType = initializerOpt.Type; 1250TypeSymbol elementType; 1364TypeSymbol elementType, 1365TypeSymbol declType, 1374TypeSymbol pointerType = new PointerTypeSymbol(TypeWithAnnotations.Create(elementType)); 1468var inferredType = op2.Type; 1519TypeSymbol type; 1779TypeSymbol.Equals(sourceProperty.ContainingType, fromMember.ContainingType, TypeCompareKind.AllIgnoreOptions) && 1792private TypeSymbol GetAccessThroughType(BoundExpression receiver) 1813TypeSymbol destinationType, 1907internal BoundExpression GenerateConversionForAssignment(TypeSymbol targetType, BoundExpression expression, BindingDiagnosticBag diagnostics, ConversionForAssignmentFlags flags = ConversionForAssignmentFlags.None) 1910internal BoundExpression GenerateConversionForAssignment(TypeSymbol targetType, BoundExpression expression, BindingDiagnosticBag diagnostics, out Conversion conversion, ConversionForAssignmentFlags flags = ConversionForAssignmentFlags.None) 1970UnboundLambda anonymousFunction, TypeSymbol targetType) 2144var lambdaParameterType = anonymousFunction.ParameterType(i); 2152var delegateParameterType = delegateParameters[i].Type; 2196Conversion conversion, TypeSymbol sourceType, TypeSymbol targetType, ConstantValue sourceConstantValueOpt = null) 2247else if (TypeSymbol.Equals(sourceType, targetType, TypeCompareKind.ConsiderEverything2)) 2268TypeSymbol targetType) 2393var sourceType = operand.Type; 2482var targetElementType = targetElementTypes[i].Type; 2865protected virtual TypeSymbol GetCurrentReturnType(out RefKind refKind) 2872TypeSymbol returnType = symbol.ReturnType; 2907TypeSymbol retType = GetCurrentReturnType(out sigRefKind); 2999var requiredType = IsEffectivelyGenericTaskReturningAsyncMethod() 3030TypeSymbol returnType) 3079&& TypeSymbol.Equals(argument.Type, this.GetCurrentReturnType(out unusedRefKind), TypeCompareKind.ConsiderEverything2)) 3139TypeSymbol type = null; 3158TypeSymbol effectiveType = type.EffectiveType(ref useSiteInfo); 3188var previousType = previousBlock.ExceptionTypeOpt; 3212else if (TypeSymbol.Equals(previousType, Compilation.GetWellKnownType(WellKnownType.System_Exception), TypeCompareKind.ConsiderEverything2) && 3235Debug.Assert(local.Type.IsErrorType() || (TypeSymbol.Equals(local.Type, type, TypeCompareKind.ConsiderEverything2))); 3348var returnType = GetCurrentReturnType(out returnRefKind);
Binder\Binder_Symbols.cs (33)
185/// Otherwise, call <see cref="Binder.BindTypeOrAlias(ExpressionSyntax, BindingDiagnosticBag, ConsList{TypeSymbol}, bool)"/> instead. 258var type = UnwrapAlias(symbol, diagnostics, syntax) as TypeSymbol; 300internal TypeWithAnnotations BindType(ExpressionSyntax syntax, BindingDiagnosticBag diagnostics, ConsList<TypeSymbol> basesBeingResolved = null, bool suppressUseSiteDiagnostics = false) 309internal TypeWithAnnotations BindType(ExpressionSyntax syntax, BindingDiagnosticBag diagnostics, out AliasSymbol alias, ConsList<TypeSymbol> basesBeingResolved = null) 318internal NamespaceOrTypeOrAliasSymbolWithAnnotations BindTypeOrAlias(ExpressionSyntax syntax, BindingDiagnosticBag diagnostics, ConsList<TypeSymbol> basesBeingResolved = null, bool suppressUseSiteDiagnostics = false) 326(symbol.IsAlias && UnwrapAliasNoDiagnostics(symbol.Symbol, basesBeingResolved) is TypeSymbol)) 373internal NamespaceOrTypeOrAliasSymbolWithAnnotations BindNamespaceOrTypeSymbol(ExpressionSyntax syntax, BindingDiagnosticBag diagnostics, ConsList<TypeSymbol> basesBeingResolved = null) 383internal NamespaceOrTypeOrAliasSymbolWithAnnotations BindNamespaceOrTypeSymbol(ExpressionSyntax syntax, BindingDiagnosticBag diagnostics, ConsList<TypeSymbol> basesBeingResolved, bool suppressUseSiteDiagnostics) 397/// <see cref="BindQualifiedName(ExpressionSyntax, SimpleNameSyntax, BindingDiagnosticBag, ConsList{TypeSymbol}, bool)"/> 406internal NamespaceOrTypeOrAliasSymbolWithAnnotations BindNamespaceOrTypeOrAliasSymbol(ExpressionSyntax syntax, BindingDiagnosticBag diagnostics, ConsList<TypeSymbol> basesBeingResolved, bool suppressUseSiteDiagnostics) 629ConsList<TypeSymbol> basesBeingResolved, 674private TypeSymbol BindTupleType(TupleTypeSyntax syntax, BindingDiagnosticBag diagnostics, ConsList<TypeSymbol> basesBeingResolved) 818ConsList<TypeSymbol> basesBeingResolved, 845ConsList<TypeSymbol> basesBeingResolved, 909if (aliasTarget is TypeSymbol type) 1082private static Symbol UnwrapAliasNoDiagnostics(Symbol symbol, ConsList<TypeSymbol> basesBeingResolved = null) 1092private NamespaceOrTypeOrAliasSymbolWithAnnotations UnwrapAlias(in NamespaceOrTypeOrAliasSymbolWithAnnotations symbol, BindingDiagnosticBag diagnostics, SyntaxNode syntax, ConsList<TypeSymbol> basesBeingResolved = null) 1103private NamespaceOrTypeOrAliasSymbolWithAnnotations UnwrapAlias(in NamespaceOrTypeOrAliasSymbolWithAnnotations symbol, out AliasSymbol alias, BindingDiagnosticBag diagnostics, SyntaxNode syntax, ConsList<TypeSymbol> basesBeingResolved = null) 1114private Symbol UnwrapAlias(Symbol symbol, BindingDiagnosticBag diagnostics, SyntaxNode syntax, ConsList<TypeSymbol> basesBeingResolved = null) 1120private Symbol UnwrapAlias(Symbol symbol, out AliasSymbol alias, BindingDiagnosticBag diagnostics, SyntaxNode syntax, ConsList<TypeSymbol> basesBeingResolved = null) 1129var type = result as TypeSymbol; 1151ConsList<TypeSymbol> basesBeingResolved, 1259ConsList<TypeSymbol> basesBeingResolved, 1335private ImmutableArray<TypeWithAnnotations> BindTypeArguments(SeparatedSyntaxList<TypeSyntax> typeArguments, BindingDiagnosticBag diagnostics, ConsList<TypeSymbol> basesBeingResolved = null) 1347private TypeWithAnnotations BindTypeArgument(TypeSyntax typeArgument, BindingDiagnosticBag diagnostics, ConsList<TypeSymbol> basesBeingResolved = null) 1503ArrayBuilder<Symbol> members, TypeSymbol receiverType, 1556ConsList<TypeSymbol> basesBeingResolved, 1588ConsList<TypeSymbol> basesBeingResolved, 2204var singleType = singleResult as TypeSymbol;
Binder\Binder_TupleOperators.cs (15)
33TypeSymbol resultType = GetSpecialType(SpecialType.System_Boolean, diagnostics, node); 40TypeSymbol convertedType = isRight ? @operator.RightConvertedTypeOpt : @operator.LeftConvertedTypeOpt; 85TypeSymbol leftType = left.Type; 86TypeSymbol rightType = right.Type; 125private void PrepareBoolConversionAndTruthOperator(TypeSymbol type, BinaryExpressionSyntax node, BinaryOperatorKind binaryOperator, BindingDiagnosticBag diagnostics, 131TypeSymbol boolean = GetSpecialType(SpecialType.System_Boolean, diagnostics, node); 194TypeSymbol dynamicType = hasError ? CreateErrorType() : Compilation.DynamicType; 251TypeSymbol leftTupleType = MakeConvertedType(operators.SelectAsArray(o => o.LeftConvertedTypeOpt), node.Left, leftParts, leftNames, isNullable, compilation, diagnostics); 252TypeSymbol rightTupleType = MakeConvertedType(operators.SelectAsArray(o => o.RightConvertedTypeOpt), node.Right, rightParts, rightNames, isNullable, compilation, diagnostics); 325internal static BoundExpression GiveTupleTypeToDefaultLiteralIfNeeded(BoundExpression expr, TypeSymbol targetType) 356TypeSymbol type = expr.Type; 383TypeSymbol tupleType = expr.Type.StrippedType(); 395private TypeSymbol MakeConvertedType(ImmutableArray<TypeSymbol> convertedTypes, CSharpSyntaxNode syntax, 399foreach (var convertedType in convertedTypes)
Binder\Binder_Unsafe.cs (2)
27internal bool ReportUnsafeIfNotAllowed(SyntaxNode node, BindingDiagnosticBag diagnostics, TypeSymbol sizeOfTypeOpt = null) 53private CSDiagnosticInfo GetUnsafeDiagnosticInfo(TypeSymbol sizeOfTypeOpt)
Binder\Binder_WithExpression.cs (1)
20var receiverType = receiver.Type;
Binder\BuckStopsHereBinder.cs (3)
67internal override bool IsAccessibleHelper(Symbol symbol, TypeSymbol accessThroughType, out bool failedThroughTypeCheck, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, ConsList<TypeSymbol> basesBeingResolved) 204internal override BoundSwitchExpressionArm BindSwitchExpressionArm(SwitchExpressionArmSyntax node, TypeSymbol switchGoverningType, BindingDiagnosticBag diagnostics)
Binder\DecisionDagBuilder.cs (14)
369bool isDerivedType(TypeSymbol possibleDerived, TypeSymbol possibleBase) 394TypeSymbol? type = declaration.DeclaredType?.Type; 421TypeSymbol type = typePattern.DeclaredType.Type; 448TypeSymbol type, 455TypeSymbol inputType = input.Type.StrippedType(); // since a null check has already been done 520var inputType = recursive.DeclaredType?.Type ?? input.Type.StrippedType(); 697private TypeSymbol ErrorType(string name = "") 1491TypeSymbol expressionType, 1492TypeSymbol patternType, 1500static bool isRuntimeSimilar(TypeSymbol expressionType, TypeSymbol patternType) 1507TypeSymbol e1 = array1.ElementType.EnumUnderlyingTypeOrSelf(); 1508TypeSymbol e2 = array2.ElementType.EnumUnderlyingTypeOrSelf();
Binder\ExecutableCodeBinder.cs (1)
135var returnType = iterator.ReturnType;
Binder\ForEachEnumeratorInfo.cs (5)
17public readonly TypeSymbol CollectionType; 20public TypeSymbol ElementType => ElementTypeWithAnnotations.Type; 47TypeSymbol collectionType, 84public TypeSymbol CollectionType; 86public TypeSymbol ElementType => ElementTypeWithAnnotations.Type;
Binder\ForEachLoopBinder.cs (24)
504TypeSymbol getEnumeratorType = getEnumeratorMethod.ReturnType; 593var awaitableType = builder.PatternDisposeInfo is null 647TypeSymbol collectionExprType = collectionExpr.Type; 715TypeSymbol collectionExprType = collectionExpr.Type; 748TypeSymbol collectionExprType = collectionExpr.Type; 788var unwrappedCollectionExprType = unwrappedCollectionExpr.Type; 869private EnumeratorResult SatisfiesIEnumerableInterfaces(ref ForEachEnumeratorInfo.Builder builder, BoundExpression collectionExpr, bool isAsync, BindingDiagnosticBag diagnostics, TypeSymbol unwrappedCollectionExprType) 928TypeSymbol enumeratorType = specificGetEnumeratorMethod.ReturnType; 1017TypeSymbol enumeratorType = builder.GetEnumeratorInfo.Method.ReturnType; 1073private ForEachEnumeratorInfo.Builder GetDefaultEnumeratorInfo(ForEachEnumeratorInfo.Builder builder, BindingDiagnosticBag diagnostics, TypeSymbol collectionExprType) 1082(TypeSymbol)DynamicTypeSymbol.Instance : 1100TypeSymbol.Equals(builder.GetEnumeratorInfo.Method.ReturnType, this.Compilation.GetSpecialType(SpecialType.System_Collections_IEnumerator), TypeCompareKind.ConsiderEverything2)); 1147private MethodArgumentInfo FindForEachPatternMethod(TypeSymbol patternType, string methodName, LookupResult lookupResult, bool warningsOnly, BindingDiagnosticBag diagnostics, bool isAsync) 1214private MethodArgumentInfo PerformForEachPatternOverloadResolution(TypeSymbol patternType, ArrayBuilder<MethodSymbol> candidateMethods, bool warningsOnly, BindingDiagnosticBag diagnostics, bool isAsync) 1388TypeSymbol enumeratorType = getEnumeratorMethod.ReturnType; 1501private void ReportEnumerableWarning(BindingDiagnosticBag diagnostics, TypeSymbol enumeratorType, Symbol patternMemberCandidate) 1512private static bool IsIEnumerable(TypeSymbol type) 1514switch (((TypeSymbol)type.OriginalDefinition).SpecialType) 1524private bool IsIAsyncEnumerable(TypeSymbol type) 1542TypeSymbol type, 1575internal static NamedTypeSymbol GetIEnumerableOfT(TypeSymbol type, bool isAsync, CSharpCompilation compilation, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, out bool foundMultiple) 1609TypeSymbol.Equals(@interface, result, TypeCompareKind.IgnoreTupleNames)) 1622internal static bool IsIEnumerableT(TypeSymbol type, bool isAsync, CSharpCompilation compilation) 1642private void ReportPatternMemberLookupDiagnostics(LookupResult lookupResult, TypeSymbol patternType, string memberName, bool warningsOnly, BindingDiagnosticBag diagnostics)
Binder\HostObjectModeBinder.cs (5)
22private TypeSymbol GetHostObjectType() 24TypeSymbol result = this.Compilation.GetHostObjectTypeSymbol(); 33LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 35var hostObjectType = GetHostObjectType(); 54var hostObjectType = GetHostObjectType();
Binder\ImportChain.cs (3)
89var typeRef = GetTypeReference((TypeSymbol)namespaceOrType, nsOrType.UsingDirective, moduleBuilder, diagnostics); 121var typeRef = GetTypeReference((TypeSymbol)target, syntax, moduleBuilder, diagnostics); 132private static Cci.ITypeReference GetTypeReference(TypeSymbol type, SyntaxNode syntaxNode, Emit.PEModuleBuilder moduleBuilder, DiagnosticBag diagnostics)
Binder\InContainerBinder.cs (3)
57internal override bool IsAccessibleHelper(Symbol symbol, TypeSymbol accessThroughType, out bool failedThroughTypeCheck, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, ConsList<TypeSymbol> basesBeingResolved) 104LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\InMethodBinder.cs (10)
128TypeSymbol returnType = _methodSymbol.ReturnType; 146RefKind refKind, TypeSymbol returnType, Location errorLocation, BindingDiagnosticBag diagnostics) 150TypeSymbol originalDefinition = returnType.OriginalDefinition; 167if (TypeSymbol.Equals(originalDefinition, compilation.GetWellKnownType(WellKnownType.System_Collections_Generic_IAsyncEnumerable_T), TypeCompareKind.ConsiderEverything) || 168TypeSymbol.Equals(originalDefinition, compilation.GetWellKnownType(WellKnownType.System_Collections_Generic_IAsyncEnumerator_T), TypeCompareKind.ConsiderEverything)) 177internal static bool IsAsyncStreamInterface(CSharpCompilation compilation, RefKind refKind, TypeSymbol returnType) 181TypeSymbol originalDefinition = returnType.OriginalDefinition; 183if (TypeSymbol.Equals(originalDefinition, compilation.GetWellKnownType(WellKnownType.System_Collections_Generic_IAsyncEnumerable_T), TypeCompareKind.ConsiderEverything) || 184TypeSymbol.Equals(originalDefinition, compilation.GetWellKnownType(WellKnownType.System_Collections_Generic_IAsyncEnumerator_T), TypeCompareKind.ConsiderEverything)) 194LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\InSubmissionClassBinder.cs (1)
48LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\LocalScopeBinder.cs (1)
376LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\LockBinder.cs (1)
40TypeSymbol exprType = expr.Type;
Binder\LockOrUsingBinder.cs (1)
78protected BoundExpression BindTargetExpression(BindingDiagnosticBag diagnostics, Binder originalBinder, TypeSymbol targetTypeOpt = null)
Binder\NameofBinder.cs (1)
52internal override void LookupSymbolsInSingleBinder(LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\PatternExplainer.cs (5)
641private static string SampleValueString(IValueSet remainingValues, TypeSymbol type, bool requireExactType, ref bool unnamedEnumValue) 672var underlyingType = type.EnumUnderlyingTypeOrSelf(); 691private static string ValueString(ConstantValue value, TypeSymbol type, bool requireExactType) 698static bool typeHasExactTypeLiteral(TypeSymbol type) => type.SpecialType switch 714private static string PrimitiveValueString(ConstantValue value, TypeSymbol type)
Binder\Semantics\AccessCheck.cs (21)
41TypeSymbol throughTypeOpt = null) 55TypeSymbol throughTypeOpt, 58ConsList<TypeSymbol> basesBeingResolved = null) 136TypeSymbol throughTypeOpt, 140ConsList<TypeSymbol> basesBeingResolved = null) 223private static bool IsNamedTypeAccessible(NamedTypeSymbol type, Symbol within, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, ConsList<TypeSymbol> basesBeingResolved = null) 301TypeSymbol throughTypeOpt, 305ConsList<TypeSymbol> basesBeingResolved = null) 345TypeSymbol throughTypeOpt, 349ConsList<TypeSymbol> basesBeingResolved = null) 417TypeSymbol throughTypeOpt, 422ConsList<TypeSymbol> basesBeingResolved = null) 460var originalThroughTypeOpt = (object)throughTypeOpt == null ? null : throughTypeOpt.OriginalDefinition as TypeSymbol; 544this TypeSymbol type, 548ConsList<TypeSymbol> basesBeingResolved = null) 564var current = type; 585var next = current.GetNextBaseTypeNoUseSiteDiagnostics(basesBeingResolved, compilation, ref visited); 592current = (TypeSymbol)next.OriginalDefinition; 635static void getBaseInterfaces(TypeSymbol derived, ArrayBuilder<NamedTypeSymbol> baseInterfaces, PooledHashSet<NamedTypeSymbol> interfacesLookedAt, ConsList<TypeSymbol> basesBeingResolved)
Binder\Semantics\BestTypeInferrer.cs (24)
51public static TypeSymbol? InferBestType( 68IEqualityComparer<TypeSymbol> comparer = conversions.IncludeNullability ? Symbols.SymbolEqualityComparer.ConsiderEverything : Symbols.SymbolEqualityComparer.IgnoringNullable; 69HashSet<TypeSymbol> candidateTypes = new HashSet<TypeSymbol>(comparer); 72TypeSymbol? type = expr.GetTypeOrFunctionType(); 87var builder = ArrayBuilder<TypeSymbol>.GetInstance(candidateTypes.Count); 89var result = GetBestType(builder, conversions, ref useSiteInfo); 107public static TypeSymbol? InferBestTypeForConditionalOperator( 123ArrayBuilder<TypeSymbol> candidateTypes = ArrayBuilder<TypeSymbol>.GetInstance(); 127TypeSymbol? type1 = expr1.Type; 143TypeSymbol? type2 = expr2.Type; 169internal static TypeSymbol? GetBestType( 170ArrayBuilder<TypeSymbol> types, 189TypeSymbol? best = null; 193TypeSymbol? type = checkType(types[i]); 205var better = Better(best, type, conversions, ref useSiteInfo); 228TypeSymbol? type = checkType(types[i]); 233TypeSymbol? better = Better(best, type, conversions, ref useSiteInfo); 242static TypeSymbol? checkType(TypeSymbol type) => 251private static TypeSymbol? Better( 252TypeSymbol type1, 253TypeSymbol? type2,
Binder\Semantics\Conversions\ConversionEasyOut.cs (2)
72public static ConversionKind ClassifyConversion(TypeSymbol source, TypeSymbol target)
Binder\Semantics\Conversions\Conversions.cs (7)
44public override Conversion GetMethodGroupDelegateConversion(BoundMethodGroup source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 129protected override Conversion GetInterpolatedStringConversion(BoundExpression source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 144return (TypeSymbol.Equals(destination, Compilation.GetWellKnownType(WellKnownType.System_IFormattable), TypeCompareKind.ConsiderEverything) || 145TypeSymbol.Equals(destination, Compilation.GetWellKnownType(WellKnownType.System_FormattableString), TypeCompareKind.ConsiderEverything)) 175private static (MethodSymbol, bool isFunctionPointer, CallingConventionInfo callingConventionInfo) GetDelegateInvokeOrFunctionPointerMethodIfAvailable(TypeSymbol type) 197public static bool ReportDelegateOrFunctionPointerMethodGroupDiagnostics(Binder binder, BoundMethodGroup expr, TypeSymbol targetType, BindingDiagnosticBag diagnostics) 385public override Conversion GetStackAllocConversion(BoundStackAllocArrayCreation sourceExpression, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\Semantics\Conversions\ConversionsBase.cs (188)
66public abstract Conversion GetMethodGroupDelegateConversion(BoundMethodGroup source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo); 70public abstract Conversion GetStackAllocConversion(BoundStackAllocArrayCreation sourceExpression, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo); 74protected abstract Conversion GetInterpolatedStringConversion(BoundExpression source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo); 89public Conversion ClassifyImplicitConversionFromExpression(BoundExpression sourceExpression, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 95var sourceType = sourceExpression.Type; 160public Conversion ClassifyImplicitConversionFromType(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 195public Conversion ClassifyImplicitConversionFromTypeWhenNeitherOrBothFunctionTypes(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 225public Conversion ClassifyConversionFromExpressionType(TypeSymbol source, TypeSymbol destination, bool isChecked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 239private static bool TryGetVoidConversion(TypeSymbol source, TypeSymbol destination, out Conversion conversion) 274public Conversion ClassifyConversionFromExpression(BoundExpression sourceExpression, TypeSymbol destination, bool isChecked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, bool forCast = false) 308public Conversion ClassifyConversionFromType(TypeSymbol source, TypeSymbol destination, bool isChecked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, bool forCast = false) 366private Conversion ClassifyConversionFromExpressionForCast(BoundExpression source, TypeSymbol destination, bool isChecked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 420private Conversion ClassifyConversionFromTypeForCast(TypeSymbol source, TypeSymbol destination, bool isChecked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 479public static Conversion FastClassifyConversion(TypeSymbol source, TypeSymbol target) 490public Conversion ClassifyBuiltInConversion(TypeSymbol source, TypeSymbol destination, bool isChecked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 520public Conversion ClassifyStandardConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 532public Conversion ClassifyStandardConversion(BoundExpression sourceExpression, TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 621private Conversion ClassifyStandardImplicitConversion(BoundExpression sourceExpression, TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 673private Conversion ClassifyStandardImplicitConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 679Conversion classifyConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 736private Conversion ClassifyImplicitBuiltInConversionSlow(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 755private Conversion GetImplicitUserDefinedConversion(BoundExpression sourceExpression, TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 761private Conversion GetImplicitUserDefinedConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 766private Conversion ClassifyExplicitBuiltInOnlyConversion(TypeSymbol source, TypeSymbol destination, bool isChecked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, bool forCast) 840private Conversion GetExplicitUserDefinedConversion(BoundExpression sourceExpression, TypeSymbol source, TypeSymbol destination, bool isChecked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 846private Conversion GetExplicitUserDefinedConversion(TypeSymbol source, TypeSymbol destination, bool isChecked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 851private Conversion DeriveStandardExplicitFromOppositeStandardImplicitConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 884var strippedSource = source.StrippedType(); 885var strippedDestination = destination.StrippedType(); 914public bool IsBaseInterface(TypeSymbol baseType, TypeSymbol derivedType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 949public bool IsBaseClass(TypeSymbol derivedType, TypeSymbol baseType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 960for (TypeSymbol b = derivedType.BaseTypeWithDefinitionUseSiteDiagnostics(ref useSiteInfo); (object)b != null; b = b.BaseTypeWithDefinitionUseSiteDiagnostics(ref useSiteInfo)) 992private Conversion ClassifyImplicitBuiltInConversionFromExpression(BoundExpression sourceExpression, TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1102private Conversion GetSwitchExpressionConversion(BoundExpression source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1131private Conversion GetConditionalExpressionConversion(BoundExpression source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1149private static Conversion ClassifyNullLiteralConversion(BoundExpression source, TypeSymbol destination) 1188private static Conversion ClassifyImplicitConstantExpressionConversion(BoundExpression source, TypeSymbol destination) 1212private Conversion ClassifyImplicitTupleLiteralConversion(BoundTupleLiteral source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1243private Conversion ClassifyExplicitTupleLiteralConversion(BoundTupleLiteral source, TypeSymbol destination, bool isChecked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, bool forCast) 1274internal static bool HasImplicitConstantExpressionConversion(BoundExpression source, TypeSymbol destination) 1326private Conversion ClassifyExplicitOnlyConversionFromExpression(BoundExpression sourceExpression, TypeSymbol destination, bool isChecked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, bool forCast) 1344var sourceType = sourceExpression.Type; 1366private static bool HasImplicitEnumerationConversion(BoundExpression source, TypeSymbol destination) 1392private static LambdaConversionResult IsAnonymousFunctionCompatibleWithDelegate(UnboundLambda anonymousFunction, TypeSymbol type, bool isTargetExpressionTree) 1527var delegateType = type.TypeArgumentsWithAnnotationsNoUseSiteDiagnostics[0].Type; 1541internal bool IsAssignableFromMulticastDelegate(TypeSymbol type, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1548public static LambdaConversionResult IsAnonymousFunctionCompatibleWithType(UnboundLambda anonymousFunction, TypeSymbol type) 1565private static bool HasAnonymousFunctionConversion(BoundExpression source, TypeSymbol destination) 1579internal Conversion ClassifyImplicitUserDefinedConversionForV6SwitchGoverningType(TypeSymbol sourceType, out TypeSymbol switchGoverningType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1611internal Conversion GetCallerLineNumberConversion(TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1616TypeSymbol expectedAttributeType = corLibrary.GetSpecialType(SpecialType.System_Int32); 1636internal bool HasCallerLineNumberConversion(TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1641internal bool HasCallerInfoStringConversion(TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1643TypeSymbol expectedAttributeType = corLibrary.GetSpecialType(SpecialType.System_String); 1648public static bool HasIdentityConversion(TypeSymbol type1, TypeSymbol type2) 1653private static bool HasIdentityConversionInternal(TypeSymbol type1, TypeSymbol type2, bool includeNullability) 1675private bool HasIdentityConversionInternal(TypeSymbol type1, TypeSymbol type2) 1740var type = typeWithAnnotations.Type; 1770public Conversion ConvertExtensionMethodThisArg(TypeSymbol parameterType, TypeSymbol thisType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1779public Conversion ClassifyImplicitExtensionMethodThisArgConversion(BoundExpression sourceExpressionOpt, TypeSymbol sourceType, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1885private static ConversionKind GetNumericConversion(TypeSymbol source, TypeSymbol destination) 1907private static bool HasImplicitNumericConversion(TypeSymbol source, TypeSymbol destination) 1912private static bool HasExplicitNumericConversion(TypeSymbol source, TypeSymbol destination) 1950private static bool IsNumericType(TypeSymbol type) 1974private static bool HasSpecialIntPtrConversion(TypeSymbol source, TypeSymbol target) 2010var s0 = source.StrippedType(); 2011var t0 = target.StrippedType(); 2013TypeSymbol otherType; 2056static bool isIntPtrOrUIntPtr(TypeSymbol type) => 2060private static bool HasExplicitEnumerationConversion(TypeSymbol source, TypeSymbol destination) 2089private Conversion ClassifyImplicitNullableConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2105TypeSymbol unwrappedDestination = destination.GetNullableUnderlyingType(); 2106TypeSymbol unwrappedSource = source.StrippedType(); 2135private Conversion GetImplicitTupleLiteralConversion(BoundTupleLiteral source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2153private Conversion GetExplicitTupleLiteralConversion(BoundTupleLiteral source, TypeSymbol destination, bool isChecked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, bool forCast) 2173TypeSymbol destination, 2211private Conversion ClassifyImplicitTupleConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2230private Conversion ClassifyExplicitTupleConversion(TypeSymbol source, TypeSymbol destination, bool isChecked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, bool forCast) 2250TypeSymbol source, 2251TypeSymbol destination, 2284private Conversion ClassifyExplicitNullableConversion(TypeSymbol source, TypeSymbol destination, bool isChecked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, bool forCast) 2302TypeSymbol unwrappedSource = source.StrippedType(); 2303TypeSymbol unwrappedDestination = destination.StrippedType(); 2339private bool HasCovariantArrayConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2361public bool HasIdentityOrImplicitReferenceConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2374private static bool HasImplicitDynamicConversionFromExpression(TypeSymbol expressionType, TypeSymbol destination) 2383private static bool HasExplicitDynamicConversion(TypeSymbol source, TypeSymbol destination) 2393private bool HasArrayConversionToInterface(ArrayTypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2474internal bool HasImplicitReferenceConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2537private bool HasImplicitConversionToInterface(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2571private bool HasImplicitConversionFromArray(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2612private bool HasImplicitConversionFromDelegate(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2648private bool HasImplicitFunctionTypeConversion(FunctionTypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2659internal bool IsValidFunctionTypeConversionTarget(TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2702public bool HasImplicitTypeParameterConversion(TypeParameterSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2723private bool HasImplicitReferenceTypeParameterConversion(TypeParameterSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2761private bool HasImplicitEffectiveBaseConversion(TypeParameterSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2785private bool HasImplicitEffectiveInterfaceSetConversion(TypeParameterSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2805private bool HasAnyBaseInterfaceConversion(TypeSymbol derivedType, TypeSymbol baseType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2845private bool HasInterfaceVarianceConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2864private bool HasDelegateVarianceConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2925if (!TypeSymbol.Equals(typeSymbol, destination.OriginalDefinition, TypeCompareKind.ConsiderEverything2)) 2948Debug.Assert(TypeSymbol.Equals(source.OriginalDefinition, destination.OriginalDefinition, TypeCompareKind.AllIgnoreOptions)); 2977TypeSymbol.Equals(destinationTypeArgument.Type, sourceTypeArgument.Type, TypeCompareKind.AllNullableIgnoreOptions) && 3026private bool HasImplicitBoxingTypeParameterConversion(TypeParameterSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 3075public bool HasBoxingConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 3136internal static bool HasImplicitPointerToVoidConversion(TypeSymbol source, TypeSymbol destination) 3147internal bool HasImplicitPointerConversion(TypeSymbol? source, TypeSymbol? destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 3204private bool HasIdentityOrReferenceConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 3227private bool HasExplicitReferenceConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 3301private bool HasExplicitReferenceTypeParameterConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 3348private bool HasUnboxingTypeParameterConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 3366if (TypeSymbol.Equals(type, source, TypeCompareKind.ConsiderEverything2)) 3394private bool HasExplicitDelegateConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 3425if (!TypeSymbol.Equals(source.OriginalDefinition, destination.OriginalDefinition, TypeCompareKind.ConsiderEverything2)) 3449var sourceArg = sourceTypeArguments[i].Type; 3450var destinationArg = destinationTypeArguments[i].Type; 3483private bool HasExplicitArrayConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 3544var specialDefinition = ((TypeSymbol)source.OriginalDefinition).SpecialType; 3552var sourceElement = ((NamedTypeSymbol)source).TypeArgumentWithDefinitionUseSiteDiagnostics(0, ref useSiteInfo).Type; 3553var destinationElement = destinationArray.ElementType; 3575private bool HasUnboxingConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 3643private static bool HasPointerToPointerConversion(TypeSymbol source, TypeSymbol destination) 3651private static bool HasPointerToIntegerConversion(TypeSymbol source, TypeSymbol destination) 3669private static bool HasIntegerToPointerConversion(TypeSymbol source, TypeSymbol destination) 3683private static bool IsIntegerTypeSupportingPointerConversions(TypeSymbol type)
Binder\Semantics\Conversions\TypeConversions.cs (3)
38public override Conversion GetMethodGroupDelegateConversion(BoundMethodGroup source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 50public override Conversion GetStackAllocConversion(BoundStackAllocArrayCreation sourceExpression, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 56protected override Conversion GetInterpolatedStringConversion(BoundExpression source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\Semantics\Conversions\UserDefinedConversionAnalysis.cs (8)
21public readonly TypeSymbol FromType; 22public readonly TypeSymbol ToType; 35TypeSymbol fromType, 36TypeSymbol toType) 53TypeSymbol fromType, 54TypeSymbol toType) 72TypeSymbol fromType, 73TypeSymbol toType)
Binder\Semantics\Conversions\UserDefinedConversions.cs (2)
17public static void AddTypesParticipatingInUserDefinedConversion(ArrayBuilder<(NamedTypeSymbol ParticipatingType, TypeParameterSymbol? ConstrainedToTypeOpt)> result, TypeSymbol type, bool includeBaseTypes, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 114static void addFromClassOrStruct(ArrayBuilder<(NamedTypeSymbol ParticipatingType, TypeParameterSymbol? ConstrainedToTypeOpt)> result, bool excludeExisting, TypeSymbol type, bool includeBaseTypes, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\Semantics\Conversions\UserDefinedExplicitConversions.cs (28)
22TypeSymbol source, 23TypeSymbol target, 52TypeSymbol sx = MostSpecificSourceTypeForExplicitUserDefinedConversion(u, sourceExpression, source, ref useSiteInfo); 59TypeSymbol tx = MostSpecificTargetTypeForExplicitUserDefinedConversion(u, target, ref useSiteInfo); 74private static void ComputeUserDefinedExplicitConversionTypeSet(TypeSymbol source, TypeSymbol target, ArrayBuilder<(NamedTypeSymbol ParticipatingType, TypeParameterSymbol ConstrainedToTypeOpt)> d, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 87TypeSymbol source, 88TypeSymbol target, 130TypeSymbol source, 131TypeSymbol target, 143TypeSymbol source, 144TypeSymbol target, 262TypeSymbol convertsFrom = op.GetParameterType(0); 263TypeSymbol convertsTo = op.ReturnType; 314TypeSymbol nullableFrom = MakeNullableType(convertsFrom); 315TypeSymbol nullableTo = convertsTo.IsValidNullableTypeArgument() ? MakeNullableType(convertsTo) : convertsTo; 360private TypeSymbol MostSpecificSourceTypeForExplicitUserDefinedConversion( 363TypeSymbol source, 398if (u.Any(static (conv, source) => TypeSymbol.Equals(conv.FromType, source, TypeCompareKind.ConsiderEverything2), source)) 407var result = MostEncompassedType(u, isValid, conv => conv.FromType, ref inLambdaUseSiteInfo); 418private TypeSymbol MostSpecificTargetTypeForExplicitUserDefinedConversion( 420TypeSymbol target, 452if (u.Any(static (conv, target) => TypeSymbol.Equals(conv.ToType, target, TypeCompareKind.ConsiderEverything2), target)) 461var result = MostEncompassingType(u, isValid, conv => conv.ToType, ref inLambdaUseSiteInfo); 470private Conversion EncompassingExplicitConversion(BoundExpression expr, TypeSymbol a, TypeSymbol b, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 493private Conversion EncompassingExplicitConversion(TypeSymbol a, TypeSymbol b, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\Semantics\Conversions\UserDefinedImplicitConversions.cs (50)
27TypeSymbol source, 28TypeSymbol target, 96TypeSymbol sx = MostSpecificSourceTypeForImplicitUserDefinedConversion(u, source, ref useSiteInfo); 103TypeSymbol tx = MostSpecificTargetTypeForImplicitUserDefinedConversion(u, target, ref useSiteInfo); 118private static void ComputeUserDefinedImplicitConversionTypeSet(TypeSymbol s, TypeSymbol t, ArrayBuilder<(NamedTypeSymbol ParticipatingType, TypeParameterSymbol ConstrainedToTypeOpt)> d, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 144TypeSymbol source, 145TypeSymbol target, 278TypeSymbol source, 279TypeSymbol target, 292TypeSymbol convertsFrom = op.GetParameterType(0); 293TypeSymbol convertsTo = op.ReturnType; 340TypeSymbol nullableFrom = MakeNullableType(convertsFrom); 341TypeSymbol nullableTo = convertsTo.IsValidNullableTypeArgument() ? MakeNullableType(convertsTo) : convertsTo; 355private TypeSymbol MostSpecificSourceTypeForImplicitUserDefinedConversion(ImmutableArray<UserDefinedConversionAnalysis> u, TypeSymbol source, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 360if (u.Any(static (conv, source) => TypeSymbol.Equals(conv.FromType, source, TypeCompareKind.ConsiderEverything2), source)) 371private TypeSymbol MostSpecificTargetTypeForImplicitUserDefinedConversion(ImmutableArray<UserDefinedConversionAnalysis> u, TypeSymbol target, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 394if (u.Any(static (conv, target) => TypeSymbol.Equals(conv.ToType, target, TypeCompareKind.ConsiderEverything2), target)) 405if (!TypeSymbol.Equals(conv.FromType, conv.Operator.GetParameterType(0), TypeCompareKind.ConsiderEverything2)) 410if (!TypeSymbol.Equals(conv.ToType, conv.Operator.ReturnType, TypeCompareKind.ConsiderEverything2)) 418private static int? MostSpecificConversionOperator(TypeSymbol sx, TypeSymbol tx, ImmutableArray<UserDefinedConversionAnalysis> u) 420return MostSpecificConversionOperator(conv => TypeSymbol.Equals(conv.FromType, sx, TypeCompareKind.ConsiderEverything2) && TypeSymbol.Equals(conv.ToType, tx, TypeCompareKind.ConsiderEverything2), u); 565private bool IsEncompassedBy(BoundExpression aExpr, TypeSymbol a, TypeSymbol b, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 579private bool IsEncompassedBy(TypeSymbol a, TypeSymbol b, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 584private Conversion EncompassingImplicitConversion(BoundExpression aExpr, TypeSymbol a, TypeSymbol b, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 599private Conversion EncompassingImplicitConversion(TypeSymbol a, TypeSymbol b, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 674private TypeSymbol MostEncompassedType<T>( 676Func<T, TypeSymbol> extract, 682private TypeSymbol MostEncompassedType<T>( 685Func<T, TypeSymbol> extract, 716TypeSymbol leftType = extract(left); 717TypeSymbol rightType = extract(right); 718if (TypeSymbol.Equals(leftType, rightType, TypeCompareKind.ConsiderEverything2)) 736private TypeSymbol MostEncompassingType<T>( 738Func<T, TypeSymbol> extract, 744private TypeSymbol MostEncompassingType<T>( 747Func<T, TypeSymbol> extract, 755TypeSymbol leftType = extract(left); 756TypeSymbol rightType = extract(right); 757if (TypeSymbol.Equals(leftType, rightType, TypeCompareKind.ConsiderEverything2)) 870private NamedTypeSymbol MakeNullableType(TypeSymbol type) 879protected 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 (38)
67TypeSymbol leftOperatorSourceOpt = left.Type?.StrippedType(); 68TypeSymbol rightOperatorSourceOpt = right.Type?.StrippedType(); 127var lookedInInterfaces = PooledDictionary<TypeSymbol, bool>.GetInstance(); 129TypeSymbol firstOperatorSourceOpt; 130TypeSymbol secondOperatorSourceOpt; 210TypeSymbol operatorSourceOpt, bool sourceIsInterface, 212Dictionary<TypeSymbol, bool> lookedInInterfaces, ArrayBuilder<BinaryOperatorAnalysisResult> candidates) 223TypeSymbol constrainedToTypeOpt = null; 305private void AddDelegateOperation(BinaryOperatorKind kind, TypeSymbol delegateType, 360var leftType = left.Type; 362var rightType = right.Type; 380TypeSymbol systemDelegateType = _binder.Compilation.GetSpecialType(SpecialType.System_Delegate); 452TypeSymbol delegateType = leftDelegate ? leftType : rightType; 464private void GetEnumOperation(BinaryOperatorKind kind, TypeSymbol enumType, BoundExpression right, ArrayBuilder<BinaryOperatorSignature> operators) 505bool isExactSubtraction = TypeSymbol.Equals(right.Type?.StrippedType(), underlying, TypeCompareKind.ConsiderEverything2); 609var leftType = left.Type; 615var rightType = right.Type; 824static bool equalsIgnoringNullable(TypeSymbol a, TypeSymbol b) => a.Equals(b, TypeCompareKind.AllNullableIgnoreOptions); 825static bool equalsIgnoringNullableAndDynamic(TypeSymbol a, TypeSymbol b) => a.Equals(b, TypeCompareKind.AllNullableIgnoreOptions | TypeCompareKind.IgnoreDynamic); 831TypeSymbol type0, 894TypeSymbol constrainedToTypeOpt, 936void getDeclaredOperators(TypeSymbol constrainedToTypeOpt, NamedTypeSymbol type, BinaryOperatorKind kind, string name, ArrayBuilder<BinaryOperatorSignature> operators) 946TypeSymbol leftOperandType = op.GetParameterType(0); 947TypeSymbol rightOperandType = op.GetParameterType(1); 948TypeSymbol resultType = op.ReturnType; 954void addLiftedOperators(TypeSymbol constrainedToTypeOpt, BinaryOperatorKind kind, ArrayBuilder<BinaryOperatorSignature> operators) 959TypeSymbol leftOperandType = op.GetParameterType(0); 960TypeSymbol rightOperandType = op.GetParameterType(1); 961TypeSymbol resultType = op.ReturnType; 988private static LiftingResult UserDefinedBinaryOperatorCanBeLifted(TypeSymbol left, TypeSymbol right, TypeSymbol result, BinaryOperatorKind kind) 1017if (!TypeSymbol.Equals(left, right, TypeCompareKind.ConsiderEverything2)) return LiftingResult.NotLifted; 1292TypeSymbol op1Left, op1Right, op2Left, op2Right; 1327using var uninst1 = TemporaryArray<TypeSymbol>.Empty; 1328using var uninst2 = TemporaryArray<TypeSymbol>.Empty;
Binder\Semantics\Operators\BinaryOperatorSignature.cs (14)
18public readonly TypeSymbol LeftType; 19public readonly TypeSymbol RightType; 20public readonly TypeSymbol ReturnType; 22public readonly TypeSymbol ConstrainedToTypeOpt; 32public BinaryOperatorSignature(BinaryOperatorKind kind, TypeSymbol leftType, TypeSymbol rightType, TypeSymbol returnType) 43public BinaryOperatorSignature(BinaryOperatorKind kind, TypeSymbol leftType, TypeSymbol rightType, TypeSymbol returnType, MethodSymbol method, TypeSymbol constrainedToTypeOpt) 63TypeSymbol.Equals(this.LeftType, other.LeftType, TypeCompareKind.ConsiderEverything2) && 64TypeSymbol.Equals(this.RightType, other.RightType, TypeCompareKind.ConsiderEverything2) && 65TypeSymbol.Equals(this.ReturnType, other.ReturnType, TypeCompareKind.ConsiderEverything2) &&
Binder\Semantics\Operators\OperatorFacts.cs (1)
15public static bool DefinitelyHasNoUserDefinedOperators(TypeSymbol type)
Binder\Semantics\Operators\UnaryOperatorEasyOut.cs (2)
84public static UnaryOperatorKind OpKind(UnaryOperatorKind kind, TypeSymbol operand) 99var operandType = operand.Type;
Binder\Semantics\Operators\UnaryOperatorOverloadResolution.cs (11)
18private NamedTypeSymbol MakeNullable(TypeSymbol type) 294var enumType = operand.Type; 377TypeSymbol type0 = operand.Type.StrippedType(); 378TypeSymbol constrainedToTypeOpt = type0 as TypeParameterSymbol; 471TypeSymbol constrainedToTypeOpt, 513static void getDeclaredOperators(TypeSymbol constrainedToTypeOpt, NamedTypeSymbol type, UnaryOperatorKind kind, string name, ArrayBuilder<UnaryOperatorSignature> operators) 523TypeSymbol operandType = op.GetParameterType(0); 524TypeSymbol resultType = op.ReturnType; 530void addLiftedOperators(TypeSymbol constrainedToTypeOpt, UnaryOperatorKind kind, ArrayBuilder<UnaryOperatorSignature> operators) 550TypeSymbol operandType = op.GetParameterType(0); 551TypeSymbol 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 (43)
492TypeSymbol.Equals(typeParameter, _methodTypeParameters[ordinal], TypeCompareKind.ConsiderEverything2) && 531private TypeSymbol GetFixedDelegateOrFunctionPointer(TypeSymbol delegateOrFunctionPointerType) 891private static bool DoesInputTypeContain(BoundExpression argument, TypeSymbol formalParameterType, TypeParameterSymbol typeParameter) 897var delegateOrFunctionPointerType = formalParameterType.GetDelegateOrFunctionPointerType(); 927private bool HasUnfixedParamInInputType(BoundExpression pSource, TypeSymbol pDest) 946private static bool DoesOutputTypeContain(BoundExpression argument, TypeSymbol formalParameterType, 953var delegateOrFunctionPointerType = formalParameterType.GetDelegateOrFunctionPointerType(); 978var returnType = method.ReturnType; 987private bool HasUnfixedParamInOutputType(BoundExpression argument, TypeSymbol formalParameterType) 1027var formalParameterType = _formalParameterTypes[iArg].Type; 1319private bool MethodGroupReturnTypeInference(Binder binder, BoundExpression source, TypeSymbol target, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1334var delegateOrFunctionPointerType = target.GetDelegateOrFunctionPointerType(); 1700if (!TypeSymbol.Equals(namedSource.OriginalDefinition, namedTarget.OriginalDefinition, TypeCompareKind.ConsiderEverything2)) 1767Debug.Assert(TypeSymbol.Equals(source.OriginalDefinition, target.OriginalDefinition, TypeCompareKind.ConsiderEverything2)); 1892private static TypeWithAnnotations GetMatchingElementType(ArrayTypeSymbol source, TypeSymbol target, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1927private bool LowerBoundArrayInference(TypeSymbol source, TypeSymbol target, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1970private bool LowerBoundConstructedInference(TypeSymbol source, TypeSymbol target, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1997TypeSymbol.Equals(constructedSource.OriginalDefinition, constructedTarget.OriginalDefinition, TypeCompareKind.ConsiderEverything2)) 2034private bool LowerBoundClassInference(TypeSymbol source, NamedTypeSymbol target, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2069if (TypeSymbol.Equals(sourceBase.OriginalDefinition, target.OriginalDefinition, TypeCompareKind.ConsiderEverything2)) 2079private bool LowerBoundInterfaceInference(TypeSymbol source, NamedTypeSymbol target, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2164Debug.Assert(TypeSymbol.Equals(source.OriginalDefinition, target.OriginalDefinition, TypeCompareKind.ConsiderEverything2)); 2203private bool LowerBoundFunctionPointerTypeInference(TypeSymbol source, TypeSymbol target, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2375var source = sourceWithAnnotations.Type; 2376var target = targetWithAnnotations.Type; 2397TypeSymbol.Equals(constructedSource.OriginalDefinition, target.OriginalDefinition, TypeCompareKind.ConsiderEverything2)) 2431private bool UpperBoundClassInference(NamedTypeSymbol source, TypeSymbol target, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2448if (TypeSymbol.Equals(targetBase.OriginalDefinition, source.OriginalDefinition, TypeCompareKind.ConsiderEverything2)) 2460private bool UpperBoundInterfaceInference(NamedTypeSymbol source, TypeSymbol target, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2514Debug.Assert(TypeSymbol.Equals(source.OriginalDefinition, target.OriginalDefinition, TypeCompareKind.ConsiderEverything2)); 2553private bool UpperBoundFunctionPointerTypeInference(TypeSymbol source, TypeSymbol target, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2798static bool isExpressionType(TypeSymbol? type) 2832var source = sourceWithAnnotations.Type; 2833var destination = destinationWithAnnotations.Type; 2954if (TypeSymbol.Equals(currentInterface.OriginalDefinition, target.OriginalDefinition, TypeCompareKind.ConsiderEverything)) 2960else if (!TypeSymbol.Equals(matchingInterface, currentInterface, TypeCompareKind.ConsiderEverything)) 3043TypeSymbol source = argument.Type; 3088private static bool IsReallyAType(TypeSymbol? type)
Binder\Semantics\OverloadResolution\OverloadResolution.cs (52)
129TypeSymbol returnType = null, 169TypeSymbol returnType = null, 237TypeSymbol returnType, 620TypeSymbol returnType, 1154private bool TypeArgumentsAccessible(ImmutableArray<TypeSymbol> typeArguments, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1156foreach (TypeSymbol arg in typeArguments) 1286private static bool IsLessDerivedThanAny<TMember>(TypeSymbol type, ArrayBuilder<MemberResolutionResult<TMember>> results, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1645private TypeSymbol GetParameterType(ParameterSymbol parameter, MemberAnalysisResult result) 1647var type = parameter.Type; 1759var type1 = GetParameterType(parameter1, m1.Result); 1762var type2 = GetParameterType(parameter2, m2.Result); 1778var type1Normalized = type1; 1779var type2Normalized = type2; 1903var type1 = GetParameterType(parameter1, m1.Result); 1906var type2 = GetParameterType(parameter2, m2.Result); 1908var type1Normalized = type1; 1909var type2Normalized = type2; 2048using (var uninst1 = TemporaryArray<TypeSymbol>.Empty) 2049using (var uninst2 = TemporaryArray<TypeSymbol>.Empty) 2234private static BetterResult MoreSpecificType(ref TemporaryArray<TypeSymbol> t1, ref TemporaryArray<TypeSymbol> t2, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2266private static BetterResult MoreSpecificType(TypeSymbol t1, TypeSymbol t2, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2343using var allTypeArgs1 = TemporaryArray<TypeSymbol>.Empty; 2344using var allTypeArgs2 = TemporaryArray<TypeSymbol>.Empty; 2354private BetterResult BetterConversionFromExpression(BoundExpression node, TypeSymbol t1, TypeSymbol t2, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2370TypeSymbol t1, 2373TypeSymbol t2, 2424private BetterResult BetterConversionFromExpression(BoundExpression node, TypeSymbol t1, Conversion conv1, TypeSymbol t2, Conversion conv2, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, out bool okToDowngradeToNeither) 2514private bool ExpressionMatchExactly(BoundExpression node, TypeSymbol t, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2538TypeSymbol y; 2630private bool ExpressionMatchExactly(BoundTupleLiteral tupleSource, TypeSymbol targetType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2702TypeSymbol type1, 2703TypeSymbol type2, 2712TypeSymbol type1, 2713TypeSymbol type2, 2728TypeSymbol type1, 2730TypeSymbol type2, 2740TypeSymbol type1, 2742TypeSymbol type2, 2819TypeSymbol r1 = invoke1.ReturnType; 2820TypeSymbol r2 = invoke2.ReturnType; 2907private bool CanDowngradeConversionFromLambdaToNeither(BetterResult currentResult, UnboundLambda lambda, TypeSymbol type1, TypeSymbol type2, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, bool fromTypeAnalysis) 2936TypeSymbol r1 = invoke1.ReturnType; 2937TypeSymbol r2 = invoke2.ReturnType; 3031private static bool IsSignedIntegralType(TypeSymbol type) 3052private static bool IsUnsignedIntegralType(TypeSymbol type) 3755TypeSymbol parameterType, 3790var argType = argument.Type;
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (7)
203TypeSymbol delegateOrFunctionPointerType = null) where T : Symbol 625TypeSymbol delegateOrFunctionPointerType) 676private bool HadReturnMismatch(Location location, BindingDiagnosticBag diagnostics, TypeSymbol delegateOrFunctionPointerType) 1035TypeSymbol formalParameterType = method.GetParameterType(result.Result.BadParameter); 1177TypeSymbol parameterType = UnwrapIfParamsArray(parameter, isLastParameter) is TypeSymbol t ? t : parameter.Type; 1265if (argument.Display is TypeSymbol argType)
Binder\SwitchBinder.cs (3)
47protected TypeSymbol SwitchGoverningType => SwitchGoverningExpression.Type; 376var switchGoverningType = switchGoverningExpression.Type; 406TypeSymbol resultantGoverningType;
Binder\SwitchExpressionArmBinder.cs (2)
32TypeSymbol inputType = _switchExpressionBinder.GetInputType(); 36internal override BoundSwitchExpressionArm BindSwitchExpressionArm(SwitchExpressionArmSyntax node, TypeSymbol switchGoverningType, BindingDiagnosticBag diagnostics)
Binder\SwitchExpressionBinder.cs (8)
32TypeSymbol? naturalType = InferResultType(switchArms, diagnostics); 134private TypeSymbol? InferResultType(ImmutableArray<BoundSwitchExpressionArm> switchCases, BindingDiagnosticBag diagnostics) 136var seenTypes = Symbols.SpecializedSymbolCollections.GetPooledSymbolHashSetInstance<TypeSymbol>(); 137var typesInOrder = ArrayBuilder<TypeSymbol>.GetInstance(); 140var type = @case.Value.Type; 149var commonType = BestTypeInferrer.GetBestType(typesInOrder, Conversions, ref useSiteInfo); 173TypeSymbol inputType = GetInputType(inputExpression); 185internal TypeSymbol GetInputType(BoundExpression? inputExpression = null)
Binder\UsingStatementBinder.cs (8)
111TypeSymbol? declarationTypeOpt = null; 113TypeSymbol? awaitableTypeOpt; 184bool bindDisposable(bool fromExpression, out MethodArgumentInfo? patternDisposeInfo, out TypeSymbol? awaitableType) 186TypeSymbol disposableInterface = getDisposableInterface(hasAwait); 207TypeSymbol? type = fromExpression ? expressionOpt!.Type : declarationTypeOpt; 254TypeSymbol alternateInterface = getDisposableInterface(!hasAwait); 269Conversion classifyConversion(bool fromExpression, TypeSymbol targetInterface, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 290TypeSymbol getDisposableInterface(bool isAsync)
Binder\WithClassTypeParametersBinder.cs (2)
30internal override bool IsAccessibleHelper(Symbol symbol, TypeSymbol accessThroughType, out bool failedThroughTypeCheck, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, ConsList<TypeSymbol> basesBeingResolved)
Binder\WithExternAliasesBinder.cs (1)
33LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\WithExternAndUsingAliasesBinder.cs (5)
34protected abstract ImmutableDictionary<string, AliasAndUsingDirective> GetUsingAliasesMap(ConsList<TypeSymbol>? basesBeingResolved); 37LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 84internal bool IsUsingAlias(string name, bool callerIsSemanticModel, ConsList<TypeSymbol>? basesBeingResolved) 151protected override ImmutableDictionary<string, AliasAndUsingDirective> GetUsingAliasesMap(ConsList<TypeSymbol>? basesBeingResolved) 255protected override ImmutableDictionary<string, AliasAndUsingDirective> GetUsingAliasesMap(ConsList<TypeSymbol>? basesBeingResolved)
Binder\WithLambdaParametersBinder.cs (2)
47protected override TypeSymbol GetCurrentReturnType(out RefKind refKind) 87LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\WithParametersBinder.cs (1)
46LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\WithPrimaryConstructorParametersBinder.cs (1)
64LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\WithTypeParametersBinder.cs (1)
39LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\WithUsingNamespacesAndTypesBinder.cs (6)
35internal abstract ImmutableArray<NamespaceOrTypeAndUsingDirective> GetUsings(ConsList<TypeSymbol>? basesBeingResolved); 131LookupResult result, string name, int arity, ConsList<TypeSymbol>? basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 281internal override ImmutableArray<NamespaceOrTypeAndUsingDirective> GetUsings(ConsList<TypeSymbol>? basesBeingResolved) 311internal override ImmutableArray<NamespaceOrTypeAndUsingDirective> GetUsings(ConsList<TypeSymbol>? basesBeingResolved) 316private Imports GetImports(ConsList<TypeSymbol>? basesBeingResolved) 345internal override ImmutableArray<NamespaceOrTypeAndUsingDirective> GetUsings(ConsList<TypeSymbol>? basesBeingResolved)
BoundTree\BoundBinaryOperator.UncommonData.cs (3)
33public static UncommonData? CreateIfNeeded(ConstantValue? constantValue, MethodSymbol? method, TypeSymbol? constrainedToType, ImmutableArray<MethodSymbol> originalUserDefinedOperatorsOpt) 45public readonly TypeSymbol? ConstrainedToType; 54private UncommonData(ConstantValue? constantValue, MethodSymbol? method, TypeSymbol? constrainedToType, ImmutableArray<MethodSymbol> originalUserDefinedOperatorsOpt, bool isUnconvertedInterpolatedStringAddition, InterpolatedStringHandlerData? interpolatedStringHandlerData)
BoundTree\BoundDagTemp.cs (1)
21public static BoundDagTemp ForOriginalInput(SyntaxNode syntax, TypeSymbol type) => new BoundDagTemp(syntax, type, source: null, 0);
BoundTree\BoundExpression.cs (4)
278public BoundLocal(SyntaxNode syntax, LocalSymbol localSymbol, ConstantValue? constantValueOpt, TypeSymbol type, bool hasErrors = false) 283public BoundLocal Update(LocalSymbol localSymbol, ConstantValue? constantValueOpt, TypeSymbol type) 361internal TypeSymbol? ConstrainedToType => Data?.ConstrainedToType; 479TypeSymbol? changeTypeOpt = null)
BoundTree\BoundExpressionExtensions.cs (3)
113var type = node.Type; 126public static TypeSymbol? GetTypeOrFunctionType(this BoundExpression expr) 246TypeSymbol? receiverType = expressionOpt.Type;
BoundTree\BoundExpressionWithNullability.cs (1)
11public BoundExpressionWithNullability(SyntaxNode syntax, BoundExpression expression, NullableAnnotation nullableAnnotation, TypeSymbol? type)
BoundTree\BoundNullCoalescingAssignmentOperator.cs (2)
15var leftType = LeftOperand.Type; 21var nullableUnderlying = leftType.GetNullableUnderlyingType();
BoundTree\BoundObjectCreationExpression.cs (3)
14BoundObjectInitializerExpressionBase? initializerExpressionOpt, TypeSymbol type, bool hasErrors = false) 19ImmutableArray<int> argsToParamsOpt, BitVector defaultArguments, ConstantValue? constantValueOpt, BoundObjectInitializerExpressionBase? initializerExpressionOpt, TypeSymbol type) 26BitVector defaultArguments, ConstantValue? constantValueOpt, BoundObjectInitializerExpressionBase? initializerExpressionOpt, TypeSymbol type)
BoundTree\BoundSpillSequence.cs (1)
20TypeSymbol type,
BoundTree\BoundTreeRewriter.cs (3)
16public virtual TypeSymbol? VisitType(TypeSymbol? type) 145var type = this.VisitType(binary.Type);
BoundTree\Constructors.cs (38)
29TypeSymbol type, 42TypeSymbol type, 53TypeSymbol typeSymbol) 97TypeSymbol type, 114TypeSymbol type) 247TypeSymbol type, 260TypeSymbol type) 271public static BoundConversion SynthesizedNonUserDefined(SyntaxNode syntax, BoundExpression operand, Conversion conversion, TypeSymbol type, ConstantValue? constantValueOpt = null) 300TypeSymbol type, 326TypeSymbol type, 351TypeSymbol type, 364TypeSymbol type) 377TypeSymbol? constrainedToTypeOpt, 380TypeSymbol type, 398TypeSymbol? constrainedToTypeOpt, 402TypeSymbol type, 411TypeSymbol? constrainedToTypeOpt, 415TypeSymbol type) 437TypeSymbol? constrainedToTypeOpt, 440TypeSymbol type, 463TypeSymbol? constrainedToTypeOpt, 467TypeSymbol type) 502public BoundTypeExpression(SyntaxNode syntax, AliasSymbol? aliasOpt, TypeSymbol type, bool hasErrors = false) 534TypeSymbol type, bool isRef = false, bool hasErrors = false) 542public BoundBadExpression(SyntaxNode syntax, LookupResultKind resultKind, ImmutableArray<Symbol?> symbols, ImmutableArray<BoundExpression> childBoundNodes, TypeSymbol type) 622public BoundDefaultExpression(SyntaxNode syntax, TypeSymbol type, bool hasErrors = false) 638public BoundAddressOfOperator(SyntaxNode syntax, BoundExpression operand, TypeSymbol type, bool hasErrors = false) 646public BoundDagTemp(SyntaxNode syntax, TypeSymbol type, BoundDagEvaluation? source) 665TypeSymbol type, 679TypeSymbol type) 691TypeSymbol? constrainedToTypeOpt, 693TypeSymbol type, 703TypeSymbol? constrainedToTypeOpt, 705TypeSymbol type) 716TypeSymbol? constrainedToTypeOpt, 722TypeSymbol type, 728public BoundIncrementOperator Update(UnaryOperatorKind operatorKind, BoundExpression operand, MethodSymbol? methodOpt, TypeSymbol? constrainedToTypeOpt, BoundValuePlaceholder? operandPlaceholder, BoundExpression? operandConversion, BoundValuePlaceholder? resultPlaceholder, BoundExpression? resultConversion, LookupResultKind resultKind, TypeSymbol type)
BoundTree\InterpolatedStringHandlerData.cs (2)
13public readonly TypeSymbol BuilderType; 30TypeSymbol builderType,
BoundTree\NullabilityRewriter.cs (3)
51bool foundInfo = _updatedNullabilities.TryGetValue(currentBinary, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType); 53var type = foundInfo ? infoAndType.Type : currentBinary.Type; 173if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
BoundTree\TupleBinaryOperatorInfo.cs (10)
29internal readonly TypeSymbol? LeftConvertedTypeOpt; 30internal readonly TypeSymbol? RightConvertedTypeOpt; 36private TupleBinaryOperatorInfo(TypeSymbol? leftConvertedTypeOpt, TypeSymbol? rightConvertedTypeOpt) 49internal readonly TypeSymbol? ConstrainedToTypeOpt; 57TypeSymbol? leftConvertedTypeOpt, 58TypeSymbol? rightConvertedTypeOpt, 61TypeSymbol? constrainedToTypeOpt, 108internal Multiple(ImmutableArray<TupleBinaryOperatorInfo> operators, TypeSymbol? leftConvertedTypeOpt, TypeSymbol? rightConvertedTypeOpt)
BoundTree\UnboundLambda.cs (14)
82public BoundLambda(SyntaxNode syntax, UnboundLambda unboundLambda, BoundBlock body, ImmutableBindingDiagnostic<AssemblySymbol> diagnostics, Binder binder, TypeSymbol? delegateType, InferredLambdaReturnType inferredReturnType) 183internal static readonly TypeSymbol NoReturnExpression = new UnsupportedMetadataTypeSymbol(); 186BoundLambda node, Binder binder, TypeSymbol? delegateType, bool isAsync, ConversionsBase conversions) 193UnboundLambda node, Binder binder, TypeSymbol? delegateType, bool isAsync, ConversionsBase conversions) 203BoundNode node, Binder binder, TypeSymbol? delegateType, bool isAsync, ConversionsBase conversions, bool withDependencies) 245TypeSymbol? delegateType, 268var bestType = returns[0].expr.GetTypeOrFunctionType(); 289var bestType = BestTypeInferrer.InferBestType(returns.SelectAsArray(pair => pair.expr), conversions, ref useSiteInfo, out inferredFromFunctionType); 377var type = (expression is null) ? 474public void GenerateAnonymousFunctionConversionError(BindingDiagnosticBag diagnostics, TypeSymbol targetType) { Data.GenerateAnonymousFunctionConversionError(diagnostics, targetType); } 481public TypeSymbol ParameterType(int index) { return ParameterTypeWithAnnotations(index).Type; } 571public virtual void GenerateAnonymousFunctionConversionError(BindingDiagnosticBag diagnostics, TypeSymbol targetType) 590internal IEnumerable<TypeSymbol> InferredReturnTypes() 1011!TypeSymbol.Equals(other.TaskLikeReturnTypeOpt, this.TaskLikeReturnTypeOpt, TypeCompareKind.ConsiderEverything2))
CodeGen\CodeGenerator.cs (1)
344private void EmitSymbolToken(TypeSymbol symbol, SyntaxNode syntaxNode)
CodeGen\EmitAddress.cs (4)
138var type = expression.Type; 236var receiverType = expression.Type; 403var elementType = arrayAccess.Type; 501var receiverType = receiver.Type;
CodeGen\EmitArrayInitializer.cs (3)
224TypeSymbol type = init.Type.EnumUnderlyingTypeOrSelf(); 245private ArrayInitializerStyle ShouldEmitBlockInitializer(TypeSymbol elementType, ImmutableArray<BoundExpression> inits) 464TypeSymbol? elementType = null;
CodeGen\EmitConversion.cs (10)
16private static bool IsNumeric(TypeSymbol type) 139var fromType = conversion.Operand.Type; 142var toType = conversion.Type; 213var fromType = conversion.Operand.Type; 217var toType = conversion.Type; 238var resultType = conversion.Type; 289var fromType = conversion.Operand.Type; 298var toType = conversion.Type; 310private void EmitDelegateCreation(BoundExpression node, BoundExpression receiver, bool isExtensionMethod, MethodSymbol method, TypeSymbol delegateType, bool used) 376private MethodSymbol DelegateConstructor(SyntaxNode syntax, TypeSymbol delegateType)
CodeGen\EmitExpression.cs (39)
367var receiverType = expression.Type; 394var receiverType = receiver.Type; 794var thisType = thisRef.Type; 987var elementType = arrayAccess.Type; 1130TypeSymbol fieldType = field.Type; 1279var type = expr.Type; 1386var parameterType = parameter.ParameterSymbol.Type; 1391private void EmitLoadIndirect(TypeSymbol type, SyntaxNode syntaxNode) 1605Debug.Assert(TypeSymbol.Equals(method.ContainingType, receiver.Type, TypeCompareKind.ConsiderEverything2)); 1657var receiverType = receiver.Type; 1692Debug.Assert(TypeSymbol.Equals(receiverType, methodContainingType, TypeCompareKind.ObliviousNullableModifierMatchesAny)); 1804var receiverType = receiver.Type; 1866var receiverType = receiver.Type; 2381var rightType = right.Type; 2994var elementType = arrayType.ElementType; 3092private void EmitIndirectStore(TypeSymbol type, SyntaxNode syntaxNode) 3190var operandType = operand.Type; 3191var targetType = asOp.Type; 3209private void EmitDefaultValue(TypeSymbol type, bool used, SyntaxNode syntaxNode) 3253private void EmitConstantExpression(TypeSymbol type, ConstantValue constantValue, bool used, SyntaxNode syntaxNode) 3269private void EmitInitObj(TypeSymbol type, bool used, SyntaxNode syntaxNode) 3292TypeSymbol type = boundTypeOfOperator.SourceType.Type; 3300TypeSymbol type = boundSizeOfOperator.SourceType.Type; 3435if (!TypeSymbol.Equals(node.Type, getMethod.ReturnType, TypeCompareKind.ConsiderEverything2)) 3462if (!TypeSymbol.Equals(node.Type, getField.ReturnType, TypeCompareKind.ConsiderEverything2)) 3511var mergeTypeOfAlternative = StackMergeType(expr.Alternative); 3519else if (expr.Type.IsInterfaceType() && !TypeSymbol.Equals(expr.Type, mergeTypeOfAlternative, TypeCompareKind.ConsiderEverything2)) 3537var mergeTypeOfConsequence = StackMergeType(expr.Consequence); 3543else if (expr.Type.IsInterfaceType() && !TypeSymbol.Equals(expr.Type, mergeTypeOfConsequence, TypeCompareKind.ConsiderEverything2)) 3572var mergeTypeOfLeftValue = StackMergeType(expr.LeftOperand); 3580else if (expr.Type.IsInterfaceType() && !TypeSymbol.Equals(expr.Type, mergeTypeOfLeftValue, TypeCompareKind.ConsiderEverything2)) 3604var mergeTypeOfRightValue = StackMergeType(expr.RightOperand); 3630private TypeSymbol StackMergeType(BoundExpression expr) 3688private static bool IsVarianceCast(TypeSymbol to, TypeSymbol from) 3690if (TypeSymbol.Equals(to, from, TypeCompareKind.ConsiderEverything2)) 3708return (to.IsDelegateType() && !TypeSymbol.Equals(to, from, TypeCompareKind.ConsiderEverything2)) || 3712private void EmitStaticCast(TypeSymbol to, SyntaxNode syntax) 3732private void EmitBox(TypeSymbol type, SyntaxNode syntaxNode)
CodeGen\EmitOperators.cs (4)
438var comparandType = comparand.Type; 452var comparandType = comparand.Type; 575TypeSymbol enumType; 587Debug.Assert(TypeSymbol.Equals(expression.Left.Type, expression.Right.Type, TypeCompareKind.ConsiderEverything2));
CodeGen\EmitStackAllocInitializer.cs (6)
19private void EmitStackAllocInitializers(TypeSymbol type, BoundArrayInitialization inits) 23var elementType = (type.TypeKind == TypeKind.Pointer 72private ArrayInitializerStyle ShouldEmitBlockInitializerForStackAlloc(TypeSymbol elementType, ImmutableArray<BoundExpression> inits) 123private void EmitElementStackAllocInitializers(TypeSymbol elementType, ImmutableArray<BoundExpression> inits, bool includeConstants) 141private void EmitPointerElementAccess(BoundExpression init, TypeSymbol elementType, int elementTypeSizeInBytes, int index) 168private 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; 1320TypeSymbol keyType) 1429void emitFinalDispatches(LengthBasedStringSwitchData lengthBasedSwitchInfo, LocalOrParameter keyTemp, TypeSymbol keyType, LabelSymbol fallThroughLabel, SyntaxNode syntaxNode) 1459TypeSymbol keyType) 1601private Cci.IMethodReference? GetLengthMethodRef(SyntaxNode syntaxNode, TypeSymbol keyType, bool isReadOnlySpan, bool isSpanOrReadOnlySpan) 1625private Microsoft.Cci.IMethodReference? GetIndexerRef(SyntaxNode syntaxNode, TypeSymbol keyType, bool isReadOnlySpan, bool isSpanOrReadOnlySpan) 1771TypeSymbol pointedAtType = pointerType.PointedAtType; 1877private LocalDefinition AllocateTemp(TypeSymbol type, SyntaxNode syntaxNode, LocalSlotConstraints slotConstraints = LocalSlotConstraints.None)
CodeGen\Optimizer.cs (7)
1143var receiverType = receiver.Type; 1459var type = this.VisitType(binary.Type); 1675var exceptionTypeOpt = this.VisitType(node.ExceptionTypeOpt); 2034var type = this.VisitType(binary.Type); 2078TypeSymbol type = this.VisitType(node.Type); 2158TypeSymbol? type = this.VisitType(node.Type); 2166var type = node.ExceptionTypeOpt;
Compilation\BuiltInOperators.cs (10)
261TypeSymbol opType; 690internal void GetUtf8ConcatenationBuiltInOperator(TypeSymbol readonlySpanOfByte, ArrayBuilder<BinaryOperatorSignature> operators) 707var left = LeftType(kind); 723TypeSymbol rightType = _compilation.GetSpecialType(SpecialType.System_Int32); 741private TypeSymbol LeftType(BinaryOperatorKind kind) 773private TypeSymbol RightType(BinaryOperatorKind kind) 805private TypeSymbol ReturnType(BinaryOperatorKind kind) 836private TypeSymbol LiftedType(BinaryOperatorKind kind) 859internal static bool IsValidObjectEquality(Conversions Conversions, TypeSymbol leftType, bool leftIsNull, bool leftIsDefault, TypeSymbol rightType, bool rightIsNull, bool rightIsDefault, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Compilation\CSharpCompilation.cs (37)
59private TypeSymbol? _lazyHostObjectTypeSymbol; 1581internal TypeSymbol GetTypeByReflectionType(Type type, BindingDiagnosticBag diagnostics) 1583var result = Assembly.GetTypeByReflectionType(type); 1608internal TypeSymbol? GetHostObjectTypeSymbol() 1612TypeSymbol? symbol = Assembly.GetTypeByReflectionType(HostObjectType); 1654internal new TypeSymbol DynamicType 2005if (!(TypeSymbol.Equals(namedType.ConstructedFrom, GetWellKnownType(WellKnownType.System_Threading_Tasks_Task), TypeCompareKind.ConsiderEverything2) || 2006TypeSymbol.Equals(namedType.ConstructedFrom, GetWellKnownType(WellKnownType.System_Threading_Tasks_Task_T), TypeCompareKind.ConsiderEverything2))) 2036TypeSymbol returnType = method.ReturnType; 2131TypeSymbol? cssource = source.EnsureCSharpSymbolOrNull(nameof(source)); 2132TypeSymbol? csdest = destination.EnsureCSharpSymbolOrNull(nameof(destination)); 2190internal ArrayTypeSymbol CreateArrayTypeSymbol(TypeSymbol elementType, int rank = 1, NullableAnnotation elementNullableAnnotation = NullableAnnotation.Oblivious) 2208internal PointerTypeSymbol CreatePointerTypeSymbol(TypeSymbol elementType, NullableAnnotation elementNullableAnnotation = NullableAnnotation.Oblivious) 2225TypeSymbol? throughType0 = throughType.EnsureCSharpSymbolOrNull(nameof(throughType)); 3832var elementType = typeSymbol.EnsureCSharpSymbolOrNull($"{nameof(elementTypes)}[{i}]"); 3898var type = memberTypes[i].GetSymbol(); 3916var csharpReturnType = returnType.EnsureCSharpSymbolOrNull(nameof(returnType)); 3917var csharpLeftType = leftType.EnsureCSharpSymbolOrNull(nameof(leftType)); 3918var csharpRightType = rightType.EnsureCSharpSymbolOrNull(nameof(rightType)); 3986TypeSymbol.Equals(csharpLeftType, csharpRightType, TypeCompareKind.ConsiderEverything)) 3999TypeSymbol.Equals(csharpLeftType, csharpReturnType, TypeCompareKind.ConsiderEverything)) 4020TypeSymbol.Equals(csharpLeftType, csharpRightType, TypeCompareKind.ConsiderEverything)) 4031TypeSymbol.Equals(csharpLeftType, csharpRightType, TypeCompareKind.ConsiderEverything) && 4032TypeSymbol.Equals(csharpReturnType, csharpRightType, TypeCompareKind.ConsiderEverything)) 4045TypeSymbol.Equals(csharpLeftType, csharpReturnType, TypeCompareKind.ConsiderEverything)) 4052TypeSymbol.Equals(csharpRightType, csharpReturnType, TypeCompareKind.ConsiderEverything)) 4061TypeSymbol.Equals(csharpLeftType, csharpRightType, TypeCompareKind.ConsiderEverything)) 4085TypeSymbol.Equals(csharpLeftType, csharpReturnType, TypeCompareKind.ConsiderEverything)) 4094TypeSymbol.Equals(csharpRightType, csharpReturnType, TypeCompareKind.ConsiderEverything)) 4103TypeSymbol.Equals(csharpLeftType, csharpReturnType, TypeCompareKind.ConsiderEverything)) 4112TypeSymbol.Equals(csharpLeftType, csharpRightType, TypeCompareKind.ConsiderEverything)) 4129bool isAllowedPointerArithmeticIntegralType(TypeSymbol type) 4132bool isReadOnlySpanOfByteType(TypeSymbol type) 4141var csharpReturnType = returnType.EnsureCSharpSymbolOrNull(nameof(returnType)); 4142var csharpOperandType = operandType.EnsureCSharpSymbolOrNull(nameof(operandType)); 4195TypeSymbol.Equals(csharpOperandType, csharpReturnType, TypeCompareKind.ConsiderEverything)) 4203TypeSymbol.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)
964var declarationTypeSymbol = declarationType.GetSymbol(); 1591TypeSymbol containingType = binder.ContainingType; 1592TypeSymbol baseType = null; 1667TypeSymbol containingType = (TypeSymbol)container; 2067TypeSymbol type = null; 2107TypeSymbol convertedType; 2263static (TypeSymbol, NullabilityInfo) getTypeAndNullability(BoundExpression expr) => (expr.Type, expr.TopLevelNullability); 2314TypeSymbol type = unwrapped as TypeSymbol; 2351TypeSymbol type = UnwrapAlias(symbol) as TypeSymbol; 2826TypeSymbol cdestination = destination.EnsureCSharpSymbolOrNull(nameof(destination)); 2872internal abstract Conversion ClassifyConversionForCast(ExpressionSyntax expression, TypeSymbol destination); 2888internal Conversion ClassifyConversionForCast(int position, ExpressionSyntax expression, TypeSymbol destination) 3719private static ParameterSymbol GetThisParameter(TypeSymbol typeOfThis, NamedTypeSymbol containingType, Symbol containingMember, out LookupResultKind resultKind) 3872private static Symbol GetIntrinsicOperatorSymbol(BinaryOperatorKind op, bool isDynamic, TypeSymbol leftType, TypeSymbol rightType, TypeSymbol returnType, bool isChecked) 3976TypeSymbol.Equals((TypeSymbol)unwrappedSymbols[0], boundAttribute.Type.GetNonErrorGuess(), TypeCompareKind.ConsiderEverything2)); 4073TypeSymbol type = boundNode.Type; 4645TypeSymbol receiverType, 4684TypeSymbol receiverType, 4725TypeSymbol extensionThisType = null;
Compilation\MemberSemanticModel.cs (2)
429TypeSymbol csdestination = destination.EnsureCSharpSymbolOrNull(nameof(destination)); 478TypeSymbol destination)
Compilation\MemberSemanticModel.NodeMapBuilder.cs (2)
93TypeSymbol.Equals(((BoundTypeExpression)existing[i]).Type, ((BoundTypeOrValueExpression)added[i]).Type, TypeCompareKind.ConsiderEverything2), 101TypeSymbol.Equals(((BoundTypeOrValueExpression)existing[i]).Type, ((BoundTypeExpression)added[i]).Type, TypeCompareKind.ConsiderEverything2),
Compilation\SpeculativeSemanticModelWithMemberModel.cs (1)
226TypeSymbol destination)
Compilation\SyntaxTreeSemanticModel.cs (4)
497private ConsList<TypeSymbol> GetBasesBeingResolved(TypeSyntax expression) 509return ConsList<TypeSymbol>.Empty.Prepend(symbol.GetSymbol().OriginalDefinition); 518TypeSymbol csdestination = destination.EnsureCSharpSymbolOrNull(nameof(destination)); 554internal 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)
709TypeSymbol type; 974private bool IsCompliantType(TypeSymbol type, NamedTypeSymbol context) 1093return !TypeSymbol.Equals(containingType, contextBaseType, TypeCompareKind.AllIgnoreOptions); 1109System.Diagnostics.Debug.Assert(symbol.Kind == SymbolKind.NamedType || !((symbol is TypeSymbol)), 1362TypeSymbol xType = xParameterTypes[i].Type; 1363TypeSymbol yType = yParameterTypes[i].Type; 1378bool elementTypesDiffer = !TypeSymbol.Equals(xArrayType.ElementType, yArrayType.ElementType, TypeCompareKind.ConsiderEverything2); 1391else if (!TypeSymbol.Equals(xType, yType, TypeCompareKind.ConsiderEverything2))
Compiler\DocumentationCommentCompiler.cs (1)
1093diagnostics.AddDependencies(symbol as TypeSymbol ?? symbol.ContainingType);
Compiler\MethodBodySynthesizer.cs (3)
345TypeSymbol delegateType = eventSymbol.Type; 349TypeSymbol boolType = compilation.GetSpecialType(SpecialType.System_Boolean); 417compareExchangeMethod = compareExchangeMethod.Construct(ImmutableArray.Create<TypeSymbol>(delegateType));
Compiler\MethodBodySynthesizer.Lowered.cs (3)
249this.ImplementingMethod.Construct(this.TypeParameters.Cast<TypeParameterSymbol, TypeSymbol>()) : 329methodBeingWrapped = methodBeingWrapped.ConstructedFrom.Construct(StaticCast<TypeSymbol>.From(this.TypeParameters)); 360TypeSymbol system_Int32 = currentHashValue.Type!;
Compiler\MethodCompiler.cs (3)
233var returnType = entryPoint.ReturnType; 570TypeSymbol discarded = fieldSymbol.FixedImplementationType(compilationState.ModuleBuilderOpt); 2298if (ctorCall != null && !ctorCall.HasAnyErrors && ctorCall.Method != method && TypeSymbol.Equals(ctorCall.Method.ContainingType, method.ContainingType, TypeCompareKind.ConsiderEverything2))
Declarations\DeclarationTreeBuilder.cs (1)
145name: TypeSymbol.ImplicitTypeName,
DocumentationComments\DocumentationCommentIDVisitor.PartVisitor.cs (1)
190if (!_inParameterOrReturnType && TypeSymbol.Equals(symbol, symbol.ConstructedFrom, TypeCompareKind.AllIgnoreOptions))
Emitter\EditAndContinue\CSharpDefinitionMap.cs (2)
133foreach (var member in ((TypeSymbol)stateMachineType).GetMembers()) 206ImmutableArray<LocalInfo<TypeSymbol>> slotMetadata)
Emitter\EditAndContinue\CSharpSymbolMatcher.cs (28)
362var otherElementType = (TypeSymbol?)Visit(symbol.ElementType); 508var newType = (TypeSymbol?)v.Visit(t.Type); 588var otherPointedAtType = (TypeSymbol?)Visit(symbol.PointedAtType); 603var otherReturnType = (TypeSymbol?)Visit(sig.ReturnType); 622var otherType = (TypeSymbol?)Visit(param.Type); 735var otherType = type.WithTypeAndModifiers((TypeSymbol?)this.Visit(type.Type), this.VisitCustomModifiers(type.CustomModifiers)); 947private bool AreTypesEqual(TypeSymbol type, TypeSymbol other) 1022public bool Equals(TypeSymbol source, TypeSymbol other) 1029var visitedSource = (TypeSymbol?)_matcher.Visit(source); 1030var visitedOther = (_deepTranslator != null) ? (TypeSymbol)_deepTranslator.Visit(other) : other; 1061var translatedElementType = (TypeSymbol)this.Visit(symbol.ElementType); 1083var translatedTypeArguments = type.GetAllTypeArguments(ref discardedUseSiteInfo).SelectAsArray((t, v) => t.WithTypeAndModifiers((TypeSymbol)v.Visit(t.Type), 1104var translatedPointedAtType = (TypeSymbol)this.Visit(symbol.PointedAtType); 1112var translatedReturnType = (TypeSymbol)Visit(sig.ReturnType); 1126var translatedParamType = (TypeSymbol)Visit(param.Type);
Emitter\EditAndContinue\PEDeltaAssemblyBuilder.cs (3)
101internal override Cci.ITypeReference EncTranslateLocalVariableType(TypeSymbol type, DiagnosticBag diagnostics) 105var 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)
35var implType = isFixed ? AdaptedFieldSymbol.FixedImplementationType(moduleBeingBuilt) : fieldTypeWithAnnotations.Type;
Emitter\Model\NamedTypeSymbolAdapter.cs (1)
362TypeSymbol objectType = AdaptedNamedTypeSymbol.DeclaringCompilation.GetSpecialType(CodeAnalysis.SpecialType.System_Object);
Emitter\Model\ParameterSymbolAdapter.cs (1)
82TypeSymbol type;
Emitter\Model\PEModuleBuilder.cs (12)
26internal abstract class PEModuleBuilder : PEModuleBuilder<CSharpCompilation, SourceModuleSymbol, AssemblySymbol, TypeSymbol, NamedTypeSymbol, MethodSymbol, SyntaxNode, NoPia.EmbeddedTypesManager, ModuleCompilationState> 33private readonly ConcurrentSet<TypeSymbol> _reportedErrorTypesMap = new ConcurrentSet<TypeSymbol>(); 1117TypeSymbol typeSymbol, 1672internal SynthesizedAttributeData SynthesizeNativeIntegerAttribute(Symbol symbol, TypeSymbol type) 1839TypeSymbol returnType = factory.SpecialType(SpecialType.System_Void); 1840TypeSymbol argumentType = factory.SpecialType(SpecialType.System_Object); 1841TypeSymbol paramNameType = factory.SpecialType(SpecialType.System_String); 1869TypeSymbol returnType = factory.SpecialType(SpecialType.System_Void); 1870TypeSymbol unmatchedValueType = factory.SpecialType(SpecialType.System_Object); 1890TypeSymbol returnType = factory.SpecialType(SpecialType.System_Void); 1915TypeSymbol returnType = factory.SpecialType(SpecialType.System_Void);
Emitter\NoPia\EmbeddedTypesManager.cs (1)
68if (TypeSymbol.Equals(Interlocked.CompareExchange(ref _lazySystemStringType, typeSymbol, ErrorTypeSymbol.UnknownResultType), ErrorTypeSymbol.UnknownResultType, TypeCompareKind.ConsiderEverything2))
Errors\LazyMissingNonNullTypesContextDiagnosticInfo.cs (1)
83internal static bool IsNullableReference(TypeSymbol type)
FlowAnalysis\AbstractFlowPass.cs (1)
1369private static bool TypeIsImmutable(TypeSymbol t)
FlowAnalysis\DefiniteAssignment.cs (8)
245Debug.Assert(member is TypeSymbol type && 870internal static bool WriteConsideredUse(TypeSymbol type, BoundExpression value) 1084private bool MayRequireTrackingReceiverType(TypeSymbol type) 1579TypeSymbol structType = variable.Symbol.GetTypeOrReturnType().Type; 1608TypeSymbol type = id.Symbol.GetTypeOrReturnType().Type; 1644TypeSymbol type = id.Symbol.GetTypeOrReturnType().Type; 2419if (refKind != RefKind.None && ((object)method == null || method.IsExtern) && arg.Type is TypeSymbol type) 2462private void MarkFieldsUsed(TypeSymbol type)
FlowAnalysis\DefiniteAssignment.LocalFunctions.cs (1)
105var type = id.Symbol.GetTypeOrReturnType().Type;
FlowAnalysis\EmptyStructTypeCache.cs (8)
75public override bool IsEmptyStructType(TypeSymbol type) 84public virtual bool IsEmptyStructType(TypeSymbol type) 94private bool IsEmptyStructType(TypeSymbol type, ConsList<NamedTypeSymbol> typesWithMembersOfThisType) 129public static bool IsTrackableStructType(TypeSymbol type) 153var actualFieldType = field.Type; 168public IEnumerable<FieldSymbol> GetStructInstanceFields(TypeSymbol type) 221private bool ShouldIgnoreStructField(Symbol member, TypeSymbol memberType) 234private 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 (158)
111public VisitResult(TypeSymbol? type, NullableAnnotation annotation, NullableFlowState state) 115Debug.Assert(TypeSymbol.Equals(RValueType.Type, LValueType.Type, TypeCompareKind.ConsiderEverything)); 193private readonly ImmutableDictionary<BoundExpression, (NullabilityInfo Info, TypeSymbol? Type)>.Builder? _analyzedNullabilityMapOpt; 427ImmutableDictionary<BoundExpression, (NullabilityInfo, TypeSymbol?)>.Builder? analyzedNullabilityMapOpt, 996static ImmutableArray<Symbol> getAllTypeAndRequiredMembers(TypeSymbol containingType) 1449ImmutableDictionary<BoundExpression, (NullabilityInfo, TypeSymbol?)> analyzedNullabilitiesMap; 1454private static (SnapshotManager?, ImmutableDictionary<BoundExpression, (NullabilityInfo, TypeSymbol?)>) AnalyzeWithSemanticInfo( 1464var analyzedNullabilities = ImmutableDictionary.CreateBuilder<BoundExpression, (NullabilityInfo, TypeSymbol?)>(EqualityComparer<BoundExpression>.Default, NullabilityInfoTypeComparer.Instance); 1521var analyzedNullabilities = ImmutableDictionary.CreateBuilder<BoundExpression, (NullabilityInfo, TypeSymbol?)>(EqualityComparer<BoundExpression>.Default, NullabilityInfoTypeComparer.Instance); 1560private static BoundNode Rewrite(ImmutableDictionary<BoundExpression, (NullabilityInfo, TypeSymbol?)> updatedNullabilities, SnapshotManager? snapshotManager, BoundNode node, ref ImmutableDictionary<Symbol, Symbol>? remappedSymbols) 1682ImmutableDictionary<BoundExpression, (NullabilityInfo, TypeSymbol?)>.Builder? analyzedNullabilityMapOpt, 1956TypeSymbol slotType = NominalSlotType(result); 1957TypeSymbol? nodeType = node.Type; 1993var operandType = operand.Type; 1994var convertedType = conv.Type; 2011TypeSymbol.Equals(conv.Type, conv.Operand.Type, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes): 2156private static object GetTypeAsDiagnosticArgument(TypeSymbol? typeOpt) 2519private void InheritNullableStateOfTrackableStruct(TypeSymbol targetType, int targetSlot, int valueSlot, bool isDefaultValue, int skipSlot = -1) 2544TypeSymbol possibleBase = possibleMember.ContainingType; 2545TypeSymbol possibleDerived = NominalSlotType(slot); 2609private TypeSymbol NominalSlotType(int slot) 2641private void InheritDefaultState(TypeSymbol targetType, int targetSlot) 3350private static bool AreCloseEnough(TypeSymbol? typeA, TypeSymbol? typeB) 3366static bool canIgnoreAnyType(TypeSymbol type) 3370static bool canIgnoreType(TypeSymbol type) 3466var type = node.Type; 3467(int slot, NullableFlowState resultState, Func<TypeSymbol, MethodSymbol?, int>? initialStateInferenceCompletion) = inferInitialObjectState(node, type, constructor, arguments, argumentResults, isTargetTyped); 3469Action<int, TypeSymbol>? initializerCompletion = null; 3482TypeSymbol? type, 3485Func<TypeSymbol, MethodSymbol?, int>? initialStateInferenceCompletion, 3486Action<int, TypeSymbol>? initializerCompletion, 3514Func<TypeSymbol, MethodSymbol?, int> initialStateInferenceCompletion, 3515Action<int, TypeSymbol>? initializerCompletion, 3523Debug.Assert(TypeSymbol.Equals(resultTypeWithAnnotations.Type, node.Type, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes)); 3526var type = resultTypeWithAnnotations.Type; 3539static MethodSymbol? getConstructor(BoundObjectCreationExpressionBase node, TypeSymbol type) 3551(int slot, NullableFlowState resultState, Func<TypeSymbol, MethodSymbol?, int>? completion) inferInitialObjectState( 3552BoundExpression node, TypeSymbol type, MethodSymbol? constructor, 3621Func<TypeSymbol, MethodSymbol?, int> inferInitialObjectStateAsContinuation( 3626return (TypeSymbol type, MethodSymbol? constructor) => 3640private Action<int, TypeSymbol>? VisitObjectCreationInitializer(int containingSlot, TypeSymbol containingType, BoundObjectInitializerExpressionBase node, bool delayCompletionForType) 3643Action<int, TypeSymbol>? completion = null; 3690private Action<int, TypeSymbol>? VisitObjectElementInitializer(int containingSlot, TypeSymbol containingType, BoundAssignmentOperator node, bool delayCompletionForType) 3709Action<int, TypeSymbol>? visitMemberInitializer(int containingSlot, TypeSymbol containingType, BoundAssignmentOperator node, bool delayCompletionForType) 3748Action<int, TypeSymbol>? setAnalyzedNullability( 3770Action<int, TypeSymbol>? setAnalyzedNullabilityAsContinuation( 3776return (int containingSlot, TypeSymbol containingType) => 3790static Symbol? getTargetMember(TypeSymbol containingType, BoundObjectInitializerMember objectInitializer) 3796Debug.Assert(TypeSymbol.Equals(objectInitializer.Type, symbol.GetTypeOrReturnType().Type, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes)); 3808Action<int, Symbol>? visitNestedInitializer(int containingSlot, TypeSymbol containingType, Symbol symbol, BoundObjectInitializerExpressionBase initializer, bool delayCompletionForType) 3813Action<int, TypeSymbol>? nestedCompletion = VisitObjectCreationInitializer(slot, symbol.GetTypeOrReturnType().Type, initializer, delayCompletionForType); 3819Symbol symbol, BoundObjectInitializerExpressionBase initializer, int slot, Action<int, TypeSymbol>? nestedCompletion, 3840Action<int, Symbol>? completeNestedInitializerAnalysisAsContinuation(BoundObjectInitializerExpressionBase initializer, Action<int, TypeSymbol>? nestedCompletion) 3901private Action<int, TypeSymbol>? VisitCollectionElementInitializer(BoundCollectionElementInitializer node, TypeSymbol containingType, bool delayCompletionForType) 3927Debug.Assert(TypeSymbol.Equals(containingType, receiverResult.VisitResult.RValueType.Type, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes)); 3928Debug.Assert(TypeSymbol.Equals(containingType, receiverResult.LValueType.Type, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes)); 3934Action<int, TypeSymbol>? setUpdatedSymbol( 3936TypeSymbol containingType, 3961Action<int, TypeSymbol>? setUpdatedSymbolAsContinuation( 3966return (int containingSlot, TypeSymbol containingType) => 3976static MethodSymbol addMethodAsMemberOfContainingType(BoundCollectionElementInitializer node, TypeSymbol containingType, ref ImmutableArray<VisitArgumentResult> argumentResults) 3985Debug.Assert(TypeSymbol.Equals(containingType, receiverResult.VisitResult.RValueType.Type, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes)); 3986Debug.Assert(TypeSymbol.Equals(containingType, receiverResult.LValueType.Type, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes)); 4016protected override bool IsEmptyStructType(TypeSymbol type) 4152var arrayType = VisitArrayInitialization(node.Type, initialization, node.HasErrors); 4157private TypeSymbol VisitArrayInitialization(TypeSymbol type, BoundArrayInitialization initialization, bool hasErrors) 4174var resultType = type; 4207TypeSymbol? bestType = null; 4273static TypeSymbol setSpanElementType(NamedTypeSymbol namedType, TypeWithAnnotations elementType) 4328TypeSymbol? bestType = BestTypeInferrer.InferBestType(placeholders, walker._conversions, ref discardedUseSiteInfo, out inferredFromFunctionType); 4395TypeSymbol.Equals(node.Indices[0].Type, compilation.GetWellKnownType(WellKnownType.System_Range), TypeCompareKind.ConsiderEverything2)) 4408private TypeWithState InferResultNullability(BinaryOperatorKind operatorKind, MethodSymbol? methodOpt, TypeSymbol resultType, TypeWithState leftType, TypeWithState rightType) 4650TypeSymbol methodContainer = method.ContainingType; 4654TypeSymbol asMemberOfType = getTypeIfContainingType(methodContainer, leftUnderlyingType.Type, leftOperand) ?? 4743TypeSymbol? getTypeIfContainingType(TypeSymbol baseType, TypeSymbol? derivedType, BoundExpression operand) 4902var receiverType = conditional.Receiver.Type!; 4948private static bool PossiblyNullableType([NotNullWhen(true)] TypeSymbol? operandType) => operandType?.CanContainNull() == true; 5004private void LearnFromNullTest(int slot, TypeSymbol? expressionType, ref LocalState state, bool markDependentSlotsNotNull) 5024private void MarkDependentSlotsNotNull(int slot, TypeSymbol expressionType, ref LocalState state, int depth = 2) 5046static IEnumerable<Symbol> getMembers(TypeSymbol type) 5064static NamedTypeSymbol effectiveBase(TypeSymbol type) => type switch 5070static ImmutableArray<NamedTypeSymbol> inheritedInterfaces(TypeSymbol type) => type switch 5154var leftResultType = leftResult.Type; 5155var rightResultType = rightResult.Type; 5171(TypeSymbol ResultType, NullableFlowState LeftState) getLeftResultType(TypeSymbol leftType, TypeSymbol rightType) 5189(TypeSymbol ResultType, NullableFlowState LeftState) getResultStateWithRightType(TypeSymbol leftType, TypeSymbol rightType) 5375TypeSymbol accessType = accessTypeWithAnnotations.Type; 5376var oldType = node.Type; 5377var resultType = 5433TypeSymbol? refResultType = node.Type?.SetUnknownNullabilityForReferenceTypes(); 5464TypeSymbol? resultType; 5669var rvalueType = _currentConditionalReceiverVisitResult.RValueType.Type; 5766static bool isWellKnownEqualityMethodOrImplementation(CSharpCompilation compilation, MethodSymbol method, TypeSymbol? receiverType, WellKnownMember wellKnownMember) 5786for (var baseType = receiverType; baseType is object && method is object; baseType = baseType.BaseTypeNoUseSiteDiagnostics) 5966var type = receiverType.Type; 6413void applyMemberPostConditions(int receiverSlot, TypeSymbol type, ImmutableArray<string> members, ref LocalState state) 6426void markMembersAsNotNull(int receiverSlot, TypeSymbol type, string memberName, ref LocalState state) 6573var argumentResultType = resultType.Type; 6661static bool hasNoNonNullableCounterpart(TypeSymbol? type) 7247private Conversion GenerateConversionForConditionalOperator(BoundExpression sourceExpression, TypeSymbol? sourceType, TypeSymbol destinationType, bool reportMismatch, bool isChecked) 7258private static Conversion GenerateConversion(Conversions conversions, BoundExpression? sourceExpression, TypeSymbol? sourceType, TypeSymbol destinationType, bool fromExplicitCast, bool extensionMethodThisArgument, bool isChecked) 7328private static Symbol AsMemberOfType(TypeSymbol? type, Symbol symbol) 7533private static bool AreNullableAndUnderlyingTypes([NotNullWhen(true)] TypeSymbol? nullableTypeOpt, [NotNullWhen(true)] TypeSymbol? underlyingTypeOpt, out TypeWithAnnotations underlyingTypeWithAnnotations) 7653private void TrackNullableStateOfNullableValue(int containingSlot, TypeSymbol containingType, BoundExpression? value, TypeWithState valueType, int valueSlot) 7670TypeSymbol targetType, 7671TypeSymbol operandType, 7779private void ReportNullabilityMismatchWithTargetDelegate(Location location, TypeSymbol targetType, MethodSymbol targetInvokeMethod, MethodSymbol sourceInvokeMethod, bool invokedAsExtensionMethod) 7791void reportBadDelegateReturn(BindingDiagnosticBag bag, MethodSymbol targetInvokeMethod, MethodSymbol sourceInvokeMethod, bool topLevel, (TypeSymbol targetType, Location location) arg) 7798void reportBadDelegateParameter(BindingDiagnosticBag bag, MethodSymbol sourceInvokeMethod, MethodSymbol targetInvokeMethod, ParameterSymbol parameter, bool topLevel, (TypeSymbol targetType, Location location) arg) 7970TypeSymbol targetType = targetTypeWithNullability.Type; 7994static (MethodSymbol invokeSignature, ImmutableArray<ParameterSymbol>) getDelegateOrFunctionPointerInfo(TypeSymbol targetType) 8237static TypeWithState calculateResultType(TypeWithAnnotations targetTypeWithNullability, bool fromExplicitCast, NullableFlowState resultState, bool isSuppressed, TypeSymbol targetType) 8261var type = operandType.Type; 8292var type = operandType.Type; 8452TypeSymbol targetType = targetTypeWithNullability.Type; 8609static VisitResult withType(VisitResult visitResult, TypeSymbol newType) => 8620TypeSymbol type = typeNeedsLifting ? MakeNullableOf(returnType) : returnType.Type; 8629var type = typeWithState.Type; 8645private TypeSymbol MakeNullableOf(TypeWithAnnotations underlying) 8754Debug.Assert(TypeSymbol.Equals(resultTypeWithAnnotations.Type, node.Type, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes)); 8832TypeSymbol argType = arg.Type; 8851TypeSymbol argType = arg.Type; 9740private void ReportNullabilityMismatchInRefArgument(BoundExpression argument, TypeSymbol argumentType, ParameterSymbol parameter, TypeSymbol parameterType) 9752private void ReportNullabilityMismatchInArgument(SyntaxNode argument, TypeSymbol argumentType, ParameterSymbol parameter, TypeSymbol parameterType, bool forOutput) 9757private void ReportNullabilityMismatchInArgument(Location argumentLocation, TypeSymbol argumentType, ParameterSymbol? parameterOpt, TypeSymbol parameterType, bool forOutput) 9819var receiverType = VisitRvalueWithState(receiverOpt).Type; 9942private int GetNullableOfTValueSlot(TypeSymbol containingType, int containingSlot, out Symbol? valueProperty, bool forceSlotEvenIfEmpty = false) 9945Debug.Assert(TypeSymbol.Equals(NominalSlotType(containingSlot), containingType, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes)); 9990var resultType = resultTypeWithState.Type; 10568TypeSymbol type = node.Type; 10623var type = node.Type; 10880var resultTypeSymbol = resultType.Type; 10900private bool ReportPossibleNullReceiverIfNeeded(TypeSymbol type, NullableFlowState state, bool checkNullableValueType, SyntaxNode syntax, out bool reportedDiagnostic) 10941private static bool IsNullabilityMismatch(TypeSymbol type1, TypeSymbol type2) 11028var type = VisitArrayInitialization(node.Type, initialization, node.HasErrors); 11726private sealed class NullabilityInfoTypeComparer : IEqualityComparer<(NullabilityInfo info, TypeSymbol? type)> 11730public bool Equals((NullabilityInfo info, TypeSymbol? type) x, (NullabilityInfo info, TypeSymbol? type) y) 11736public int GetHashCode((NullabilityInfo info, TypeSymbol? type) obj)
FlowAnalysis\NullableWalker.DebugVerifier.cs (3)
20private readonly ImmutableDictionary<BoundExpression, (NullabilityInfo Info, TypeSymbol? Type)> _analyzedNullabilityMap; 25private DebugVerifier(ImmutableDictionary<BoundExpression, (NullabilityInfo Info, TypeSymbol? Type)> analyzedNullabilityMap, SnapshotManager? snapshotManager) 36public static void Verify(ImmutableDictionary<BoundExpression, (NullabilityInfo Info, TypeSymbol? Type)> analyzedNullabilityMap, SnapshotManager? snapshotManagerOpt, BoundNode node)
FlowAnalysis\NullableWalker_Patterns.cs (12)
132TypeSymbol inputType, 241var originalInputType = node.Expression.Type; 371var tempMap = PooledDictionary<BoundDagTemp, (int slot, TypeSymbol type)>.GetInstance(); 399(int inputSlot, TypeSymbol inputType) = tempMap.TryGetValue(evaluation.Input, out var slotAndType) ? slotAndType : throw ExceptionUtilities.Unreachable(); 554(int inputSlot, TypeSymbol inputType) = slotAndType; 700void addToTempMap(BoundDagTemp output, int slot, TypeSymbol type) 717bool isDerivedType(TypeSymbol derivedType, TypeSymbol baseType) 797void addTemp(BoundDagEvaluation e, TypeSymbol t, int index = 0) 806static TypeWithAnnotations getIndexerOutputType(TypeSymbol inputType, BoundExpression e, bool isSlice) 843var originalInputType = node.Expression.Type; 908TypeSymbol inferredType =
Generated\BoundNodes.xml.Generated.cs (1058)
414protected BoundExpression(BoundKind kind, SyntaxNode syntax, TypeSymbol? type, bool hasErrors) 420protected BoundExpression(BoundKind kind, SyntaxNode syntax, TypeSymbol? type) 426public TypeSymbol? Type { get; } 431protected BoundValuePlaceholderBase(BoundKind kind, SyntaxNode syntax, TypeSymbol? type, bool hasErrors) 436protected BoundValuePlaceholderBase(BoundKind kind, SyntaxNode syntax, TypeSymbol? type) 445protected BoundEarlyValuePlaceholderBase(BoundKind kind, SyntaxNode syntax, TypeSymbol? type, bool hasErrors) 450protected BoundEarlyValuePlaceholderBase(BoundKind kind, SyntaxNode syntax, TypeSymbol? type) 459public BoundValuePlaceholder(SyntaxNode syntax, TypeSymbol? type, bool hasErrors) 464public BoundValuePlaceholder(SyntaxNode syntax, TypeSymbol? type) 473public BoundValuePlaceholder Update(TypeSymbol? type) 475if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 487public BoundCapturedReceiverPlaceholder(SyntaxNode syntax, BoundExpression receiver, uint localScopeDepth, TypeSymbol? type, bool hasErrors = false) 503public BoundCapturedReceiverPlaceholder Update(BoundExpression receiver, uint localScopeDepth, TypeSymbol? type) 505if (receiver != this.Receiver || localScopeDepth != this.LocalScopeDepth || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 517public BoundDeconstructValuePlaceholder(SyntaxNode syntax, Symbol? variableSymbol, bool isDiscardExpression, TypeSymbol type, bool hasErrors) 527public BoundDeconstructValuePlaceholder(SyntaxNode syntax, Symbol? variableSymbol, bool isDiscardExpression, TypeSymbol type) 537public new TypeSymbol Type => base.Type!; 544public BoundDeconstructValuePlaceholder Update(Symbol? variableSymbol, bool isDiscardExpression, TypeSymbol type) 546if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(variableSymbol, this.VariableSymbol) || isDiscardExpression != this.IsDiscardExpression || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 558public BoundTupleOperandPlaceholder(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 566public BoundTupleOperandPlaceholder(SyntaxNode syntax, TypeSymbol type) 574public new TypeSymbol Type => base.Type!; 579public BoundTupleOperandPlaceholder Update(TypeSymbol type) 581if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 593public BoundAwaitableValuePlaceholder(SyntaxNode syntax, TypeSymbol? type, bool hasErrors) 598public BoundAwaitableValuePlaceholder(SyntaxNode syntax, TypeSymbol? type) 603public new TypeSymbol? Type => base.Type; 608public BoundAwaitableValuePlaceholder Update(TypeSymbol? type) 610if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 622public BoundDisposableValuePlaceholder(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 630public BoundDisposableValuePlaceholder(SyntaxNode syntax, TypeSymbol type) 638public new TypeSymbol Type => base.Type!; 643public BoundDisposableValuePlaceholder Update(TypeSymbol type) 645if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 657public BoundObjectOrCollectionValuePlaceholder(SyntaxNode syntax, bool isNewInstance, TypeSymbol type, bool hasErrors) 666public BoundObjectOrCollectionValuePlaceholder(SyntaxNode syntax, bool isNewInstance, TypeSymbol type) 675public new TypeSymbol Type => base.Type!; 681public BoundObjectOrCollectionValuePlaceholder Update(bool isNewInstance, TypeSymbol type) 683if (isNewInstance != this.IsNewInstance || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 695public BoundImplicitIndexerValuePlaceholder(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 703public BoundImplicitIndexerValuePlaceholder(SyntaxNode syntax, TypeSymbol type) 711public new TypeSymbol Type => base.Type!; 716public BoundImplicitIndexerValuePlaceholder Update(TypeSymbol type) 718if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 730public BoundImplicitIndexerReceiverPlaceholder(SyntaxNode syntax, bool isEquivalentToThisReference, TypeSymbol type, bool hasErrors) 739public BoundImplicitIndexerReceiverPlaceholder(SyntaxNode syntax, bool isEquivalentToThisReference, TypeSymbol type) 748public new TypeSymbol Type => base.Type!; 754public BoundImplicitIndexerReceiverPlaceholder Update(bool isEquivalentToThisReference, TypeSymbol type) 756if (isEquivalentToThisReference != this.IsEquivalentToThisReference || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 768public BoundListPatternReceiverPlaceholder(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 776public BoundListPatternReceiverPlaceholder(SyntaxNode syntax, TypeSymbol type) 784public new TypeSymbol Type => base.Type!; 789public BoundListPatternReceiverPlaceholder Update(TypeSymbol type) 791if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 803public BoundListPatternIndexPlaceholder(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 811public BoundListPatternIndexPlaceholder(SyntaxNode syntax, TypeSymbol type) 819public new TypeSymbol Type => base.Type!; 824public BoundListPatternIndexPlaceholder Update(TypeSymbol type) 826if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 838public BoundSlicePatternReceiverPlaceholder(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 846public BoundSlicePatternReceiverPlaceholder(SyntaxNode syntax, TypeSymbol type) 854public new TypeSymbol Type => base.Type!; 859public BoundSlicePatternReceiverPlaceholder Update(TypeSymbol type) 861if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 873public BoundSlicePatternRangePlaceholder(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 881public BoundSlicePatternRangePlaceholder(SyntaxNode syntax, TypeSymbol type) 889public new TypeSymbol Type => base.Type!; 894public BoundSlicePatternRangePlaceholder Update(TypeSymbol type) 896if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 908public BoundDup(SyntaxNode syntax, RefKind refKind, TypeSymbol? type, bool hasErrors) 914public BoundDup(SyntaxNode syntax, RefKind refKind, TypeSymbol? type) 925public BoundDup Update(RefKind refKind, TypeSymbol? type) 927if (refKind != this.RefKind || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 939public BoundPassByCopy(SyntaxNode syntax, BoundExpression expression, TypeSymbol? type, bool hasErrors = false) 953public BoundPassByCopy Update(BoundExpression expression, TypeSymbol? type) 955if (expression != this.Expression || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 967public BoundBadExpression(SyntaxNode syntax, LookupResultKind resultKind, ImmutableArray<Symbol?> symbols, ImmutableArray<BoundExpression> childBoundNodes, TypeSymbol? type, bool hasErrors = false) 986public BoundBadExpression Update(LookupResultKind resultKind, ImmutableArray<Symbol?> symbols, ImmutableArray<BoundExpression> childBoundNodes, TypeSymbol? type) 988if (resultKind != this.ResultKind || symbols != this.Symbols || childBoundNodes != this.ChildBoundNodes || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1056public BoundTypeExpression(SyntaxNode syntax, AliasSymbol? aliasOpt, BoundTypeExpression? boundContainingTypeOpt, ImmutableArray<BoundExpression> boundDimensionsOpt, TypeWithAnnotations typeWithAnnotations, TypeSymbol type, bool hasErrors = false) 1071public new TypeSymbol Type => base.Type!; 1077public BoundTypeExpression Update(AliasSymbol? aliasOpt, BoundTypeExpression? boundContainingTypeOpt, ImmutableArray<BoundExpression> boundDimensionsOpt, TypeWithAnnotations typeWithAnnotations, TypeSymbol type) 1079if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(aliasOpt, this.AliasOpt) || boundContainingTypeOpt != this.BoundContainingTypeOpt || boundDimensionsOpt != this.BoundDimensionsOpt || typeWithAnnotations != this.TypeWithAnnotations || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1091public BoundTypeOrValueExpression(SyntaxNode syntax, BoundTypeOrValueData data, TypeSymbol type, bool hasErrors) 1100public BoundTypeOrValueExpression(SyntaxNode syntax, BoundTypeOrValueData data, TypeSymbol type) 1109public new TypeSymbol Type => base.Type!; 1115public BoundTypeOrValueExpression Update(BoundTypeOrValueData data, TypeSymbol type) 1117if (data != this.Data || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1149public new TypeSymbol? Type => base.Type; 1170public BoundUnaryOperator(SyntaxNode syntax, UnaryOperatorKind operatorKind, BoundExpression operand, ConstantValue? constantValueOpt, MethodSymbol? methodOpt, TypeSymbol? constrainedToTypeOpt, LookupResultKind resultKind, ImmutableArray<MethodSymbol> originalUserDefinedOperatorsOpt, TypeSymbol type, bool hasErrors = false) 1186public new TypeSymbol Type => base.Type!; 1191public TypeSymbol? ConstrainedToTypeOpt { get; } 1198public BoundUnaryOperator Update(UnaryOperatorKind operatorKind, BoundExpression operand, ConstantValue? constantValueOpt, MethodSymbol? methodOpt, TypeSymbol? constrainedToTypeOpt, LookupResultKind resultKind, ImmutableArray<MethodSymbol> originalUserDefinedOperatorsOpt, TypeSymbol type) 1200if (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)) 1212public 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) 1231public new TypeSymbol Type => base.Type!; 1235public TypeSymbol? ConstrainedToTypeOpt { get; } 1246public 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) 1248if (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)) 1260public BoundAddressOfOperator(SyntaxNode syntax, BoundExpression operand, bool isManaged, TypeSymbol type, bool hasErrors = false) 1271public new TypeSymbol Type => base.Type!; 1278public BoundAddressOfOperator Update(BoundExpression operand, bool isManaged, TypeSymbol type) 1280if (operand != this.Operand || isManaged != this.IsManaged || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1302public new TypeSymbol? Type => base.Type; 1321public BoundFunctionPointerLoad(SyntaxNode syntax, MethodSymbol targetMethod, TypeSymbol? constrainedToTypeOpt, TypeSymbol type, bool hasErrors) 1332public BoundFunctionPointerLoad(SyntaxNode syntax, MethodSymbol targetMethod, TypeSymbol? constrainedToTypeOpt, TypeSymbol type) 1344public TypeSymbol? ConstrainedToTypeOpt { get; } 1345public new TypeSymbol Type => base.Type!; 1350public BoundFunctionPointerLoad Update(MethodSymbol targetMethod, TypeSymbol? constrainedToTypeOpt, TypeSymbol type) 1352if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(targetMethod, this.TargetMethod) || !TypeSymbol.Equals(constrainedToTypeOpt, this.ConstrainedToTypeOpt, TypeCompareKind.ConsiderEverything) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1364public BoundPointerIndirectionOperator(SyntaxNode syntax, BoundExpression operand, bool refersToLocation, TypeSymbol type, bool hasErrors = false) 1375public new TypeSymbol Type => base.Type!; 1382public BoundPointerIndirectionOperator Update(BoundExpression operand, bool refersToLocation, TypeSymbol type) 1384if (operand != this.Operand || refersToLocation != this.RefersToLocation || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1396public BoundPointerElementAccess(SyntaxNode syntax, BoundExpression expression, BoundExpression index, bool @checked, bool refersToLocation, TypeSymbol type, bool hasErrors = false) 1410public new TypeSymbol Type => base.Type!; 1419public BoundPointerElementAccess Update(BoundExpression expression, BoundExpression index, bool @checked, bool refersToLocation, TypeSymbol type) 1421if (expression != this.Expression || index != this.Index || @checked != this.Checked || refersToLocation != this.RefersToLocation || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1433public BoundFunctionPointerInvocation(SyntaxNode syntax, BoundExpression invokedExpression, ImmutableArray<BoundExpression> arguments, ImmutableArray<RefKind> argumentRefKindsOpt, LookupResultKind resultKind, TypeSymbol type, bool hasErrors = false) 1447public new TypeSymbol Type => base.Type!; 1456public BoundFunctionPointerInvocation Update(BoundExpression invokedExpression, ImmutableArray<BoundExpression> arguments, ImmutableArray<RefKind> argumentRefKindsOpt, LookupResultKind resultKind, TypeSymbol type) 1458if (invokedExpression != this.InvokedExpression || arguments != this.Arguments || argumentRefKindsOpt != this.ArgumentRefKindsOpt || resultKind != this.ResultKind || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1470public BoundRefTypeOperator(SyntaxNode syntax, BoundExpression operand, MethodSymbol? getTypeFromHandle, TypeSymbol type, bool hasErrors = false) 1481public new TypeSymbol Type => base.Type!; 1488public BoundRefTypeOperator Update(BoundExpression operand, MethodSymbol? getTypeFromHandle, TypeSymbol type) 1490if (operand != this.Operand || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(getTypeFromHandle, this.GetTypeFromHandle) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1502public BoundMakeRefOperator(SyntaxNode syntax, BoundExpression operand, TypeSymbol type, bool hasErrors = false) 1512public new TypeSymbol Type => base.Type!; 1518public BoundMakeRefOperator Update(BoundExpression operand, TypeSymbol type) 1520if (operand != this.Operand || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1532public BoundRefValueOperator(SyntaxNode syntax, NullableAnnotation nullableAnnotation, BoundExpression operand, TypeSymbol type, bool hasErrors = false) 1543public new TypeSymbol Type => base.Type!; 1550public BoundRefValueOperator Update(NullableAnnotation nullableAnnotation, BoundExpression operand, TypeSymbol type) 1552if (nullableAnnotation != this.NullableAnnotation || operand != this.Operand || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1564public BoundFromEndIndexExpression(SyntaxNode syntax, BoundExpression operand, MethodSymbol? methodOpt, TypeSymbol type, bool hasErrors = false) 1575public new TypeSymbol Type => base.Type!; 1582public BoundFromEndIndexExpression Update(BoundExpression operand, MethodSymbol? methodOpt, TypeSymbol type) 1584if (operand != this.Operand || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(methodOpt, this.MethodOpt) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1596public BoundRangeExpression(SyntaxNode syntax, BoundExpression? leftOperandOpt, BoundExpression? rightOperandOpt, MethodSymbol? methodOpt, TypeSymbol type, bool hasErrors = false) 1607public new TypeSymbol Type => base.Type!; 1615public BoundRangeExpression Update(BoundExpression? leftOperandOpt, BoundExpression? rightOperandOpt, MethodSymbol? methodOpt, TypeSymbol type) 1617if (leftOperandOpt != this.LeftOperandOpt || rightOperandOpt != this.RightOperandOpt || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(methodOpt, this.MethodOpt) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1629protected BoundBinaryOperatorBase(BoundKind kind, SyntaxNode syntax, BoundExpression left, BoundExpression right, TypeSymbol type, bool hasErrors = false) 1641public new TypeSymbol Type => base.Type!; 1648public BoundBinaryOperator(SyntaxNode syntax, BinaryOperatorKind operatorKind, BoundBinaryOperator.UncommonData? data, LookupResultKind resultKind, BoundExpression left, BoundExpression right, TypeSymbol type, bool hasErrors = false) 1668public BoundBinaryOperator Update(BinaryOperatorKind operatorKind, BoundBinaryOperator.UncommonData? data, LookupResultKind resultKind, BoundExpression left, BoundExpression right, TypeSymbol type) 1670if (operatorKind != this.OperatorKind || data != this.Data || resultKind != this.ResultKind || left != this.Left || right != this.Right || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1682public BoundTupleBinaryOperator(SyntaxNode syntax, BoundExpression left, BoundExpression right, BinaryOperatorKind operatorKind, TupleBinaryOperatorInfo.Multiple operators, TypeSymbol type, bool hasErrors = false) 1697public new TypeSymbol Type => base.Type!; 1706public BoundTupleBinaryOperator Update(BoundExpression left, BoundExpression right, BinaryOperatorKind operatorKind, TupleBinaryOperatorInfo.Multiple operators, TypeSymbol type) 1708if (left != this.Left || right != this.Right || operatorKind != this.OperatorKind || operators != this.Operators || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1720public BoundUserDefinedConditionalLogicalOperator(SyntaxNode syntax, BinaryOperatorKind operatorKind, MethodSymbol logicalOperator, MethodSymbol trueOperator, MethodSymbol falseOperator, TypeSymbol? constrainedToTypeOpt, LookupResultKind resultKind, ImmutableArray<MethodSymbol> originalUserDefinedOperatorsOpt, BoundExpression left, BoundExpression right, TypeSymbol type, bool hasErrors = false) 1744public TypeSymbol? ConstrainedToTypeOpt { get; } 1751public BoundUserDefinedConditionalLogicalOperator Update(BinaryOperatorKind operatorKind, MethodSymbol logicalOperator, MethodSymbol trueOperator, MethodSymbol falseOperator, TypeSymbol? constrainedToTypeOpt, LookupResultKind resultKind, ImmutableArray<MethodSymbol> originalUserDefinedOperatorsOpt, BoundExpression left, BoundExpression right, TypeSymbol type) 1753if (operatorKind != this.OperatorKind || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(logicalOperator, this.LogicalOperator) || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(trueOperator, this.TrueOperator) || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(falseOperator, this.FalseOperator) || !TypeSymbol.Equals(constrainedToTypeOpt, this.ConstrainedToTypeOpt, TypeCompareKind.ConsiderEverything) || resultKind != this.ResultKind || originalUserDefinedOperatorsOpt != this.OriginalUserDefinedOperatorsOpt || left != this.Left || right != this.Right || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1765public 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) 1784public new TypeSymbol Type => base.Type!; 1798public BoundCompoundAssignmentOperator Update(BinaryOperatorSignature @operator, BoundExpression left, BoundExpression right, BoundValuePlaceholder? leftPlaceholder, BoundExpression? leftConversion, BoundValuePlaceholder? finalPlaceholder, BoundExpression? finalConversion, LookupResultKind resultKind, ImmutableArray<MethodSymbol> originalUserDefinedOperatorsOpt, TypeSymbol type) 1800if (@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)) 1812public BoundAssignmentOperator(SyntaxNode syntax, BoundExpression left, BoundExpression right, bool isRef, TypeSymbol type, bool hasErrors = false) 1824public new TypeSymbol Type => base.Type!; 1832public BoundAssignmentOperator Update(BoundExpression left, BoundExpression right, bool isRef, TypeSymbol type) 1834if (left != this.Left || right != this.Right || isRef != this.IsRef || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1846public BoundDeconstructionAssignmentOperator(SyntaxNode syntax, BoundTupleExpression left, BoundConversion right, bool isUsed, TypeSymbol type, bool hasErrors = false) 1859public new TypeSymbol Type => base.Type!; 1867public BoundDeconstructionAssignmentOperator Update(BoundTupleExpression left, BoundConversion right, bool isUsed, TypeSymbol type) 1869if (left != this.Left || right != this.Right || isUsed != this.IsUsed || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1881public BoundNullCoalescingOperator(SyntaxNode syntax, BoundExpression leftOperand, BoundExpression rightOperand, BoundValuePlaceholder? leftPlaceholder, BoundExpression? leftConversion, BoundNullCoalescingOperatorResultKind operatorResultKind, bool @checked, TypeSymbol type, bool hasErrors = false) 1897public new TypeSymbol Type => base.Type!; 1908public BoundNullCoalescingOperator Update(BoundExpression leftOperand, BoundExpression rightOperand, BoundValuePlaceholder? leftPlaceholder, BoundExpression? leftConversion, BoundNullCoalescingOperatorResultKind operatorResultKind, bool @checked, TypeSymbol type) 1910if (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)) 1922public BoundNullCoalescingAssignmentOperator(SyntaxNode syntax, BoundExpression leftOperand, BoundExpression rightOperand, TypeSymbol? type, bool hasErrors = false) 1939public BoundNullCoalescingAssignmentOperator Update(BoundExpression leftOperand, BoundExpression rightOperand, TypeSymbol? type) 1941if (leftOperand != this.LeftOperand || rightOperand != this.RightOperand || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 1968public new TypeSymbol? Type => base.Type; 1992public BoundConditionalOperator(SyntaxNode syntax, bool isRef, BoundExpression condition, BoundExpression consequence, BoundExpression alternative, ConstantValue? constantValueOpt, TypeSymbol? naturalTypeOpt, bool wasTargetTyped, TypeSymbol type, bool hasErrors = false) 2010public new TypeSymbol Type => base.Type!; 2016public TypeSymbol? NaturalTypeOpt { get; } 2022public BoundConditionalOperator Update(bool isRef, BoundExpression condition, BoundExpression consequence, BoundExpression alternative, ConstantValue? constantValueOpt, TypeSymbol? naturalTypeOpt, bool wasTargetTyped, TypeSymbol type) 2024if (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)) 2036public BoundArrayAccess(SyntaxNode syntax, BoundExpression expression, ImmutableArray<BoundExpression> indices, TypeSymbol type, bool hasErrors = false) 2048public new TypeSymbol Type => base.Type!; 2055public BoundArrayAccess Update(BoundExpression expression, ImmutableArray<BoundExpression> indices, TypeSymbol type) 2057if (expression != this.Expression || indices != this.Indices || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2069public BoundArrayLength(SyntaxNode syntax, BoundExpression expression, TypeSymbol type, bool hasErrors = false) 2079public new TypeSymbol Type => base.Type!; 2085public BoundArrayLength Update(BoundExpression expression, TypeSymbol type) 2087if (expression != this.Expression || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2132public BoundAwaitExpression(SyntaxNode syntax, BoundExpression expression, BoundAwaitableInfo awaitableInfo, TypeSymbol type, bool hasErrors = false) 2144public new TypeSymbol Type => base.Type!; 2151public BoundAwaitExpression Update(BoundExpression expression, BoundAwaitableInfo awaitableInfo, TypeSymbol type) 2153if (expression != this.Expression || awaitableInfo != this.AwaitableInfo || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2165protected BoundTypeOf(BoundKind kind, SyntaxNode syntax, MethodSymbol? getTypeFromHandle, TypeSymbol type, bool hasErrors) 2174protected BoundTypeOf(BoundKind kind, SyntaxNode syntax, MethodSymbol? getTypeFromHandle, TypeSymbol type) 2183public new TypeSymbol Type => base.Type!; 2189public BoundTypeOfOperator(SyntaxNode syntax, BoundTypeExpression sourceType, MethodSymbol? getTypeFromHandle, TypeSymbol type, bool hasErrors = false) 2204public BoundTypeOfOperator Update(BoundTypeExpression sourceType, MethodSymbol? getTypeFromHandle, TypeSymbol type) 2206if (sourceType != this.SourceType || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(getTypeFromHandle, this.GetTypeFromHandle) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2252public BoundMethodDefIndex(SyntaxNode syntax, MethodSymbol method, TypeSymbol type, bool hasErrors) 2262public BoundMethodDefIndex(SyntaxNode syntax, MethodSymbol method, TypeSymbol type) 2272public new TypeSymbol Type => base.Type!; 2278public BoundMethodDefIndex Update(MethodSymbol method, TypeSymbol type) 2280if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(method, this.Method) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2292public BoundLocalId(SyntaxNode syntax, LocalSymbol local, FieldSymbol? hoistedField, TypeSymbol type, bool hasErrors) 2303public BoundLocalId(SyntaxNode syntax, LocalSymbol local, FieldSymbol? hoistedField, TypeSymbol type) 2314public new TypeSymbol Type => base.Type!; 2321public BoundLocalId Update(LocalSymbol local, FieldSymbol? hoistedField, TypeSymbol type) 2323if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(local, this.Local) || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(hoistedField, this.HoistedField) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2335public BoundParameterId(SyntaxNode syntax, ParameterSymbol parameter, FieldSymbol? hoistedField, TypeSymbol type, bool hasErrors) 2346public BoundParameterId(SyntaxNode syntax, ParameterSymbol parameter, FieldSymbol? hoistedField, TypeSymbol type) 2357public new TypeSymbol Type => base.Type!; 2364public BoundParameterId Update(ParameterSymbol parameter, FieldSymbol? hoistedField, TypeSymbol type) 2366if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(parameter, this.Parameter) || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(hoistedField, this.HoistedField) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2378public BoundStateMachineInstanceId(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 2386public BoundStateMachineInstanceId(SyntaxNode syntax, TypeSymbol type) 2394public new TypeSymbol Type => base.Type!; 2399public BoundStateMachineInstanceId Update(TypeSymbol type) 2401if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2413public BoundMaximumMethodDefIndex(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 2421public BoundMaximumMethodDefIndex(SyntaxNode syntax, TypeSymbol type) 2429public new TypeSymbol Type => base.Type!; 2434public BoundMaximumMethodDefIndex Update(TypeSymbol type) 2436if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2448public BoundInstrumentationPayloadRoot(SyntaxNode syntax, int analysisKind, TypeSymbol type, bool hasErrors) 2457public BoundInstrumentationPayloadRoot(SyntaxNode syntax, int analysisKind, TypeSymbol type) 2467public new TypeSymbol Type => base.Type!; 2472public BoundInstrumentationPayloadRoot Update(int analysisKind, TypeSymbol type) 2474if (analysisKind != this.AnalysisKind || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2486public BoundModuleVersionId(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 2494public BoundModuleVersionId(SyntaxNode syntax, TypeSymbol type) 2502public new TypeSymbol Type => base.Type!; 2507public BoundModuleVersionId Update(TypeSymbol type) 2509if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2521public BoundModuleVersionIdString(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 2529public BoundModuleVersionIdString(SyntaxNode syntax, TypeSymbol type) 2537public new TypeSymbol Type => base.Type!; 2542public BoundModuleVersionIdString Update(TypeSymbol type) 2544if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2556public BoundSourceDocumentIndex(SyntaxNode syntax, Cci.DebugSourceDocument document, TypeSymbol type, bool hasErrors) 2566public BoundSourceDocumentIndex(SyntaxNode syntax, Cci.DebugSourceDocument document, TypeSymbol type) 2576public new TypeSymbol Type => base.Type!; 2582public BoundSourceDocumentIndex Update(Cci.DebugSourceDocument document, TypeSymbol type) 2584if (document != this.Document || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2596public BoundMethodInfo(SyntaxNode syntax, MethodSymbol method, MethodSymbol? getMethodFromHandle, TypeSymbol type, bool hasErrors) 2607public BoundMethodInfo(SyntaxNode syntax, MethodSymbol method, MethodSymbol? getMethodFromHandle, TypeSymbol type) 2618public new TypeSymbol Type => base.Type!; 2625public BoundMethodInfo Update(MethodSymbol method, MethodSymbol? getMethodFromHandle, TypeSymbol type) 2627if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(method, this.Method) || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(getMethodFromHandle, this.GetMethodFromHandle) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2639public BoundFieldInfo(SyntaxNode syntax, FieldSymbol field, MethodSymbol? getFieldFromHandle, TypeSymbol type, bool hasErrors) 2650public BoundFieldInfo(SyntaxNode syntax, FieldSymbol field, MethodSymbol? getFieldFromHandle, TypeSymbol type) 2661public new TypeSymbol Type => base.Type!; 2668public BoundFieldInfo Update(FieldSymbol field, MethodSymbol? getFieldFromHandle, TypeSymbol type) 2670if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(field, this.Field) || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(getFieldFromHandle, this.GetFieldFromHandle) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2692public new TypeSymbol? Type => base.Type; 2705public BoundDefaultExpression(SyntaxNode syntax, BoundTypeExpression? targetType, ConstantValue? constantValueOpt, TypeSymbol type, bool hasErrors = false) 2715public new TypeSymbol Type => base.Type!; 2722public BoundDefaultExpression Update(BoundTypeExpression? targetType, ConstantValue? constantValueOpt, TypeSymbol type) 2724if (targetType != this.TargetType || constantValueOpt != this.ConstantValueOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2736public BoundIsOperator(SyntaxNode syntax, BoundExpression operand, BoundTypeExpression targetType, ConversionKind conversionKind, TypeSymbol type, bool hasErrors = false) 2749public new TypeSymbol Type => base.Type!; 2757public BoundIsOperator Update(BoundExpression operand, BoundTypeExpression targetType, ConversionKind conversionKind, TypeSymbol type) 2759if (operand != this.Operand || targetType != this.TargetType || conversionKind != this.ConversionKind || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2771public BoundAsOperator(SyntaxNode syntax, BoundExpression operand, BoundTypeExpression targetType, BoundValuePlaceholder? operandPlaceholder, BoundExpression? operandConversion, TypeSymbol type, bool hasErrors = false) 2785public new TypeSymbol Type => base.Type!; 2794public BoundAsOperator Update(BoundExpression operand, BoundTypeExpression targetType, BoundValuePlaceholder? operandPlaceholder, BoundExpression? operandConversion, TypeSymbol type) 2796if (operand != this.Operand || targetType != this.TargetType || operandPlaceholder != this.OperandPlaceholder || operandConversion != this.OperandConversion || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2808public BoundSizeOfOperator(SyntaxNode syntax, BoundTypeExpression sourceType, ConstantValue? constantValueOpt, TypeSymbol type, bool hasErrors = false) 2819public new TypeSymbol Type => base.Type!; 2826public BoundSizeOfOperator Update(BoundTypeExpression sourceType, ConstantValue? constantValueOpt, TypeSymbol type) 2828if (sourceType != this.SourceType || constantValueOpt != this.ConstantValueOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2840public BoundConversion(SyntaxNode syntax, BoundExpression operand, Conversion conversion, bool isBaseConversion, bool @checked, bool explicitCastInCode, ConstantValue? constantValueOpt, ConversionGroup? conversionGroupOpt, ImmutableArray<MethodSymbol> originalUserDefinedConversionsOpt, TypeSymbol type, bool hasErrors = false) 2857public new TypeSymbol Type => base.Type!; 2870public BoundConversion Update(BoundExpression operand, Conversion conversion, bool isBaseConversion, bool @checked, bool explicitCastInCode, ConstantValue? constantValueOpt, ConversionGroup? conversionGroupOpt, ImmutableArray<MethodSymbol> originalUserDefinedConversionsOpt, TypeSymbol type) 2872if (operand != this.Operand || conversion != this.Conversion || isBaseConversion != this.IsBaseConversion || @checked != this.Checked || explicitCastInCode != this.ExplicitCastInCode || constantValueOpt != this.ConstantValueOpt || conversionGroupOpt != this.ConversionGroupOpt || originalUserDefinedConversionsOpt != this.OriginalUserDefinedConversionsOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2884public BoundReadOnlySpanFromArray(SyntaxNode syntax, BoundExpression operand, MethodSymbol conversionMethod, TypeSymbol type, bool hasErrors = false) 2896public new TypeSymbol Type => base.Type!; 2903public BoundReadOnlySpanFromArray Update(BoundExpression operand, MethodSymbol conversionMethod, TypeSymbol type) 2905if (operand != this.Operand || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(conversionMethod, this.ConversionMethod) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2917public BoundArgList(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 2925public BoundArgList(SyntaxNode syntax, TypeSymbol type) 2933public new TypeSymbol Type => base.Type!; 2938public BoundArgList Update(TypeSymbol type) 2940if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2952public BoundArgListOperator(SyntaxNode syntax, ImmutableArray<BoundExpression> arguments, ImmutableArray<RefKind> argumentRefKindsOpt, TypeSymbol? type, bool hasErrors = false) 2962public new TypeSymbol? Type => base.Type; 2969public BoundArgListOperator Update(ImmutableArray<BoundExpression> arguments, ImmutableArray<RefKind> argumentRefKindsOpt, TypeSymbol? type) 2971if (arguments != this.Arguments || argumentRefKindsOpt != this.ArgumentRefKindsOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 2983public BoundFixedLocalCollectionInitializer(SyntaxNode syntax, TypeSymbol elementPointerType, BoundValuePlaceholder? elementPointerPlaceholder, BoundExpression? elementPointerConversion, BoundExpression expression, MethodSymbol? getPinnableOpt, TypeSymbol type, bool hasErrors = false) 2998public new TypeSymbol Type => base.Type!; 2999public TypeSymbol ElementPointerType { get; } 3008public BoundFixedLocalCollectionInitializer Update(TypeSymbol elementPointerType, BoundValuePlaceholder? elementPointerPlaceholder, BoundExpression? elementPointerConversion, BoundExpression expression, MethodSymbol? getPinnableOpt, TypeSymbol type) 3010if (!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)) 4148public BoundCatchBlock(SyntaxNode syntax, ImmutableArray<LocalSymbol> locals, BoundExpression? exceptionSourceOpt, TypeSymbol? exceptionTypeOpt, BoundStatementList? exceptionFilterPrologueOpt, BoundExpression? exceptionFilterOpt, BoundBlock body, bool isSynthesizedAsyncCatchAll, bool hasErrors = false) 4166public TypeSymbol? ExceptionTypeOpt { get; } 4175public BoundCatchBlock Update(ImmutableArray<LocalSymbol> locals, BoundExpression? exceptionSourceOpt, TypeSymbol? exceptionTypeOpt, BoundStatementList? exceptionFilterPrologueOpt, BoundExpression? exceptionFilterOpt, BoundBlock body, bool isSynthesizedAsyncCatchAll) 4177if (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) 4189public BoundLiteral(SyntaxNode syntax, ConstantValue? constantValueOpt, TypeSymbol? type, bool hasErrors) 4195public BoundLiteral(SyntaxNode syntax, ConstantValue? constantValueOpt, TypeSymbol? type) 4206public BoundLiteral Update(ConstantValue? constantValueOpt, TypeSymbol? type) 4208if (constantValueOpt != this.ConstantValueOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 4220public BoundUtf8String(SyntaxNode syntax, string value, TypeSymbol type, bool hasErrors) 4230public BoundUtf8String(SyntaxNode syntax, string value, TypeSymbol type) 4240public new TypeSymbol Type => base.Type!; 4246public BoundUtf8String Update(string value, TypeSymbol type) 4248if (value != this.Value || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 4260public BoundThisReference(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 4268public BoundThisReference(SyntaxNode syntax, TypeSymbol type) 4276public new TypeSymbol Type => base.Type!; 4281public BoundThisReference Update(TypeSymbol type) 4283if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 4295public BoundPreviousSubmissionReference(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 4303public BoundPreviousSubmissionReference(SyntaxNode syntax, TypeSymbol type) 4311public new TypeSymbol Type => base.Type!; 4316public BoundPreviousSubmissionReference Update(TypeSymbol type) 4318if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 4330public BoundHostObjectMemberReference(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 4338public BoundHostObjectMemberReference(SyntaxNode syntax, TypeSymbol type) 4346public new TypeSymbol Type => base.Type!; 4351public BoundHostObjectMemberReference Update(TypeSymbol type) 4353if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 4365public BoundBaseReference(SyntaxNode syntax, TypeSymbol? type, bool hasErrors) 4370public BoundBaseReference(SyntaxNode syntax, TypeSymbol? type) 4375public new TypeSymbol? Type => base.Type; 4380public BoundBaseReference Update(TypeSymbol? type) 4382if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 4394public BoundLocal(SyntaxNode syntax, LocalSymbol localSymbol, BoundLocalDeclarationKind declarationKind, ConstantValue? constantValueOpt, bool isNullableUnknown, TypeSymbol type, bool hasErrors) 4407public BoundLocal(SyntaxNode syntax, LocalSymbol localSymbol, BoundLocalDeclarationKind declarationKind, ConstantValue? constantValueOpt, bool isNullableUnknown, TypeSymbol type) 4420public new TypeSymbol Type => base.Type!; 4429public BoundLocal Update(LocalSymbol localSymbol, BoundLocalDeclarationKind declarationKind, ConstantValue? constantValueOpt, bool isNullableUnknown, TypeSymbol type) 4431if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(localSymbol, this.LocalSymbol) || declarationKind != this.DeclarationKind || constantValueOpt != this.ConstantValueOpt || isNullableUnknown != this.IsNullableUnknown || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 4443public BoundPseudoVariable(SyntaxNode syntax, LocalSymbol localSymbol, PseudoVariableExpressions emitExpressions, TypeSymbol type, bool hasErrors) 4455public BoundPseudoVariable(SyntaxNode syntax, LocalSymbol localSymbol, PseudoVariableExpressions emitExpressions, TypeSymbol type) 4467public new TypeSymbol Type => base.Type!; 4474public BoundPseudoVariable Update(LocalSymbol localSymbol, PseudoVariableExpressions emitExpressions, TypeSymbol type) 4476if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(localSymbol, this.LocalSymbol) || emitExpressions != this.EmitExpressions || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 4488public BoundRangeVariable(SyntaxNode syntax, RangeVariableSymbol rangeVariableSymbol, BoundExpression value, TypeSymbol type, bool hasErrors = false) 4500public new TypeSymbol Type => base.Type!; 4507public BoundRangeVariable Update(RangeVariableSymbol rangeVariableSymbol, BoundExpression value, TypeSymbol type) 4509if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(rangeVariableSymbol, this.RangeVariableSymbol) || value != this.Value || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 4521public BoundParameter(SyntaxNode syntax, ParameterSymbol parameterSymbol, TypeSymbol type, bool hasErrors) 4531public BoundParameter(SyntaxNode syntax, ParameterSymbol parameterSymbol, TypeSymbol type) 4541public new TypeSymbol Type => base.Type!; 4547public BoundParameter Update(ParameterSymbol parameterSymbol, TypeSymbol type) 4549if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(parameterSymbol, this.ParameterSymbol) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 4661public BoundLabel(SyntaxNode syntax, LabelSymbol label, TypeSymbol? type, bool hasErrors) 4670public BoundLabel(SyntaxNode syntax, LabelSymbol label, TypeSymbol? type) 4684public BoundLabel Update(LabelSymbol label, TypeSymbol? type) 4686if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(label, this.Label) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 4768protected BoundSwitchExpression(BoundKind kind, SyntaxNode syntax, BoundExpression expression, ImmutableArray<BoundSwitchExpressionArm> switchArms, BoundDecisionDag reachabilityDecisionDag, LabelSymbol? defaultLabel, bool reportedNotExhaustive, TypeSymbol? type, bool hasErrors = false) 4831public BoundUnconvertedSwitchExpression(SyntaxNode syntax, BoundExpression expression, ImmutableArray<BoundSwitchExpressionArm> switchArms, BoundDecisionDag reachabilityDecisionDag, LabelSymbol? defaultLabel, bool reportedNotExhaustive, TypeSymbol? type, bool hasErrors = false) 4845public BoundUnconvertedSwitchExpression Update(BoundExpression expression, ImmutableArray<BoundSwitchExpressionArm> switchArms, BoundDecisionDag reachabilityDecisionDag, LabelSymbol? defaultLabel, bool reportedNotExhaustive, TypeSymbol? type) 4847if (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)) 4859public BoundConvertedSwitchExpression(SyntaxNode syntax, TypeSymbol? naturalTypeOpt, bool wasTargetTyped, BoundExpression expression, ImmutableArray<BoundSwitchExpressionArm> switchArms, BoundDecisionDag reachabilityDecisionDag, LabelSymbol? defaultLabel, bool reportedNotExhaustive, TypeSymbol type, bool hasErrors = false) 4872public new TypeSymbol Type => base.Type!; 4873public TypeSymbol? NaturalTypeOpt { get; } 4879public BoundConvertedSwitchExpression Update(TypeSymbol? naturalTypeOpt, bool wasTargetTyped, BoundExpression expression, ImmutableArray<BoundSwitchExpressionArm> switchArms, BoundDecisionDag reachabilityDecisionDag, LabelSymbol? defaultLabel, bool reportedNotExhaustive, TypeSymbol type) 4881if (!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)) 5086public BoundDagTemp(SyntaxNode syntax, TypeSymbol type, BoundDagEvaluation? source, int index, bool hasErrors = false) 5097public TypeSymbol Type { get; } 5104public BoundDagTemp Update(TypeSymbol type, BoundDagEvaluation? source, int index) 5106if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything) || source != this.Source || index != this.Index) 5118public BoundDagTypeTest(SyntaxNode syntax, TypeSymbol type, BoundDagTemp input, bool hasErrors = false) 5128public TypeSymbol Type { get; } 5133public BoundDagTypeTest Update(TypeSymbol type, BoundDagTemp input) 5135if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything) || input != this.Input) 5302public BoundDagTypeEvaluation(SyntaxNode syntax, TypeSymbol type, BoundDagTemp input, bool hasErrors = false) 5312public TypeSymbol Type { get; } 5317public BoundDagTypeEvaluation Update(TypeSymbol type, BoundDagTemp input) 5319if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything) || input != this.Input) 5422public BoundDagIndexerEvaluation(SyntaxNode syntax, TypeSymbol indexerType, BoundDagTemp lengthTemp, int index, BoundExpression indexerAccess, BoundListPatternReceiverPlaceholder receiverPlaceholder, BoundListPatternIndexPlaceholder argumentPlaceholder, BoundDagTemp input, bool hasErrors = false) 5445public TypeSymbol IndexerType { get; } 5455public BoundDagIndexerEvaluation Update(TypeSymbol indexerType, BoundDagTemp lengthTemp, int index, BoundExpression indexerAccess, BoundListPatternReceiverPlaceholder receiverPlaceholder, BoundListPatternIndexPlaceholder argumentPlaceholder, BoundDagTemp input) 5457if (!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) 5469public BoundDagSliceEvaluation(SyntaxNode syntax, TypeSymbol sliceType, BoundDagTemp lengthTemp, int startIndex, int endIndex, BoundExpression indexerAccess, BoundSlicePatternReceiverPlaceholder receiverPlaceholder, BoundSlicePatternRangePlaceholder argumentPlaceholder, BoundDagTemp input, bool hasErrors = false) 5493public TypeSymbol SliceType { get; } 5504public BoundDagSliceEvaluation Update(TypeSymbol sliceType, BoundDagTemp lengthTemp, int startIndex, int endIndex, BoundExpression indexerAccess, BoundSlicePatternReceiverPlaceholder receiverPlaceholder, BoundSlicePatternRangePlaceholder argumentPlaceholder, BoundDagTemp input) 5506if (!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) 5619public new TypeSymbol? Type => base.Type; 5626public BoundSequencePointExpression(SyntaxNode syntax, BoundExpression expression, TypeSymbol? type, bool hasErrors = false) 5640public BoundSequencePointExpression Update(BoundExpression expression, TypeSymbol? type) 5642if (expression != this.Expression || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 5654public BoundSequence(SyntaxNode syntax, ImmutableArray<LocalSymbol> locals, ImmutableArray<BoundExpression> sideEffects, BoundExpression value, TypeSymbol type, bool hasErrors = false) 5668public new TypeSymbol Type => base.Type!; 5676public BoundSequence Update(ImmutableArray<LocalSymbol> locals, ImmutableArray<BoundExpression> sideEffects, BoundExpression value, TypeSymbol type) 5678if (locals != this.Locals || sideEffects != this.SideEffects || value != this.Value || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 5690public BoundSpillSequence(SyntaxNode syntax, ImmutableArray<LocalSymbol> locals, ImmutableArray<BoundStatement> sideEffects, BoundExpression value, TypeSymbol type, bool hasErrors = false) 5704public new TypeSymbol Type => base.Type!; 5712public BoundSpillSequence Update(ImmutableArray<LocalSymbol> locals, ImmutableArray<BoundStatement> sideEffects, BoundExpression value, TypeSymbol type) 5714if (locals != this.Locals || sideEffects != this.SideEffects || value != this.Value || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 5726public BoundDynamicMemberAccess(SyntaxNode syntax, BoundExpression receiver, ImmutableArray<TypeWithAnnotations> typeArgumentsOpt, string name, bool invoked, bool indexed, TypeSymbol type, bool hasErrors = false) 5741public new TypeSymbol Type => base.Type!; 5751public BoundDynamicMemberAccess Update(BoundExpression receiver, ImmutableArray<TypeWithAnnotations> typeArgumentsOpt, string name, bool invoked, bool indexed, TypeSymbol type) 5753if (receiver != this.Receiver || typeArgumentsOpt != this.TypeArgumentsOpt || name != this.Name || invoked != this.Invoked || indexed != this.Indexed || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 5765protected BoundDynamicInvocableBase(BoundKind kind, SyntaxNode syntax, BoundExpression expression, ImmutableArray<BoundExpression> arguments, TypeSymbol? type, bool hasErrors = false) 5782public BoundDynamicInvocation(SyntaxNode syntax, ImmutableArray<string> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, ImmutableArray<MethodSymbol> applicableMethods, BoundExpression expression, ImmutableArray<BoundExpression> arguments, TypeSymbol type, bool hasErrors = false) 5796public new TypeSymbol Type => base.Type!; 5804public BoundDynamicInvocation Update(ImmutableArray<string> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, ImmutableArray<MethodSymbol> applicableMethods, BoundExpression expression, ImmutableArray<BoundExpression> arguments, TypeSymbol type) 5806if (argumentNamesOpt != this.ArgumentNamesOpt || argumentRefKindsOpt != this.ArgumentRefKindsOpt || applicableMethods != this.ApplicableMethods || expression != this.Expression || arguments != this.Arguments || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 5818public BoundConditionalAccess(SyntaxNode syntax, BoundExpression receiver, BoundExpression accessExpression, TypeSymbol type, bool hasErrors = false) 5830public new TypeSymbol Type => base.Type!; 5837public BoundConditionalAccess Update(BoundExpression receiver, BoundExpression accessExpression, TypeSymbol type) 5839if (receiver != this.Receiver || accessExpression != this.AccessExpression || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 5851public BoundLoweredConditionalAccess(SyntaxNode syntax, BoundExpression receiver, MethodSymbol? hasValueMethodOpt, BoundExpression whenNotNull, BoundExpression? whenNullOpt, int id, bool forceCopyOfNullableValueType, TypeSymbol type, bool hasErrors = false) 5867public new TypeSymbol Type => base.Type!; 5878public BoundLoweredConditionalAccess Update(BoundExpression receiver, MethodSymbol? hasValueMethodOpt, BoundExpression whenNotNull, BoundExpression? whenNullOpt, int id, bool forceCopyOfNullableValueType, TypeSymbol type) 5880if (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)) 5892public BoundConditionalReceiver(SyntaxNode syntax, int id, TypeSymbol type, bool hasErrors) 5901public BoundConditionalReceiver(SyntaxNode syntax, int id, TypeSymbol type) 5910public new TypeSymbol Type => base.Type!; 5916public BoundConditionalReceiver Update(int id, TypeSymbol type) 5918if (id != this.Id || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 5930public BoundComplexConditionalReceiver(SyntaxNode syntax, BoundExpression valueTypeReceiver, BoundExpression referenceTypeReceiver, TypeSymbol type, bool hasErrors = false) 5942public new TypeSymbol Type => base.Type!; 5949public BoundComplexConditionalReceiver Update(BoundExpression valueTypeReceiver, BoundExpression referenceTypeReceiver, TypeSymbol type) 5951if (valueTypeReceiver != this.ValueTypeReceiver || referenceTypeReceiver != this.ReferenceTypeReceiver || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 6032public BoundCall(SyntaxNode syntax, BoundExpression? receiverOpt, 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) 6054public new TypeSymbol Type => base.Type!; 6071public BoundCall Update(BoundExpression? receiverOpt, 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) 6073if (receiverOpt != this.ReceiverOpt || !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)) 6085public BoundEventAssignmentOperator(SyntaxNode syntax, EventSymbol @event, bool isAddition, bool isDynamic, BoundExpression? receiverOpt, BoundExpression argument, TypeSymbol type, bool hasErrors = false) 6100public new TypeSymbol Type => base.Type!; 6110public BoundEventAssignmentOperator Update(EventSymbol @event, bool isAddition, bool isDynamic, BoundExpression? receiverOpt, BoundExpression argument, TypeSymbol type) 6112if (!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)) 6124public 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) 6142public new TypeSymbol Type => base.Type!; 6155public BoundAttribute Update(MethodSymbol? constructor, ImmutableArray<BoundExpression> constructorArguments, ImmutableArray<string?> constructorArgumentNamesOpt, ImmutableArray<int> constructorArgumentsToParamsOpt, bool constructorExpanded, BitVector constructorDefaultArguments, ImmutableArray<BoundAssignmentOperator> namedArguments, LookupResultKind resultKind, TypeSymbol type) 6157if (!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)) 6183public new TypeSymbol? Type => base.Type; 6207protected BoundObjectCreationExpressionBase(BoundKind kind, SyntaxNode syntax, TypeSymbol type, bool hasErrors) 6215protected BoundObjectCreationExpressionBase(BoundKind kind, SyntaxNode syntax, TypeSymbol type) 6223public new TypeSymbol Type => base.Type!; 6228public 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) 6265public 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) 6267if (!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)) 6279protected BoundTupleExpression(BoundKind kind, SyntaxNode syntax, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<bool> inferredNamesOpt, TypeSymbol? type, bool hasErrors = false) 6297public BoundTupleLiteral(SyntaxNode syntax, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<bool> inferredNamesOpt, TypeSymbol? type, bool hasErrors = false) 6305public new TypeSymbol? Type => base.Type; 6310public BoundTupleLiteral Update(ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<bool> inferredNamesOpt, TypeSymbol? type) 6312if (arguments != this.Arguments || argumentNamesOpt != this.ArgumentNamesOpt || inferredNamesOpt != this.InferredNamesOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 6324public BoundConvertedTupleLiteral(SyntaxNode syntax, BoundTupleLiteral? sourceTuple, bool wasTargetTyped, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<bool> inferredNamesOpt, TypeSymbol? type, bool hasErrors = false) 6340public BoundConvertedTupleLiteral Update(BoundTupleLiteral? sourceTuple, bool wasTargetTyped, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<bool> inferredNamesOpt, TypeSymbol? type) 6342if (sourceTuple != this.SourceTuple || wasTargetTyped != this.WasTargetTyped || arguments != this.Arguments || argumentNamesOpt != this.ArgumentNamesOpt || inferredNamesOpt != this.InferredNamesOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 6354public 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) 6383public BoundDynamicObjectCreationExpression Update(string name, ImmutableArray<BoundExpression> arguments, ImmutableArray<string> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, BoundObjectInitializerExpressionBase? initializerExpressionOpt, ImmutableArray<MethodSymbol> applicableMethods, bool wasTargetTyped, TypeSymbol type) 6385if (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)) 6397public BoundNoPiaObjectCreationExpression(SyntaxNode syntax, string? guidString, BoundObjectInitializerExpressionBase? initializerExpressionOpt, bool wasTargetTyped, TypeSymbol type, bool hasErrors = false) 6415public BoundNoPiaObjectCreationExpression Update(string? guidString, BoundObjectInitializerExpressionBase? initializerExpressionOpt, bool wasTargetTyped, TypeSymbol type) 6417if (guidString != this.GuidString || initializerExpressionOpt != this.InitializerExpressionOpt || wasTargetTyped != this.WasTargetTyped || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 6429protected BoundObjectInitializerExpressionBase(BoundKind kind, SyntaxNode syntax, BoundObjectOrCollectionValuePlaceholder placeholder, ImmutableArray<BoundExpression> initializers, TypeSymbol type, bool hasErrors = false) 6441public new TypeSymbol Type => base.Type!; 6448public BoundObjectInitializerExpression(SyntaxNode syntax, BoundObjectOrCollectionValuePlaceholder placeholder, ImmutableArray<BoundExpression> initializers, TypeSymbol type, bool hasErrors = false) 6462public BoundObjectInitializerExpression Update(BoundObjectOrCollectionValuePlaceholder placeholder, ImmutableArray<BoundExpression> initializers, TypeSymbol type) 6464if (placeholder != this.Placeholder || initializers != this.Initializers || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 6476public BoundObjectInitializerMember(SyntaxNode syntax, Symbol? memberSymbol, ImmutableArray<BoundExpression> arguments, ImmutableArray<string> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, bool expanded, ImmutableArray<int> argsToParamsOpt, BitVector defaultArguments, LookupResultKind resultKind, TypeSymbol receiverType, TypeSymbol type, bool hasErrors = false) 6495public new TypeSymbol Type => base.Type!; 6504public TypeSymbol ReceiverType { get; } 6509public BoundObjectInitializerMember Update(Symbol? memberSymbol, ImmutableArray<BoundExpression> arguments, ImmutableArray<string> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, bool expanded, ImmutableArray<int> argsToParamsOpt, BitVector defaultArguments, LookupResultKind resultKind, TypeSymbol receiverType, TypeSymbol type) 6511if (!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 || !TypeSymbol.Equals(receiverType, this.ReceiverType, TypeCompareKind.ConsiderEverything) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 6523public BoundDynamicObjectInitializerMember(SyntaxNode syntax, string memberName, TypeSymbol receiverType, TypeSymbol type, bool hasErrors) 6535public BoundDynamicObjectInitializerMember(SyntaxNode syntax, string memberName, TypeSymbol receiverType, TypeSymbol type) 6547public new TypeSymbol Type => base.Type!; 6549public TypeSymbol ReceiverType { get; } 6554public BoundDynamicObjectInitializerMember Update(string memberName, TypeSymbol receiverType, TypeSymbol type) 6556if (memberName != this.MemberName || !TypeSymbol.Equals(receiverType, this.ReceiverType, TypeCompareKind.ConsiderEverything) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 6568public BoundCollectionInitializerExpression(SyntaxNode syntax, BoundObjectOrCollectionValuePlaceholder placeholder, ImmutableArray<BoundExpression> initializers, TypeSymbol type, bool hasErrors = false) 6582public BoundCollectionInitializerExpression Update(BoundObjectOrCollectionValuePlaceholder placeholder, ImmutableArray<BoundExpression> initializers, TypeSymbol type) 6584if (placeholder != this.Placeholder || initializers != this.Initializers || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 6596public 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) 6614public new TypeSymbol Type => base.Type!; 6627public BoundCollectionElementInitializer Update(MethodSymbol addMethod, ImmutableArray<BoundExpression> arguments, BoundExpression? implicitReceiverOpt, bool expanded, ImmutableArray<int> argsToParamsOpt, BitVector defaultArguments, bool invokedAsExtensionMethod, LookupResultKind resultKind, TypeSymbol type) 6629if (!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)) 6641public BoundDynamicCollectionElementInitializer(SyntaxNode syntax, ImmutableArray<MethodSymbol> applicableMethods, BoundExpression expression, ImmutableArray<BoundExpression> arguments, TypeSymbol type, bool hasErrors = false) 6653public new TypeSymbol Type => base.Type!; 6659public BoundDynamicCollectionElementInitializer Update(ImmutableArray<MethodSymbol> applicableMethods, BoundExpression expression, ImmutableArray<BoundExpression> arguments, TypeSymbol type) 6661if (applicableMethods != this.ApplicableMethods || expression != this.Expression || arguments != this.Arguments || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 6673public BoundImplicitReceiver(SyntaxNode syntax, TypeSymbol type, bool hasErrors) 6681public BoundImplicitReceiver(SyntaxNode syntax, TypeSymbol type) 6689public new TypeSymbol Type => base.Type!; 6694public BoundImplicitReceiver Update(TypeSymbol type) 6696if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 6708public BoundAnonymousObjectCreationExpression(SyntaxNode syntax, MethodSymbol constructor, ImmutableArray<BoundExpression> arguments, ImmutableArray<BoundAnonymousPropertyDeclaration> declarations, TypeSymbol type, bool hasErrors = false) 6722public new TypeSymbol Type => base.Type!; 6730public BoundAnonymousObjectCreationExpression Update(MethodSymbol constructor, ImmutableArray<BoundExpression> arguments, ImmutableArray<BoundAnonymousPropertyDeclaration> declarations, TypeSymbol type) 6732if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(constructor, this.Constructor) || arguments != this.Arguments || declarations != this.Declarations || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 6744public BoundAnonymousPropertyDeclaration(SyntaxNode syntax, PropertySymbol property, TypeSymbol type, bool hasErrors) 6754public BoundAnonymousPropertyDeclaration(SyntaxNode syntax, PropertySymbol property, TypeSymbol type) 6764public new TypeSymbol Type => base.Type!; 6770public BoundAnonymousPropertyDeclaration Update(PropertySymbol property, TypeSymbol type) 6772if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(property, this.Property) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 6784public BoundNewT(SyntaxNode syntax, BoundObjectInitializerExpressionBase? initializerExpressionOpt, bool wasTargetTyped, TypeSymbol type, bool hasErrors = false) 6800public BoundNewT Update(BoundObjectInitializerExpressionBase? initializerExpressionOpt, bool wasTargetTyped, TypeSymbol type) 6802if (initializerExpressionOpt != this.InitializerExpressionOpt || wasTargetTyped != this.WasTargetTyped || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 6814public BoundDelegateCreationExpression(SyntaxNode syntax, BoundExpression argument, MethodSymbol? methodOpt, bool isExtensionMethod, bool wasTargetTyped, TypeSymbol type, bool hasErrors = false) 6827public new TypeSymbol Type => base.Type!; 6836public BoundDelegateCreationExpression Update(BoundExpression argument, MethodSymbol? methodOpt, bool isExtensionMethod, bool wasTargetTyped, TypeSymbol type) 6838if (argument != this.Argument || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(methodOpt, this.MethodOpt) || isExtensionMethod != this.IsExtensionMethod || wasTargetTyped != this.WasTargetTyped || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 6850public BoundArrayCreation(SyntaxNode syntax, ImmutableArray<BoundExpression> bounds, BoundArrayInitialization? initializerOpt, TypeSymbol type, bool hasErrors = false) 6861public new TypeSymbol Type => base.Type!; 6868public BoundArrayCreation Update(ImmutableArray<BoundExpression> bounds, BoundArrayInitialization? initializerOpt, TypeSymbol type) 6870if (bounds != this.Bounds || initializerOpt != this.InitializerOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 6892public new TypeSymbol? Type => base.Type; 6913protected BoundStackAllocArrayCreationBase(BoundKind kind, SyntaxNode syntax, TypeSymbol elementType, BoundExpression count, BoundArrayInitialization? initializerOpt, TypeSymbol? type, bool hasErrors = false) 6925public TypeSymbol ElementType { get; } 6932public BoundStackAllocArrayCreation(SyntaxNode syntax, TypeSymbol elementType, BoundExpression count, BoundArrayInitialization? initializerOpt, TypeSymbol? type, bool hasErrors = false) 6945public BoundStackAllocArrayCreation Update(TypeSymbol elementType, BoundExpression count, BoundArrayInitialization? initializerOpt, TypeSymbol? type) 6947if (!TypeSymbol.Equals(elementType, this.ElementType, TypeCompareKind.ConsiderEverything) || count != this.Count || initializerOpt != this.InitializerOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 6959public BoundConvertedStackAllocExpression(SyntaxNode syntax, TypeSymbol elementType, BoundExpression count, BoundArrayInitialization? initializerOpt, TypeSymbol type, bool hasErrors = false) 6969public new TypeSymbol Type => base.Type!; 6974public BoundConvertedStackAllocExpression Update(TypeSymbol elementType, BoundExpression count, BoundArrayInitialization? initializerOpt, TypeSymbol type) 6976if (!TypeSymbol.Equals(elementType, this.ElementType, TypeCompareKind.ConsiderEverything) || count != this.Count || initializerOpt != this.InitializerOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 6988public BoundFieldAccess(SyntaxNode syntax, BoundExpression? receiverOpt, FieldSymbol fieldSymbol, ConstantValue? constantValueOpt, LookupResultKind resultKind, bool isByValue, bool isDeclaration, TypeSymbol type, bool hasErrors = false) 7003public new TypeSymbol Type => base.Type!; 7014public BoundFieldAccess Update(BoundExpression? receiverOpt, FieldSymbol fieldSymbol, ConstantValue? constantValueOpt, LookupResultKind resultKind, bool isByValue, bool isDeclaration, TypeSymbol type) 7016if (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)) 7028public BoundHoistedFieldAccess(SyntaxNode syntax, FieldSymbol fieldSymbol, TypeSymbol type, bool hasErrors) 7038public BoundHoistedFieldAccess(SyntaxNode syntax, FieldSymbol fieldSymbol, TypeSymbol type) 7048public new TypeSymbol Type => base.Type!; 7054public BoundHoistedFieldAccess Update(FieldSymbol fieldSymbol, TypeSymbol type) 7056if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(fieldSymbol, this.FieldSymbol) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7068public BoundPropertyAccess(SyntaxNode syntax, BoundExpression? receiverOpt, PropertySymbol propertySymbol, LookupResultKind resultKind, TypeSymbol type, bool hasErrors = false) 7080public new TypeSymbol Type => base.Type!; 7088public BoundPropertyAccess Update(BoundExpression? receiverOpt, PropertySymbol propertySymbol, LookupResultKind resultKind, TypeSymbol type) 7090if (receiverOpt != this.ReceiverOpt || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(propertySymbol, this.PropertySymbol) || resultKind != this.ResultKind || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7102public BoundEventAccess(SyntaxNode syntax, BoundExpression? receiverOpt, EventSymbol eventSymbol, bool isUsableAsField, LookupResultKind resultKind, TypeSymbol type, bool hasErrors = false) 7115public new TypeSymbol Type => base.Type!; 7124public BoundEventAccess Update(BoundExpression? receiverOpt, EventSymbol eventSymbol, bool isUsableAsField, LookupResultKind resultKind, TypeSymbol type) 7126if (receiverOpt != this.ReceiverOpt || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(eventSymbol, this.EventSymbol) || isUsableAsField != this.IsUsableAsField || resultKind != this.ResultKind || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7138public BoundIndexerAccess(SyntaxNode syntax, BoundExpression? receiverOpt, PropertySymbol indexer, ImmutableArray<BoundExpression> arguments, ImmutableArray<string> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, bool expanded, ImmutableArray<int> argsToParamsOpt, BitVector defaultArguments, ImmutableArray<PropertySymbol> originalIndexersOpt, TypeSymbol type, bool hasErrors = false) 7157public new TypeSymbol Type => base.Type!; 7171public BoundIndexerAccess Update(BoundExpression? receiverOpt, PropertySymbol indexer, ImmutableArray<BoundExpression> arguments, ImmutableArray<string> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, bool expanded, ImmutableArray<int> argsToParamsOpt, BitVector defaultArguments, ImmutableArray<PropertySymbol> originalIndexersOpt, TypeSymbol type) 7173if (receiverOpt != this.ReceiverOpt || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(indexer, this.Indexer) || arguments != this.Arguments || argumentNamesOpt != this.ArgumentNamesOpt || argumentRefKindsOpt != this.ArgumentRefKindsOpt || expanded != this.Expanded || argsToParamsOpt != this.ArgsToParamsOpt || defaultArguments != this.DefaultArguments || originalIndexersOpt != this.OriginalIndexersOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7185public BoundImplicitIndexerAccess(SyntaxNode syntax, BoundExpression receiver, BoundExpression argument, BoundExpression lengthOrCountAccess, BoundImplicitIndexerReceiverPlaceholder receiverPlaceholder, BoundExpression indexerOrSliceAccess, ImmutableArray<BoundImplicitIndexerValuePlaceholder> argumentPlaceholders, TypeSymbol type, bool hasErrors = false) 7209public new TypeSymbol Type => base.Type!; 7220public BoundImplicitIndexerAccess Update(BoundExpression receiver, BoundExpression argument, BoundExpression lengthOrCountAccess, BoundImplicitIndexerReceiverPlaceholder receiverPlaceholder, BoundExpression indexerOrSliceAccess, ImmutableArray<BoundImplicitIndexerValuePlaceholder> argumentPlaceholders, TypeSymbol type) 7222if (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)) 7234public BoundDynamicIndexerAccess(SyntaxNode syntax, BoundExpression receiver, ImmutableArray<BoundExpression> arguments, ImmutableArray<string> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, ImmutableArray<PropertySymbol> applicableIndexers, TypeSymbol type, bool hasErrors = false) 7250public new TypeSymbol Type => base.Type!; 7260public BoundDynamicIndexerAccess Update(BoundExpression receiver, ImmutableArray<BoundExpression> arguments, ImmutableArray<string> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, ImmutableArray<PropertySymbol> applicableIndexers, TypeSymbol type) 7262if (receiver != this.Receiver || arguments != this.Arguments || argumentNamesOpt != this.ArgumentNamesOpt || argumentRefKindsOpt != this.ArgumentRefKindsOpt || applicableIndexers != this.ApplicableIndexers || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7274public BoundLambda(SyntaxNode syntax, UnboundLambda unboundLambda, LambdaSymbol symbol, BoundBlock body, ImmutableBindingDiagnostic<AssemblySymbol> diagnostics, Binder binder, TypeSymbol? type, bool hasErrors = false) 7292public new TypeSymbol? Type => base.Type; 7300public BoundLambda Update(UnboundLambda unboundLambda, LambdaSymbol symbol, BoundBlock body, ImmutableBindingDiagnostic<AssemblySymbol> diagnostics, Binder binder, TypeSymbol? type) 7302if (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)) 7336public new TypeSymbol? Type => base.Type; 7358public BoundQueryClause(SyntaxNode syntax, BoundExpression value, RangeVariableSymbol? definedSymbol, BoundExpression? operation, BoundExpression? cast, Binder binder, BoundExpression? unoptimizedForm, TypeSymbol type, bool hasErrors = false) 7374public new TypeSymbol Type => base.Type!; 7385public BoundQueryClause Update(BoundExpression value, RangeVariableSymbol? definedSymbol, BoundExpression? operation, BoundExpression? cast, Binder binder, BoundExpression? unoptimizedForm, TypeSymbol type) 7387if (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)) 7425public BoundNameOfOperator(SyntaxNode syntax, BoundExpression argument, ConstantValue constantValueOpt, TypeSymbol type, bool hasErrors = false) 7437public new TypeSymbol Type => base.Type!; 7444public BoundNameOfOperator Update(BoundExpression argument, ConstantValue constantValueOpt, TypeSymbol type) 7446if (argument != this.Argument || constantValueOpt != this.ConstantValueOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7458protected BoundInterpolatedStringBase(BoundKind kind, SyntaxNode syntax, ImmutableArray<BoundExpression> parts, ConstantValue? constantValueOpt, TypeSymbol? type, bool hasErrors = false) 7474public BoundUnconvertedInterpolatedString(SyntaxNode syntax, ImmutableArray<BoundExpression> parts, ConstantValue? constantValueOpt, TypeSymbol? type, bool hasErrors = false) 7486public BoundUnconvertedInterpolatedString Update(ImmutableArray<BoundExpression> parts, ConstantValue? constantValueOpt, TypeSymbol? type) 7488if (parts != this.Parts || constantValueOpt != this.ConstantValueOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7500public BoundInterpolatedString(SyntaxNode syntax, InterpolatedStringHandlerData? interpolationData, ImmutableArray<BoundExpression> parts, ConstantValue? constantValueOpt, TypeSymbol? type, bool hasErrors = false) 7514public BoundInterpolatedString Update(InterpolatedStringHandlerData? interpolationData, ImmutableArray<BoundExpression> parts, ConstantValue? constantValueOpt, TypeSymbol? type) 7516if (!interpolationData.Equals(this.InterpolationData) || parts != this.Parts || constantValueOpt != this.ConstantValueOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7528public BoundInterpolatedStringHandlerPlaceholder(SyntaxNode syntax, TypeSymbol? type, bool hasErrors) 7533public BoundInterpolatedStringHandlerPlaceholder(SyntaxNode syntax, TypeSymbol? type) 7542public BoundInterpolatedStringHandlerPlaceholder Update(TypeSymbol? type) 7544if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7556public BoundInterpolatedStringArgumentPlaceholder(SyntaxNode syntax, int argumentIndex, TypeSymbol type, bool hasErrors) 7565public BoundInterpolatedStringArgumentPlaceholder(SyntaxNode syntax, int argumentIndex, TypeSymbol type) 7574public new TypeSymbol Type => base.Type!; 7580public BoundInterpolatedStringArgumentPlaceholder Update(int argumentIndex, TypeSymbol type) 7582if (argumentIndex != this.ArgumentIndex || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 7606public new TypeSymbol? Type => base.Type; 7629public BoundIsPatternExpression(SyntaxNode syntax, BoundExpression expression, BoundPattern pattern, bool isNegated, BoundDecisionDag reachabilityDecisionDag, LabelSymbol whenTrueLabel, LabelSymbol whenFalseLabel, TypeSymbol? type, bool hasErrors = false) 7657public BoundIsPatternExpression Update(BoundExpression expression, BoundPattern pattern, bool isNegated, BoundDecisionDag reachabilityDecisionDag, LabelSymbol whenTrueLabel, LabelSymbol whenFalseLabel, TypeSymbol? type) 7659if (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)) 7671protected BoundPattern(BoundKind kind, SyntaxNode syntax, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors) 7682protected BoundPattern(BoundKind kind, SyntaxNode syntax, TypeSymbol inputType, TypeSymbol narrowedType) 7693public TypeSymbol InputType { get; } 7694public TypeSymbol NarrowedType { get; } 7699public BoundConstantPattern(SyntaxNode syntax, BoundExpression value, ConstantValue constantValue, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors = false) 7718public BoundConstantPattern Update(BoundExpression value, ConstantValue constantValue, TypeSymbol inputType, TypeSymbol narrowedType) 7720if (value != this.Value || constantValue != this.ConstantValue || !TypeSymbol.Equals(inputType, this.InputType, TypeCompareKind.ConsiderEverything) || !TypeSymbol.Equals(narrowedType, this.NarrowedType, TypeCompareKind.ConsiderEverything)) 7732public BoundDiscardPattern(SyntaxNode syntax, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors) 7741public BoundDiscardPattern(SyntaxNode syntax, TypeSymbol inputType, TypeSymbol narrowedType) 7754public BoundDiscardPattern Update(TypeSymbol inputType, TypeSymbol narrowedType) 7756if (!TypeSymbol.Equals(inputType, this.InputType, TypeCompareKind.ConsiderEverything) || !TypeSymbol.Equals(narrowedType, this.NarrowedType, TypeCompareKind.ConsiderEverything)) 7768protected BoundObjectPattern(BoundKind kind, SyntaxNode syntax, Symbol? variable, BoundExpression? variableAccess, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors = false) 7785public BoundDeclarationPattern(SyntaxNode syntax, BoundTypeExpression declaredType, bool isVar, Symbol? variable, BoundExpression? variableAccess, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors = false) 7803public BoundDeclarationPattern Update(BoundTypeExpression declaredType, bool isVar, Symbol? variable, BoundExpression? variableAccess, TypeSymbol inputType, TypeSymbol narrowedType) 7805if (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)) 7817public 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) 7840public BoundRecursivePattern Update(BoundTypeExpression? declaredType, MethodSymbol? deconstructMethod, ImmutableArray<BoundPositionalSubpattern> deconstruction, ImmutableArray<BoundPropertySubpattern> properties, bool isExplicitNotNullTest, Symbol? variable, BoundExpression? variableAccess, TypeSymbol inputType, TypeSymbol narrowedType) 7842if (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)) 7854public 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) 7884public BoundListPattern Update(ImmutableArray<BoundPattern> subpatterns, bool hasSlice, BoundExpression? lengthAccess, BoundExpression? indexerAccess, BoundListPatternReceiverPlaceholder? receiverPlaceholder, BoundListPatternIndexPlaceholder? argumentPlaceholder, Symbol? variable, BoundExpression? variableAccess, TypeSymbol inputType, TypeSymbol narrowedType) 7886if (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)) 7898public BoundSlicePattern(SyntaxNode syntax, BoundPattern? pattern, BoundExpression? indexerAccess, BoundSlicePatternReceiverPlaceholder? receiverPlaceholder, BoundSlicePatternRangePlaceholder? argumentPlaceholder, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors = false) 7923public BoundSlicePattern Update(BoundPattern? pattern, BoundExpression? indexerAccess, BoundSlicePatternReceiverPlaceholder? receiverPlaceholder, BoundSlicePatternRangePlaceholder? argumentPlaceholder, TypeSymbol inputType, TypeSymbol narrowedType) 7925if (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)) 7937public BoundITuplePattern(SyntaxNode syntax, MethodSymbol getLengthMethod, MethodSymbol getItemMethod, ImmutableArray<BoundPositionalSubpattern> subpatterns, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors = false) 7959public BoundITuplePattern Update(MethodSymbol getLengthMethod, MethodSymbol getItemMethod, ImmutableArray<BoundPositionalSubpattern> subpatterns, TypeSymbol inputType, TypeSymbol narrowedType) 7961if (!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)) 8045public BoundPropertySubpatternMember(SyntaxNode syntax, BoundPropertySubpatternMember? receiver, Symbol? symbol, TypeSymbol type, bool hasErrors = false) 8058public TypeSymbol Type { get; } 8063public BoundPropertySubpatternMember Update(BoundPropertySubpatternMember? receiver, Symbol? symbol, TypeSymbol type) 8065if (receiver != this.Receiver || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(symbol, this.Symbol) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 8077public BoundTypePattern(SyntaxNode syntax, BoundTypeExpression declaredType, bool isExplicitNotNullTest, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors = false) 8095public BoundTypePattern Update(BoundTypeExpression declaredType, bool isExplicitNotNullTest, TypeSymbol inputType, TypeSymbol narrowedType) 8097if (declaredType != this.DeclaredType || isExplicitNotNullTest != this.IsExplicitNotNullTest || !TypeSymbol.Equals(inputType, this.InputType, TypeCompareKind.ConsiderEverything) || !TypeSymbol.Equals(narrowedType, this.NarrowedType, TypeCompareKind.ConsiderEverything)) 8109public BoundBinaryPattern(SyntaxNode syntax, bool disjunction, BoundPattern left, BoundPattern right, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors = false) 8130public BoundBinaryPattern Update(bool disjunction, BoundPattern left, BoundPattern right, TypeSymbol inputType, TypeSymbol narrowedType) 8132if (disjunction != this.Disjunction || left != this.Left || right != this.Right || !TypeSymbol.Equals(inputType, this.InputType, TypeCompareKind.ConsiderEverything) || !TypeSymbol.Equals(narrowedType, this.NarrowedType, TypeCompareKind.ConsiderEverything)) 8144public BoundNegatedPattern(SyntaxNode syntax, BoundPattern negated, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors = false) 8160public BoundNegatedPattern Update(BoundPattern negated, TypeSymbol inputType, TypeSymbol narrowedType) 8162if (negated != this.Negated || !TypeSymbol.Equals(inputType, this.InputType, TypeCompareKind.ConsiderEverything) || !TypeSymbol.Equals(narrowedType, this.NarrowedType, TypeCompareKind.ConsiderEverything)) 8174public BoundRelationalPattern(SyntaxNode syntax, BinaryOperatorKind relation, BoundExpression value, ConstantValue constantValue, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors = false) 8195public BoundRelationalPattern Update(BinaryOperatorKind relation, BoundExpression value, ConstantValue constantValue, TypeSymbol inputType, TypeSymbol narrowedType) 8197if (relation != this.Relation || value != this.Value || constantValue != this.ConstantValue || !TypeSymbol.Equals(inputType, this.InputType, TypeCompareKind.ConsiderEverything) || !TypeSymbol.Equals(narrowedType, this.NarrowedType, TypeCompareKind.ConsiderEverything)) 8209public BoundDiscardExpression(SyntaxNode syntax, NullableAnnotation nullableAnnotation, bool isInferred, TypeSymbol? type, bool hasErrors) 8216public BoundDiscardExpression(SyntaxNode syntax, NullableAnnotation nullableAnnotation, bool isInferred, TypeSymbol? type) 8223public new TypeSymbol? Type => base.Type; 8230public BoundDiscardExpression Update(NullableAnnotation nullableAnnotation, bool isInferred, TypeSymbol? type) 8232if (nullableAnnotation != this.NullableAnnotation || isInferred != this.IsInferred || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 8244public BoundThrowExpression(SyntaxNode syntax, BoundExpression expression, TypeSymbol? type, bool hasErrors = false) 8258public BoundThrowExpression Update(BoundExpression expression, TypeSymbol? type) 8260if (expression != this.Expression || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 8282public new TypeSymbol? Type => base.Type; 8355public new TypeSymbol? Type => base.Type; 8442public BoundExpressionWithNullability(SyntaxNode syntax, BoundExpression expression, NullableAnnotation nullableAnnotation, TypeSymbol? type, bool hasErrors = false) 8453public new TypeSymbol? Type => base.Type; 8459public BoundExpressionWithNullability Update(BoundExpression expression, NullableAnnotation nullableAnnotation, TypeSymbol? type) 8461if (expression != this.Expression || nullableAnnotation != this.NullableAnnotation || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 8473public BoundWithExpression(SyntaxNode syntax, BoundExpression receiver, MethodSymbol? cloneMethod, BoundObjectInitializerExpressionBase initializerExpression, TypeSymbol type, bool hasErrors = false) 8486public new TypeSymbol Type => base.Type!; 8494public BoundWithExpression Update(BoundExpression receiver, MethodSymbol? cloneMethod, BoundObjectInitializerExpressionBase initializerExpression, TypeSymbol type) 8496if (receiver != this.Receiver || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(cloneMethod, this.CloneMethod) || initializerExpression != this.InitializerExpression || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 10442TypeSymbol? type = this.VisitType(node.Type); 10448TypeSymbol? type = this.VisitType(node.Type); 10453TypeSymbol? type = this.VisitType(node.Type); 10458TypeSymbol? type = this.VisitType(node.Type); 10463TypeSymbol? type = this.VisitType(node.Type); 10468TypeSymbol? type = this.VisitType(node.Type); 10473TypeSymbol? type = this.VisitType(node.Type); 10478TypeSymbol? type = this.VisitType(node.Type); 10483TypeSymbol? type = this.VisitType(node.Type); 10488TypeSymbol? type = this.VisitType(node.Type); 10493TypeSymbol? type = this.VisitType(node.Type); 10498TypeSymbol? type = this.VisitType(node.Type); 10503TypeSymbol? type = this.VisitType(node.Type); 10508TypeSymbol? type = this.VisitType(node.Type); 10514TypeSymbol? type = this.VisitType(node.Type); 10520TypeSymbol? type = this.VisitType(node.Type); 10537TypeSymbol? type = this.VisitType(node.Type); 10542TypeSymbol? type = this.VisitType(node.Type); 10547TypeSymbol? type = this.VisitType(node.Type); 10553TypeSymbol? constrainedToTypeOpt = this.VisitType(node.ConstrainedToTypeOpt); 10554TypeSymbol? type = this.VisitType(node.Type); 10564TypeSymbol? constrainedToTypeOpt = this.VisitType(node.ConstrainedToTypeOpt); 10565TypeSymbol? type = this.VisitType(node.Type); 10571TypeSymbol? type = this.VisitType(node.Type); 10577TypeSymbol? type = this.VisitType(node.Type); 10582TypeSymbol? constrainedToTypeOpt = this.VisitType(node.ConstrainedToTypeOpt); 10583TypeSymbol? type = this.VisitType(node.Type); 10589TypeSymbol? type = this.VisitType(node.Type); 10596TypeSymbol? type = this.VisitType(node.Type); 10603TypeSymbol? type = this.VisitType(node.Type); 10609TypeSymbol? type = this.VisitType(node.Type); 10615TypeSymbol? type = this.VisitType(node.Type); 10621TypeSymbol? type = this.VisitType(node.Type); 10627TypeSymbol? type = this.VisitType(node.Type); 10634TypeSymbol? type = this.VisitType(node.Type); 10641TypeSymbol? type = this.VisitType(node.Type); 10648TypeSymbol? type = this.VisitType(node.Type); 10655TypeSymbol? constrainedToTypeOpt = this.VisitType(node.ConstrainedToTypeOpt); 10656TypeSymbol? type = this.VisitType(node.Type); 10667TypeSymbol? type = this.VisitType(node.Type); 10674TypeSymbol? type = this.VisitType(node.Type); 10681TypeSymbol? type = this.VisitType(node.Type); 10690TypeSymbol? type = this.VisitType(node.Type); 10697TypeSymbol? type = this.VisitType(node.Type); 10705TypeSymbol? type = this.VisitType(node.Type); 10713TypeSymbol? naturalTypeOpt = this.VisitType(node.NaturalTypeOpt); 10714TypeSymbol? type = this.VisitType(node.Type); 10721TypeSymbol? type = this.VisitType(node.Type); 10727TypeSymbol? type = this.VisitType(node.Type); 10740TypeSymbol? type = this.VisitType(node.Type); 10746TypeSymbol? type = this.VisitType(node.Type); 10757TypeSymbol? type = this.VisitType(node.Type); 10762TypeSymbol? type = this.VisitType(node.Type); 10767TypeSymbol? type = this.VisitType(node.Type); 10772TypeSymbol? type = this.VisitType(node.Type); 10777TypeSymbol? type = this.VisitType(node.Type); 10782TypeSymbol? type = this.VisitType(node.Type); 10787TypeSymbol? type = this.VisitType(node.Type); 10792TypeSymbol? type = this.VisitType(node.Type); 10797TypeSymbol? type = this.VisitType(node.Type); 10802TypeSymbol? type = this.VisitType(node.Type); 10807TypeSymbol? type = this.VisitType(node.Type); 10812TypeSymbol? type = this.VisitType(node.Type); 10818TypeSymbol? type = this.VisitType(node.Type); 10825TypeSymbol? type = this.VisitType(node.Type); 10834TypeSymbol? type = this.VisitType(node.Type); 10840TypeSymbol? type = this.VisitType(node.Type); 10846TypeSymbol? type = this.VisitType(node.Type); 10852TypeSymbol? type = this.VisitType(node.Type); 10857TypeSymbol? type = this.VisitType(node.Type); 10863TypeSymbol? type = this.VisitType(node.Type); 10871TypeSymbol? elementPointerType = this.VisitType(node.ElementPointerType); 10872TypeSymbol? type = this.VisitType(node.Type); 11043TypeSymbol? exceptionTypeOpt = this.VisitType(node.ExceptionTypeOpt); 11048TypeSymbol? type = this.VisitType(node.Type); 11053TypeSymbol? type = this.VisitType(node.Type); 11058TypeSymbol? type = this.VisitType(node.Type); 11063TypeSymbol? type = this.VisitType(node.Type); 11068TypeSymbol? type = this.VisitType(node.Type); 11073TypeSymbol? type = this.VisitType(node.Type); 11078TypeSymbol? type = this.VisitType(node.Type); 11083TypeSymbol? type = this.VisitType(node.Type); 11089TypeSymbol? type = this.VisitType(node.Type); 11094TypeSymbol? type = this.VisitType(node.Type); 11111TypeSymbol? type = this.VisitType(node.Type); 11136TypeSymbol? type = this.VisitType(node.Type); 11144TypeSymbol? naturalTypeOpt = this.VisitType(node.NaturalTypeOpt); 11145TypeSymbol? type = this.VisitType(node.Type); 11177TypeSymbol? type = this.VisitType(node.Type); 11183TypeSymbol? type = this.VisitType(node.Type); 11214TypeSymbol? type = this.VisitType(node.Type); 11239TypeSymbol? indexerType = this.VisitType(node.IndexerType); 11249TypeSymbol? sliceType = this.VisitType(node.SliceType); 11273TypeSymbol? type = this.VisitType(node.Type); 11280TypeSymbol? type = this.VisitType(node.Type); 11287TypeSymbol? type = this.VisitType(node.Type); 11293TypeSymbol? type = this.VisitType(node.Type); 11300TypeSymbol? type = this.VisitType(node.Type); 11307TypeSymbol? type = this.VisitType(node.Type); 11315TypeSymbol? type = this.VisitType(node.Type); 11320TypeSymbol? type = this.VisitType(node.Type); 11327TypeSymbol? type = this.VisitType(node.Type); 11333TypeSymbol? type = this.VisitType(node.Type); 11339TypeSymbol? type = this.VisitType(node.Type); 11346TypeSymbol? type = this.VisitType(node.Type); 11353TypeSymbol? type = this.VisitType(node.Type); 11360TypeSymbol? type = this.VisitType(node.Type); 11366TypeSymbol? type = this.VisitType(node.Type); 11373TypeSymbol? type = this.VisitType(node.Type); 11379TypeSymbol? type = this.VisitType(node.Type); 11386TypeSymbol? type = this.VisitType(node.Type); 11393TypeSymbol? type = this.VisitType(node.Type); 11399TypeSymbol? type = this.VisitType(node.Type); 11406TypeSymbol? type = this.VisitType(node.Type); 11412TypeSymbol? receiverType = this.VisitType(node.ReceiverType); 11413TypeSymbol? type = this.VisitType(node.Type); 11418TypeSymbol? receiverType = this.VisitType(node.ReceiverType); 11419TypeSymbol? type = this.VisitType(node.Type); 11426TypeSymbol? type = this.VisitType(node.Type); 11433TypeSymbol? type = this.VisitType(node.Type); 11440TypeSymbol? type = this.VisitType(node.Type); 11445TypeSymbol? type = this.VisitType(node.Type); 11452TypeSymbol? type = this.VisitType(node.Type); 11457TypeSymbol? type = this.VisitType(node.Type); 11463TypeSymbol? type = this.VisitType(node.Type); 11469TypeSymbol? type = this.VisitType(node.Type); 11476TypeSymbol? type = this.VisitType(node.Type); 11482TypeSymbol? type = this.VisitType(node.Type); 11489TypeSymbol? elementType = this.VisitType(node.ElementType); 11490TypeSymbol? type = this.VisitType(node.Type); 11497TypeSymbol? elementType = this.VisitType(node.ElementType); 11498TypeSymbol? type = this.VisitType(node.Type); 11504TypeSymbol? type = this.VisitType(node.Type); 11509TypeSymbol? type = this.VisitType(node.Type); 11515TypeSymbol? type = this.VisitType(node.Type); 11521TypeSymbol? type = this.VisitType(node.Type); 11528TypeSymbol? type = this.VisitType(node.Type); 11539TypeSymbol? type = this.VisitType(node.Type); 11546TypeSymbol? type = this.VisitType(node.Type); 11553TypeSymbol? type = this.VisitType(node.Type); 11558TypeSymbol? type = this.VisitType(node.Type); 11567TypeSymbol? type = this.VisitType(node.Type); 11578TypeSymbol? type = this.VisitType(node.Type); 11584TypeSymbol? type = this.VisitType(node.Type); 11590TypeSymbol? type = this.VisitType(node.Type); 11595TypeSymbol? type = this.VisitType(node.Type); 11600TypeSymbol? type = this.VisitType(node.Type); 11608TypeSymbol? type = this.VisitType(node.Type); 11616TypeSymbol? type = this.VisitType(node.Type); 11622TypeSymbol? inputType = this.VisitType(node.InputType); 11623TypeSymbol? narrowedType = this.VisitType(node.NarrowedType); 11628TypeSymbol? inputType = this.VisitType(node.InputType); 11629TypeSymbol? narrowedType = this.VisitType(node.NarrowedType); 11636TypeSymbol? inputType = this.VisitType(node.InputType); 11637TypeSymbol? narrowedType = this.VisitType(node.NarrowedType); 11646TypeSymbol? inputType = this.VisitType(node.InputType); 11647TypeSymbol? narrowedType = this.VisitType(node.NarrowedType); 11658TypeSymbol? inputType = this.VisitType(node.InputType); 11659TypeSymbol? narrowedType = this.VisitType(node.NarrowedType); 11668TypeSymbol? inputType = this.VisitType(node.InputType); 11669TypeSymbol? narrowedType = this.VisitType(node.NarrowedType); 11675TypeSymbol? inputType = this.VisitType(node.InputType); 11676TypeSymbol? narrowedType = this.VisitType(node.NarrowedType); 11693TypeSymbol? type = this.VisitType(node.Type); 11699TypeSymbol? inputType = this.VisitType(node.InputType); 11700TypeSymbol? narrowedType = this.VisitType(node.NarrowedType); 11707TypeSymbol? inputType = this.VisitType(node.InputType); 11708TypeSymbol? narrowedType = this.VisitType(node.NarrowedType); 11714TypeSymbol? inputType = this.VisitType(node.InputType); 11715TypeSymbol? narrowedType = this.VisitType(node.NarrowedType); 11721TypeSymbol? inputType = this.VisitType(node.InputType); 11722TypeSymbol? narrowedType = this.VisitType(node.NarrowedType); 11727TypeSymbol? type = this.VisitType(node.Type); 11733TypeSymbol? type = this.VisitType(node.Type); 11739TypeSymbol? type = this.VisitType(node.Type); 11745TypeSymbol? type = this.VisitType(node.Type); 11750TypeSymbol? type = this.VisitType(node.Type); 11769TypeSymbol? type = this.VisitType(node.Type); 11776TypeSymbol? type = this.VisitType(node.Type); 11783private readonly ImmutableDictionary<BoundExpression, (NullabilityInfo Info, TypeSymbol? Type)> _updatedNullabilities; 11787public NullabilityRewriter(ImmutableDictionary<BoundExpression, (NullabilityInfo Info, TypeSymbol? Type)> updatedNullabilities, NullableWalker.SnapshotManager? snapshotManager, ImmutableDictionary<Symbol, Symbol>.Builder remappedSymbols) 11820if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 11835if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 11852if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 11866if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 11878if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 11890if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 11902if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 11914if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 11926if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 11938if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 11950if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 11962if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 11974if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 11986if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12001if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12019if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12037if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12051if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12063if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12076TypeSymbol? constrainedToTypeOpt = GetUpdatedSymbol(node, node.ConstrainedToTypeOpt); 12081if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12096TypeSymbol? constrainedToTypeOpt = GetUpdatedSymbol(node, node.ConstrainedToTypeOpt); 12105if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12122if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12139if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12154TypeSymbol? constrainedToTypeOpt = GetUpdatedSymbol(node, node.ConstrainedToTypeOpt); 12157if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12174if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12192if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12210if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12228if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12245if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12262if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12280if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12299if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12317if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12340if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12358if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12376if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12396if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12414if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12433if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12447TypeSymbol? naturalTypeOpt = GetUpdatedSymbol(node, node.NaturalTypeOpt); 12453if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12471if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12488if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12515if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12533if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12558if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12576if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12594if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12608if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12620if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12632if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12644if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12656if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12668if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12684if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12702if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12716if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12731if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12749if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12769if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12786if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12804if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12822if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12836if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12851if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12865TypeSymbol elementPointerType = GetUpdatedSymbol(node, node.ElementPointerType); 12872if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12997TypeSymbol? exceptionTypeOpt = GetUpdatedSymbol(node, node.ExceptionTypeOpt); 13007if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13019if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13031if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13043if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13055if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13067if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13082if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13099if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13117if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13134if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13148if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13174if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13188TypeSymbol? naturalTypeOpt = GetUpdatedSymbol(node, node.NaturalTypeOpt); 13194if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13236TypeSymbol indexerType = GetUpdatedSymbol(node, node.IndexerType); 13247TypeSymbol sliceType = GetUpdatedSymbol(node, node.SliceType); 13269if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13288if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13307if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13324if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13343if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13361if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13381if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13395if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13411if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13431if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13449if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13469if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13488if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13507if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13524if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13544if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13561if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13579if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13598if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13615if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13633if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13648TypeSymbol receiverType = GetUpdatedSymbol(node, node.ReceiverType); 13652if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13666TypeSymbol receiverType = GetUpdatedSymbol(node, node.ReceiverType); 13669if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13687if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13706if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13725if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13739if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13756if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13773if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13790if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13808if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13826if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13843if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13857TypeSymbol elementType = GetUpdatedSymbol(node, node.ElementType); 13862if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13876TypeSymbol elementType = GetUpdatedSymbol(node, node.ElementType); 13881if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13899if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13916if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13934if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13952if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13972if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13991if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14010if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14027if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14048if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14065if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14082if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14099if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14113if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14125if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14142if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14161if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14175TypeSymbol inputType = GetUpdatedSymbol(node, node.InputType); 14176TypeSymbol narrowedType = GetUpdatedSymbol(node, node.NarrowedType); 14183TypeSymbol inputType = GetUpdatedSymbol(node, node.InputType); 14184TypeSymbol narrowedType = GetUpdatedSymbol(node, node.NarrowedType); 14191TypeSymbol inputType = GetUpdatedSymbol(node, node.InputType); 14192TypeSymbol narrowedType = GetUpdatedSymbol(node, node.NarrowedType); 14202TypeSymbol inputType = GetUpdatedSymbol(node, node.InputType); 14203TypeSymbol narrowedType = GetUpdatedSymbol(node, node.NarrowedType); 14214TypeSymbol inputType = GetUpdatedSymbol(node, node.InputType); 14215TypeSymbol narrowedType = GetUpdatedSymbol(node, node.NarrowedType); 14227TypeSymbol inputType = GetUpdatedSymbol(node, node.InputType); 14228TypeSymbol narrowedType = GetUpdatedSymbol(node, node.NarrowedType); 14240TypeSymbol inputType = GetUpdatedSymbol(node, node.InputType); 14241TypeSymbol narrowedType = GetUpdatedSymbol(node, node.NarrowedType); 14262TypeSymbol inputType = GetUpdatedSymbol(node, node.InputType); 14263TypeSymbol narrowedType = GetUpdatedSymbol(node, node.NarrowedType); 14270TypeSymbol inputType = GetUpdatedSymbol(node, node.InputType); 14271TypeSymbol narrowedType = GetUpdatedSymbol(node, node.NarrowedType); 14279TypeSymbol inputType = GetUpdatedSymbol(node, node.InputType); 14280TypeSymbol narrowedType = GetUpdatedSymbol(node, node.NarrowedType); 14287TypeSymbol inputType = GetUpdatedSymbol(node, node.InputType); 14288TypeSymbol narrowedType = GetUpdatedSymbol(node, node.NarrowedType); 14295if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14310if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14328if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14346if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14363if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14389if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14408if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
Lowering\AsyncRewriter\AsyncExceptionHandlerRewriter.cs (3)
38Debug.Assert(TypeSymbol.Equals(factory.CurrentType, (containingType ?? containingMethod.ContainingType), TypeCompareKind.ConsiderEverything2)); 523var catchType = node.ExceptionTypeOpt ?? _F.SpecialType(SpecialType.System_Object); 1019if (!_hoistedLocals.Keys.Any(l => l.Name == local.Name && TypeSymbol.Equals(l.Type, local.Type, TypeCompareKind.ConsiderEverything2)))
Lowering\AsyncRewriter\AsyncIteratorMethodToStateMachineRewriter.cs (1)
158TypeSymbol combinedTokensType = combinedTokens.Type;
Lowering\AsyncRewriter\AsyncMethodBuilderMemberCollection.cs (4)
39internal readonly TypeSymbol ResultType; 88TypeSymbol resultType, 256var resultType = returnType.TypeArgumentsWithAnnotationsNoUseSiteDiagnostics.Single().Type; 375TypeSymbol resultType,
Lowering\AsyncRewriter\AsyncMethodToStateMachineRewriter.cs (8)
60private readonly Dictionary<TypeSymbol, FieldSymbol> _awaiterFields; 93_awaiterFields = new Dictionary<TypeSymbol, FieldSymbol>(Symbols.SymbolEqualityComparer.IgnoringDynamicTupleNamesAndNullability); 101private FieldSymbol GetAwaiterField(TypeSymbol awaiterType) 359TypeSymbol type = VisitType(node.Type); 457TypeSymbol awaiterFieldType = awaiterTemp.Type.IsVerifierReference() 477(TypeSymbol.Equals(awaiterField.Type, awaiterTemp.Type, TypeCompareKind.ConsiderEverything2)) 500TypeSymbol.Equals(awaiterTemp.Type, awaiterField.Type, TypeCompareKind.ConsiderEverything2) 594private BoundStatement GenerateAwaitOnCompleted(TypeSymbol loweredAwaiterType, LocalSymbol awaiterTemp)
Lowering\AsyncRewriter\AsyncRewriter.AsyncIteratorRewriter.cs (3)
45Debug.Assert(!TypeSymbol.Equals(method.IteratorElementTypeWithAnnotations.Type, null, TypeCompareKind.ConsiderEverything2)); 134TypeSymbol elementType = ((AsyncStateMachine)stateMachineType).IteratorElementType; 431TypeSymbol returnType = IAsyncDisposable_DisposeAsync.ReturnType;
Lowering\AsyncRewriter\AsyncStateMachine.cs (3)
23internal readonly TypeSymbol IteratorElementType; // only for async-iterators 35var elementType = TypeMap.SubstituteType(asyncMethod.IteratorElementTypeWithAnnotations).Type; 78internal override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol> basesBeingResolved)
Lowering\ClosureConversion\ClosureConversion.Analysis.Tree.cs (1)
663TypeSymbol type;
Lowering\ClosureConversion\ClosureConversion.cs (14)
238Debug.Assert(((object)thisParameter == null) || (TypeSymbol.Equals(thisParameter.Type, thisType, TypeCompareKind.ConsiderEverything2))); 572Debug.Assert(TypeSymbol.Equals(result.Type, frameType, TypeCompareKind.ConsiderEverything2)); 589if ((object)_currentFrameThis != null && TypeSymbol.Equals(_currentFrameThis.Type, frameClass, TypeCompareKind.ConsiderEverything2)) 602if (TypeSymbol.Equals(potentialParameter.Type.OriginalDefinition, frameClass, TypeCompareKind.ConsiderEverything2)) 666Debug.Assert(TypeSymbol.Equals(frameType, constructor.ContainingType, TypeCompareKind.ConsiderEverything2)); 834return (!_currentMethod.IsStatic && TypeSymbol.Equals(_currentMethod.ContainingType, _topLevelMethod.ContainingType, TypeCompareKind.ConsiderEverything2)) 841TypeSymbol type = VisitType(node.Type); 979while (!TypeSymbol.Equals(oldTypeArg.Type, newTypeArg.Type, TypeCompareKind.ConsiderEverything)); 1060var type = VisitType(node.Type); 1129var newType = this.VisitType(node.Type); 1259var exceptionTypeOpt = this.VisitType(node.ExceptionTypeOpt); 1597var newType = VisitType(node.Type); 1627TypeSymbol type = this.VisitType(node.Type); 1666var cacheVariableType = containerAsFrame.TypeMap.SubstituteType(node.Type).Type;
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (33)
300if (!TypeSymbol.Equals(index.Type, _int32Type, TypeCompareKind.ConsiderEverything2)) 318if (!TypeSymbol.Equals(index.Type, _int32Type, TypeCompareKind.ConsiderEverything2)) 421private BoundExpression VisitBinaryOperator(BinaryOperatorKind opKind, MethodSymbol methodOpt, TypeSymbol type, BoundExpression left, BoundExpression right) 444var promotedType = PromotedType(enumOperand.Type.StrippedType().GetEnumUnderlyingType()); 482private BoundExpression VisitAndPromoteEnumOperand(BoundExpression operand, TypeSymbol promotedType, bool isChecked) 501private BoundExpression MakeBinary(MethodSymbol methodOpt, TypeSymbol type, bool isLifted, bool requiresLifted, string opName, BoundExpression loweredLeft, BoundExpression loweredRight) 505requiresLifted ? ExprFactory(opName, loweredLeft, loweredRight, _bound.Literal(isLifted && !TypeSymbol.Equals(methodOpt.ReturnType, type, TypeCompareKind.ConsiderEverything2)), _bound.MethodInfo(methodOpt)) : 509private TypeSymbol PromotedType(TypeSymbol underlying) 528private BoundExpression Demote(BoundExpression node, TypeSymbol type, bool isChecked) 538var promotedType = e.IsNullableType() ? _nullableType.Construct(PromotedType(e.GetNullableUnderlyingType())) : PromotedType(e); 539if (!TypeSymbol.Equals(promotedType, type, TypeCompareKind.ConsiderEverything2)) 548private BoundExpression ConvertIndex(BoundExpression expr, TypeSymbol oldType, TypeSymbol newType) 630var operandType = node.Operand.Type; 631var strippedOperandType = operandType.StrippedType(); 632var conversionInputType = method.Parameters[0].Type; 633var isLifted = !TypeSymbol.Equals(operandType, conversionInputType, TypeCompareKind.ConsiderEverything2) && TypeSymbol.Equals(strippedOperandType, conversionInputType, TypeCompareKind.ConsiderEverything2); 635!TypeSymbol.Equals(strippedOperandType, ((node.ConversionKind == ConversionKind.ExplicitUserDefined) ? conversionInputType : conversionInputType.StrippedType()), TypeCompareKind.ConsiderEverything2); 636var resultType = (isLifted && method.ReturnType.IsNonNullableValueType() && node.Type.IsNullableType()) ? 659var intermediate = nullable.TypeArgumentsWithAnnotationsNoUseSiteDiagnostics[0].Type; 670private BoundExpression Convert(BoundExpression operand, TypeSymbol oldType, TypeSymbol newType, bool isChecked, bool isExplicit) 672return (TypeSymbol.Equals(oldType, newType, TypeCompareKind.ConsiderEverything2) && !isExplicit) ? operand : Convert(operand, newType, isChecked); 675private BoundExpression Convert(BoundExpression expr, TypeSymbol type, bool isChecked) 680private BoundExpression DelegateCreation(BoundExpression receiver, MethodSymbol method, TypeSymbol delegateType, bool requiresInstanceReceiver) 777ImmutableArray.Create<TypeSymbol>(underlyingDelegateType), 801TypeSymbol lambdaParamType = node.LeftPlaceholder.Type; 810private BoundExpression MakeConversionLambda(Conversion conversion, TypeSymbol fromType, TypeSymbol toType) 1074var promotedType = PromotedType(arg.Type.StrippedType().GetEnumUnderlyingType()); 1093private BoundExpression ExprFactory(string name, ImmutableArray<TypeSymbol> typeArgs, params BoundExpression[] arguments)
Lowering\ClosureConversion\LambdaCapturedVariable.cs (2)
43TypeSymbol type = GetCapturedVariableFieldType(frame, captured); 96private 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)
366expr.Type is TypeSymbol type && 799private void CheckMethodGroup(BoundMethodGroup node, MethodSymbol method, bool isExtensionMethod, bool parentIsConversion, TypeSymbol convertedToType)
Lowering\DiagnosticsPass_Warnings.cs (12)
116TypeSymbol baseType = fieldAccess.FieldSymbol.ContainingType; 119if (TypeSymbol.Equals(baseType, marshalByRefType, TypeCompareKind.ConsiderEverything)) 154if ((object)interlocked != null && TypeSymbol.Equals(interlocked, method.ContainingType, TypeCompareKind.ConsiderEverything2)) 228Debug.Assert(TypeSymbol.Equals(expr1.Type, expr2.Type, TypeCompareKind.ConsiderEverything2)); 329TypeSymbol t; 350private static bool ConvertedHasEqual(BinaryOperatorKind oldOperatorKind, BoundNode node, out TypeSymbol type) 370if (parameters.Length == 2 && TypeSymbol.Equals(parameters[0].Type, t, TypeCompareKind.ConsiderEverything2) && TypeSymbol.Equals(parameters[1].Type, t, TypeCompareKind.ConsiderEverything2)) 612TypeSymbol from = conv.Operand.Type; 613TypeSymbol to = conv.Type; 851private static TypeSymbol GetTypeForLiftedComparisonWarning(BoundExpression node) 863TypeSymbol type = null;
Lowering\InitializerRewriter.cs (1)
34var submissionResultType = method.ResultType;
Lowering\Instrumentation\CodeCoverageInstrumenter.cs (1)
116TypeSymbol payloadElementType = methodBodyFactory.SpecialType(SpecialType.System_Boolean);
Lowering\Instrumentation\CompoundInstrumenter.cs (1)
213ref TypeSymbol? rewrittenType,
Lowering\Instrumentation\DebugInfoInjector.cs (1)
407ref TypeSymbol? rewrittenType,
Lowering\Instrumentation\Instrumenter.cs (1)
284ref TypeSymbol? rewrittenType,
Lowering\Instrumentation\LocalStateTracingInstrumenter.cs (10)
128private readonly TypeSymbol _contextType; 132TypeSymbol contextType, 204private MethodSymbol? GetLocalOrParameterStoreLogger(TypeSymbol variableType, Symbol targetSymbol, bool? refAssignmentSourceIsLocal, SyntaxNode syntax) 247static bool hasOverriddenToString(TypeSymbol variableType) 390if (!TryGetLocalOrParameterInfo(original.Left, out var targetSymbol, out var targetType, out var targetIndex)) 411private bool TryGetLocalOrParameterInfo(BoundNode node, [NotNullWhen(true)] out Symbol? symbol, [NotNullWhen(true)] out TypeSymbol? type, [NotNullWhen(true)] out BoundExpression? indexExpression) 440TypeSymbol targetType, 501ref TypeSymbol? rewrittenType, 524var targetType = targetSymbol.Type; 585if (!TryGetLocalOrParameterInfo(arguments[i], out var targetSymbol, out var targetType, out var targetIndex))
Lowering\IteratorRewriter\IteratorStateMachine.cs (1)
56internal override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol> basesBeingResolved)
Lowering\LocalRewriter\DelegateCacheContainer.cs (14)
18private readonly Dictionary<(TypeSymbol?, TypeSymbol, MethodSymbol), FieldSymbol> _delegateFields = new(CLRSignatureComparer.Instance); 21internal DelegateCacheContainer(TypeSymbol containingType, int generationOrdinal) 57var delegateType = boundDelegateCreation.Type; 62var constrainedToTypeOpt = ((targetMethod.IsAbstract || targetMethod.IsVirtual) && boundDelegateCreation.Argument is BoundTypeExpression typeExpression) ? typeExpression.Type : null; 69var fieldType = TypeParameters.IsEmpty ? delegateType : TypeMap.SubstituteType(delegateType).Type; 87private sealed class CLRSignatureComparer : IEqualityComparer<(TypeSymbol? constrainedToTypeOpt, TypeSymbol delegateType, MethodSymbol targetMethod)> 91public bool Equals((TypeSymbol? constrainedToTypeOpt, TypeSymbol delegateType, MethodSymbol targetMethod) x, (TypeSymbol? constrainedToTypeOpt, TypeSymbol delegateType, MethodSymbol targetMethod) y) 100public int GetHashCode((TypeSymbol? constrainedToTypeOpt, TypeSymbol delegateType, MethodSymbol targetMethod) conversion)
Lowering\LocalRewriter\DelegateCacheRewriter.cs (3)
171var delegateType = boundDelegateCreation.Type; 207private static void FindTypeParameters(TypeSymbol type, HashSet<TypeParameterSymbol> result) 220private static readonly Func<TypeSymbol, HashSet<TypeParameterSymbol>, bool, bool> s_typeParameterSymbolCollector = (typeSymbol, result, _) =>
Lowering\LocalRewriter\LocalRewriter.cs (11)
65Debug.Assert(TypeSymbol.Equals(factory.CurrentType, (containingType ?? containingMethod.ContainingType), TypeCompareKind.ConsiderEverything2)); 228TypeSymbol? type = node.Type; 511private static BoundExpression BadExpression(SyntaxNode syntax, TypeSymbol resultType, BoundExpression child) 516private static BoundExpression BadExpression(SyntaxNode syntax, TypeSymbol resultType, BoundExpression child1, BoundExpression child2) 521private static BoundExpression BadExpression(SyntaxNode syntax, TypeSymbol resultType, ImmutableArray<BoundExpression> children) 560TypeSymbol container = compilation.Assembly.GetSpecialType(type); 561TypeSymbol returnType = new ExtendedErrorTypeSymbol(compilation: compilation, name: descriptor.Name, errorInfo: null, arity: descriptor.Arity); 582var type = this.VisitType(node.Type); 599var type = this.VisitType(node.Type); 708var indexType = VisitType(node.Indices[0].Type); 712if (TypeSymbol.Equals(
Lowering\LocalRewriter\LocalRewriter.DecisionDagRewriter.cs (3)
708public CasesComparer(TypeSymbol type) 948TypeSymbol returnType = _factory.SpecialType(SpecialType.System_UInt32); 949TypeSymbol paramType = stringPatternInput switch
Lowering\LocalRewriter\LocalRewriter.PatternLocalRewriter.cs (7)
198TypeSymbol inputType = input.Type; 207TypeSymbol type = t.Type; 244TypeSymbol type = e.Property.GetMethod.ReturnType; 373TypeSymbol objectType = _factory.SpecialType(SpecialType.System_Object); 394TypeSymbol comparisonType = input.Type.EnumUnderlyingTypeOrSelf(); 411TypeSymbol comparisonType = input.Type.EnumUnderlyingTypeOrSelf(); 489var baseType = typeEvaluation2.Type;
Lowering\LocalRewriter\LocalRewriter_AsOperator.cs (2)
20TypeSymbol rewrittenType = VisitType(node.Type); 39TypeSymbol rewrittenType)
Lowering\LocalRewriter\LocalRewriter_AssignmentOperator.cs (4)
91private BoundExpression MakeAssignmentOperator(SyntaxNode syntax, BoundExpression rewrittenLeft, BoundExpression rewrittenRight, TypeSymbol type, 171TypeSymbol type, 284TypeSymbol type, 331TypeSymbol? exprType = rewrittenRight.Type;
Lowering\LocalRewriter\LocalRewriter_Await.cs (1)
22private BoundExpression RewriteAwaitExpression(SyntaxNode syntax, BoundExpression rewrittenExpression, BoundAwaitableInfo awaitableInfo, TypeSymbol type, bool used)
Lowering\LocalRewriter\LocalRewriter_BinaryOperator.cs (60)
72var type = node.Type; 177TypeSymbol type, 179TypeSymbol? constrainedToTypeOpt, 193TypeSymbol type, 195TypeSymbol? constrainedToTypeOpt, 535private BoundExpression RewriteLiftedBinaryOperator(SyntaxNode syntax, BinaryOperatorKind operatorKind, BoundExpression loweredLeft, BoundExpression loweredRight, TypeSymbol type, MethodSymbol? method, TypeSymbol? constrainedToTypeOpt) 599TypeSymbol? constrainedToTypeOpt, 600TypeSymbol type, 723private BoundExpression MakeTruthTestForDynamicLogicalOperator(SyntaxNode syntax, BoundExpression loweredLeft, TypeSymbol boolean, MethodSymbol? leftTruthOperator, TypeSymbol? constrainedToTypeOpt, bool negative) 765TypeSymbol type, 767TypeSymbol? constrainedToTypeOpt) 778Debug.Assert(TypeSymbol.Equals(method.ReturnType, type, TypeCompareKind.ConsiderEverything2)); 788TypeSymbol? constrainedToTypeOpt) 799TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean); 1001TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean); 1059TypeSymbol? constrainedToTypeOpt) 1152TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean); 1217TypeSymbol type, 1219TypeSymbol? constrainedToTypeOpt) 1257TypeSymbol type, 1259TypeSymbol? constrainedToTypeOpt) 1282TypeSymbol type) 1326TypeSymbol type, 1328TypeSymbol? constrainedToTypeOpt) 1376TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean); 1428TypeSymbol type, 1430TypeSymbol? constrainedToTypeOpt) 1533Debug.Assert(TypeSymbol.Equals(seq.Type, conditional.Type, TypeCompareKind.ConsiderEverything2)); 1534Debug.Assert(TypeSymbol.Equals(conditional.Type, conditional.Consequence.Type, TypeCompareKind.ConsiderEverything2)); 1535Debug.Assert(TypeSymbol.Equals(conditional.Type, conditional.Alternative.Type, TypeCompareKind.ConsiderEverything2)); 1562TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean); 1754TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean); 1814private MethodSymbol UnsafeGetNullableMethod(SyntaxNode syntax, TypeSymbol nullableType, SpecialMember member) 1824internal static MethodSymbol UnsafeGetNullableMethod(SyntaxNode syntax, TypeSymbol nullableType, SpecialMember member, CSharpCompilation compilation, BindingDiagnosticBag diagnostics) 1831private bool TryGetNullableMethod(SyntaxNode syntax, TypeSymbol nullableType, SpecialMember member, out MethodSymbol result) 1848TypeSymbol returnType) 1915private BoundExpression RewriteStringEquality(BoundBinaryOperator? oldNode, SyntaxNode syntax, BinaryOperatorKind operatorKind, BoundExpression loweredLeft, BoundExpression loweredRight, TypeSymbol type, SpecialMember member) 1928private BoundExpression RewriteDelegateOperation(SyntaxNode syntax, BinaryOperatorKind operatorKind, BoundExpression loweredLeft, BoundExpression loweredRight, TypeSymbol type, SpecialMember member) 1994TypeSymbol? exprType = rewrittenExpr.Type; 2003TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean); 2017TypeSymbol objectType = _compilation.GetSpecialType(SpecialType.System_Object); 2052TypeSymbol type, 2058TypeSymbol rightType = loweredRight.Type; 2114TypeSymbol type) 2125TypeSymbol leftType = loweredLeft.Type; 2130TypeSymbol rightType = loweredRight.Type; 2174TypeSymbol returnType, 2295TypeSymbol multiplicationResultType; 2296TypeSymbol convertedMultiplicationResultType; 2301TypeSymbol nativeIntType = _factory.SpecialType(SpecialType.System_IntPtr); 2315TypeSymbol longType = _factory.SpecialType(SpecialType.System_Int64); 2316TypeSymbol nativeIntType = _factory.SpecialType(SpecialType.System_IntPtr); 2328TypeSymbol longType = _factory.SpecialType(SpecialType.System_Int64); 2329TypeSymbol nativeIntType = _factory.SpecialType(SpecialType.System_IntPtr); 2340TypeSymbol ulongType = _factory.SpecialType(SpecialType.System_UInt64); 2341TypeSymbol nativeUIntType = _factory.SpecialType(SpecialType.System_UIntPtr); 2361return TypeSymbol.Equals(convertedMultiplicationResultType, multiplicationResultType, TypeCompareKind.ConsiderEverything2) 2370TypeSymbol returnType)
Lowering\LocalRewriter\LocalRewriter_Call.cs (9)
50Debug.Assert(node.ApplicableMethods.All(m => !m.RequiresInstanceReceiver && TypeSymbol.Equals(m.ContainingType, firstContainer, TypeCompareKind.ConsiderEverything2))); 187TypeSymbol type, 213TypeSymbol type, 287private BoundExpression MakeCall(SyntaxNode syntax, BoundExpression? rewrittenReceiver, MethodSymbol method, ImmutableArray<BoundExpression> rewrittenArguments, TypeSymbol type) 692var receiverType = receiverTemp.Type; 1274var paramArrayType = parameters[paramsParam].Type; 1314TypeSymbol paramArrayType, 1320TypeSymbol int32Type = compilation.GetSpecialType(SpecialType.System_Int32); 1334private static BoundExpression MakeLiteral(SyntaxNode syntax, ConstantValue constantValue, TypeSymbol type, LocalRewriter? localRewriter)
Lowering\LocalRewriter\LocalRewriter_CompoundAssignmentOperator.cs (6)
24Debug.Assert(TypeSymbol.Equals(node.Right.Type, node.Operator.RightType, TypeCompareKind.ConsiderEverything2)); 405if (TypeSymbol.Equals( 748private static bool IsInvariantArray(TypeSymbol? type) 821var type = expression.Type; 834var type = expression.Type; 930private static bool ConstantValueIsTrivial(TypeSymbol? type)
Lowering\LocalRewriter\LocalRewriter_ConditionalAccess.cs (7)
45var receiverType = loweredReceiver.Type; 123TypeSymbol type = this.VisitType(node.Type); 125TypeSymbol nodeType = node.Type; 126TypeSymbol accessExpressionType = loweredAccessExpression.Type; 133if (!TypeSymbol.Equals(accessExpressionType, nodeType, TypeCompareKind.ConsiderEverything2) && nodeType.IsNullableType()) 135Debug.Assert(TypeSymbol.Equals(accessExpressionType, nodeType.GetNullableUnderlyingType(), TypeCompareKind.ConsiderEverything2)); 140Debug.Assert(TypeSymbol.Equals(accessExpressionType, nodeType, TypeCompareKind.ConsiderEverything2) ||
Lowering\LocalRewriter\LocalRewriter_ConditionalOperator.cs (1)
48TypeSymbol rewrittenType,
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (61)
62var rewrittenType = VisitType(node.Type); 74var toType = node.Type; 89var byteType = ((NamedTypeSymbol)node.Type).TypeArgumentsWithAnnotationsNoUseSiteDiagnostics.Single().Type; 220var type = rewrittenNode.Type; 263TypeSymbol rewrittenType) 298TypeSymbol rewrittenType) 611private static bool NeedsCheckedConversionInExpressionTree(TypeSymbol? source, TypeSymbol target, bool explicitCastInCode) 620SpecialType GetUnderlyingSpecialType(TypeSymbol type) => 645private BoundExpression MakeConversionNode(BoundExpression rewrittenOperand, TypeSymbol rewrittenType, bool @checked, bool acceptFailingConversion = false, bool markAsChecked = false) 665TypeSymbol rewrittenType, 698TypeSymbol rewrittenType, 732if (!TypeSymbol.Equals(rewrittenOperand.Type, conversion.BestUserDefinedConversionAnalysis.FromType, TypeCompareKind.ConsiderEverything2)) 742if (!TypeSymbol.Equals(rewrittenOperand.Type, conversion.Method.GetParameterType(0), TypeCompareKind.ConsiderEverything2)) 751TypeSymbol userDefinedConversionRewrittenType = conversion.Method.ReturnType; 771if (!TypeSymbol.Equals(userDefined.Type, conversion.BestUserDefinedConversionAnalysis.ToType, TypeCompareKind.ConsiderEverything2)) 780if (!TypeSymbol.Equals(userDefined.Type, rewrittenType, TypeCompareKind.ConsiderEverything2)) 897TypeSymbol rewrittenType) 906TypeSymbol? rewrittenOperandType = rewrittenOperand.Type; 953TypeSymbol rewrittenType) 957TypeSymbol rewrittenOperandType = rewrittenOperand.Type; 962TypeSymbol typeFrom = rewrittenOperandType.StrippedType(); 963TypeSymbol typeTo = rewrittenType.StrippedType(); 964if (!TypeSymbol.Equals(typeFrom, typeTo, TypeCompareKind.ConsiderEverything2) && (typeFrom.SpecialType == SpecialType.System_Decimal || typeTo.SpecialType == SpecialType.System_Decimal)) 967TypeSymbol typeFromUnderlying = typeFrom; 968TypeSymbol typeToUnderlying = typeTo; 1004TypeSymbol type) 1065TypeSymbol type) 1093TypeSymbol type) 1133TypeSymbol type) 1164Debug.Assert(TypeSymbol.Equals(seq.Type, conditional.Type, TypeCompareKind.ConsiderEverything2)); 1165Debug.Assert(TypeSymbol.Equals(conditional.Type, conditional.Consequence.Type, TypeCompareKind.ConsiderEverything2)); 1166Debug.Assert(TypeSymbol.Equals(conditional.Type, conditional.Alternative.Type, TypeCompareKind.ConsiderEverything2)); 1195TypeSymbol rewrittenType) 1201var parameterType = conversion.Method.GetParameterType(0); 1223Debug.Assert(TypeSymbol.Equals(result.Type, rewrittenType, TypeCompareKind.ConsiderEverything2)); 1227private BoundExpression MakeLiftedUserDefinedConversionConsequence(BoundCall call, TypeSymbol resultType) 1231Debug.Assert(resultType.IsNullableType() && TypeSymbol.Equals(resultType.GetNullableUnderlyingType(), call.Method.ReturnType, TypeCompareKind.ConsiderEverything2)); 1244TypeSymbol rewrittenType) 1329TypeSymbol rewrittenType) 1336TypeSymbol source = rewrittenOperand.Type; 1337TypeSymbol target = rewrittenType; 1364var returnType = method.ReturnType; 1382public static SpecialMember GetIntPtrConversionMethod(TypeSymbol source, TypeSymbol target) 1387TypeSymbol t0 = target.StrippedType(); 1388TypeSymbol s0 = source.StrippedType(); 1498private static SpecialMember DecimalConversionMethod(TypeSymbol typeFrom, TypeSymbol typeTo) 1542private BoundExpression RewriteDecimalConversion(SyntaxNode syntax, BoundExpression operand, TypeSymbol fromType, TypeSymbol toType, bool @checked, bool isImplicit, ConstantValue? constantValueOpt) 1570static TypeSymbol get64BitType(CSharpCompilation compilation, bool signed) => compilation.GetSpecialType(signed ? SpecialType.System_Int64 : SpecialType.System_UInt64); 1573private BoundExpression RewriteDecimalConversionCore(SyntaxNode syntax, BoundExpression operand, TypeSymbol fromType, TypeSymbol toType, bool isImplicit, ConstantValue? constantValueOpt) 1591Debug.Assert(TypeSymbol.Equals(method.ReturnType, toType, TypeCompareKind.ConsiderEverything2)); 1599private Conversion TryMakeConversion(SyntaxNode syntax, Conversion conversion, TypeSymbol fromType, TypeSymbol toType, bool @checked) 1700private Conversion TryMakeConversion(SyntaxNode syntax, TypeSymbol fromType, TypeSymbol toType, bool @checked) 1711private 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)
91TypeSymbol eventType = eventSymbol.Type; 216TypeSymbol 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; 408TypeSymbol localType = localSymbol.Type; 410TypeSymbol? initializerType = initializerExpr.Type; 477TypeSymbol localType = localSymbol.Type; 479TypeSymbol? initializerType = initializerExpr.Type;
Lowering\LocalRewriter\LocalRewriter_ForEachStatement.cs (16)
38TypeSymbol? nodeExpressionType = collectionExpression.Type; 62private bool CanRewriteForEachAsFor(SyntaxNode forEachSyntax, TypeSymbol nodeExpressionType, [NotNullWhen(true)] out MethodSymbol? indexerGet, [NotNullWhen(true)] out MethodSymbol? lengthGet) 65var origDefinition = nodeExpressionType.OriginalDefinition; 119TypeSymbol enumeratorType = getEnumeratorInfo.Method.ReturnType; 120TypeSymbol elementType = enumeratorInfo.ElementType; 251TypeSymbol enumeratorType, 431TypeSymbol awaitExpressionType = disposeAwaitableInfoOpt.GetResult?.ReturnType ?? _compilation.DynamicType; 448private BoundExpression ConvertReceiverForInvocation(CSharpSyntaxNode syntax, BoundExpression receiver, MethodSymbol method, Conversion receiverConversion, TypeSymbol convertedReceiverType) 529TypeSymbol intType = _compilation.GetSpecialType(SpecialType.System_Int32); 530TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean); 708TypeSymbol intType = _compilation.GetSpecialType(SpecialType.System_Int32); 709TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean); 835TypeSymbol intType = _compilation.GetSpecialType(SpecialType.System_Int32); 836TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean); 1007private static BoundLocal MakeBoundLocal(CSharpSyntaxNode syntax, LocalSymbol local, TypeSymbol type) 1027private 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 (7)
113TypeSymbol type, 207if (TypeSymbol.Equals( 216Debug.Assert(TypeSymbol.Equals( 252Debug.Assert(TypeSymbol.Equals( 419Debug.Assert(TypeSymbol.Equals( 452Debug.Assert(TypeSymbol.Equals( 503Debug.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)
27TypeSymbol? argumentType = rewrittenArgument.Type; 96TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean);
Lowering\LocalRewriter\LocalRewriter_NullCoalescingOperator.cs (7)
19TypeSymbol? rewrittenResultType = VisitType(node.Type); 31TypeSymbol? rewrittenResultType) 226private BoundExpression GetConvertedLeftForNullCoalescingOperator(BoundExpression rewrittenLeft, BoundValuePlaceholder? leftPlaceholder, BoundExpression? leftConversion, TypeSymbol rewrittenResultType) 233TypeSymbol rewrittenLeftType = rewrittenLeft.Type; 243if (!TypeSymbol.Equals(rewrittenLeftType, rewrittenResultType, TypeCompareKind.ConsiderEverything2) 247TypeSymbol strippedLeftType = rewrittenLeftType.GetNullableUnderlyingType(); 250if (TypeSymbol.Equals(strippedLeftType, rewrittenResultType, TypeCompareKind.ConsiderEverything2))
Lowering\LocalRewriter\LocalRewriter_ObjectCreationExpression.cs (5)
80Debug.Assert(TypeSymbol.Equals(rewrittenObjectCreation.Type, ((NamedTypeSymbol)node.Type).ComImportCoClass, TypeCompareKind.ConsiderEverything2)); 107Debug.Assert(TypeSymbol.Equals(rewrittenObjectCreation.Type, ((NamedTypeSymbol)node.Type).ComImportCoClass, TypeCompareKind.ConsiderEverything2)); 126TypeSymbol type = withExpr.Type; 252TypeSymbol type) 334method = method.Construct(ImmutableArray.Create<TypeSymbol>(typeParameter));
Lowering\LocalRewriter\LocalRewriter_ObjectOrCollectionInitializerExpression.cs (1)
188var rewrittenType = VisitType(initializer.Type);
Lowering\LocalRewriter\LocalRewriter_PropertyAccess.cs (1)
31TypeSymbol type,
Lowering\LocalRewriter\LocalRewriter_Range.cs (1)
143TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean);
Lowering\LocalRewriter\LocalRewriter_StackAlloc.cs (6)
28var type = stackAllocNode.Type; 37var elementType = stackAllocNode.ElementType; 50else if (TypeSymbol.Equals(type.OriginalDefinition, _compilation.GetWellKnownType(WellKnownType.System_Span_T), TypeCompareKind.ConsiderEverything2)) 97private BoundExpression RewriteStackAllocCountToSize(BoundExpression countExpression, TypeSymbol elementType) 109TypeSymbol uintType = _factory.SpecialType(SpecialType.System_UInt32); 110TypeSymbol uintPtrType = _factory.SpecialType(SpecialType.System_UIntPtr);
Lowering\LocalRewriter\LocalRewriter_StringConcat.cs (2)
36private BoundExpression RewriteStringConcatenation(SyntaxNode syntax, BinaryOperatorKind operatorKind, BoundExpression loweredLeft, BoundExpression loweredRight, TypeSymbol type) 353private BoundExpression RewriteStringConcatInExpressionLambda(SyntaxNode syntax, BinaryOperatorKind operatorKind, BoundExpression loweredLeft, BoundExpression loweredRight, TypeSymbol type)
Lowering\LocalRewriter\LocalRewriter_StringInterpolation.cs (4)
44private BoundExpression MakeImplicitConversionForInterpolatedString(BoundExpression rewrittenOperand, TypeSymbol rewrittenType) 101TypeSymbol localType = trailingParameter.Type; 353var stringType = node.Type; 368private BoundExpression LowerPartsToString(InterpolatedStringHandlerData data, ImmutableArray<BoundExpression> parts, SyntaxNode syntax, TypeSymbol type)
Lowering\LocalRewriter\LocalRewriter_SwitchExpression.cs (1)
148bool implicitConversionExists(BoundExpression expression, TypeSymbol type)
Lowering\LocalRewriter\LocalRewriter_TryStatement.cs (1)
90TypeSymbol? rewrittenExceptionTypeOpt = this.VisitType(node.ExceptionTypeOpt);
Lowering\LocalRewriter\LocalRewriter_TupleBinaryOperator.cs (6)
30var boolType = node.Type; // we can re-use the bool type 69var elementType = resultTypes[i].Type; 246BoundExpression left, BoundExpression right, TypeSymbol boolType, 267TypeSymbol boolType, ArrayBuilder<LocalSymbol> temps, BinaryOperatorKind operatorKind) 485BoundExpression left, BoundExpression right, TypeSymbol type, 542BoundExpression left, BoundExpression right, TypeSymbol boolType, BinaryOperatorKind operatorKind)
Lowering\LocalRewriter\LocalRewriter_UnaryOperator.cs (25)
66TypeSymbol? constrainedToTypeOpt, 68TypeSymbol type) 78TypeSymbol? constrainedToTypeOpt, 80TypeSymbol type) 113Debug.Assert(TypeSymbol.Equals(type, method.ReturnType, TypeCompareKind.ConsiderEverything2)); 177TypeSymbol? constrainedToTypeOpt, 179TypeSymbol type) 241TypeSymbol? constrainedToTypeOpt, 243TypeSymbol type) 322Debug.Assert(TypeSymbol.Equals(seq.Type, conditional.Type, TypeCompareKind.ConsiderEverything2)); 323Debug.Assert(TypeSymbol.Equals(conditional.Type, conditional.Consequence.Type, TypeCompareKind.ConsiderEverything2)); 324Debug.Assert(TypeSymbol.Equals(conditional.Type, conditional.Alternative.Type, TypeCompareKind.ConsiderEverything2)); 348private BoundExpression GetLiftedUnaryOperatorConsequence(UnaryOperatorKind kind, SyntaxNode syntax, MethodSymbol? method, TypeSymbol? constrainedToTypeOpt, TypeSymbol type, BoundExpression nonNullOperand) 434TypeSymbol? operandType = transformedLHS.Type; //type of the variable being incremented 436Debug.Assert(TypeSymbol.Equals(operandType, node.Type, TypeCompareKind.ConsiderEverything2)); 505TypeSymbol operandType, 532TypeSymbol operandType, 633TypeSymbol type = node.MethodOpt.GetParameterType(0); 637Debug.Assert(TypeSymbol.Equals(node.MethodOpt.GetParameterType(0), node.MethodOpt.ReturnType, TypeCompareKind.ConsiderEverything2)); 713TypeSymbol unaryOperandType = GetUnaryOperatorType(node); 722(TypeSymbol binaryOperandType, ConstantValue constantOne) = GetConstantOneForIncrement(_compilation, binaryOperatorKind); 880private TypeSymbol GetUnaryOperatorType(BoundIncrementOperator node) 1001TypeSymbol? underlyingType = node.Type; 1067private static (TypeSymbol, ConstantValue) GetConstantOneForIncrement(
Lowering\LocalRewriter\LocalRewriter_UsingStatement.cs (5)
149TypeSymbol expressionType = rewrittenExpression.Type; 161TypeSymbol iDisposableType = node.AwaitOpt is null ? 217TypeSymbol localType = localSymbol.Type; 237TypeSymbol iDisposableType = awaitOpt is null ? 480TypeSymbol awaitExpressionType = awaitOpt.GetResult?.ReturnType ?? _compilation.DynamicType;
Lowering\LocalRewriter\LoweredDynamicOperation.cs (4)
24private readonly TypeSymbol _resultType; 29public LoweredDynamicOperation(SyntheticBoundNodeFactory? factory, BoundExpression? siteInitialization, BoundExpression siteInvocation, TypeSymbol resultType, ImmutableArray<LocalSymbol> temps) 42TypeSymbol resultType) 52public static LoweredDynamicOperation Bad(TypeSymbol resultType, ImmutableArray<BoundExpression> children)
Lowering\LocalRewriter\LoweredDynamicOperationFactory.cs (15)
77TypeSymbol resultType) 117TypeSymbol resultType) 155TypeSymbol resultType) 212TypeSymbol resultType; 271var resultType = AssemblySymbol.DynamicType; 304TypeSymbol resultType; 334TypeSymbol type, 620TypeSymbol resultType) 714return synthesizedContainer.Construct(synthesizedContainer.ConstructedFromTypeParameters.Cast<TypeParameterSymbol, TypeSymbol>()); 739TypeSymbol resultType) 840var argType = boundArgument.Type; 907private TypeSymbol[] MakeCallSiteDelegateSignature(TypeSymbol callSiteType, BoundExpression? receiver, ImmutableArray<BoundExpression> arguments, BoundExpression? right, TypeSymbol resultType) 910var result = new TypeSymbol[1 + (receiver != null ? 1 : 0) + arguments.Length + (right != null ? 1 : 0) + (resultType.IsVoidType() ? 0 : 1)];
Lowering\MethodToClassRewriter.cs (14)
105var newType = VisitType(local.Type); 106if (TypeSymbol.Equals(newType, local.Type, TypeCompareKind.ConsiderEverything2)) 169var newType = this.VisitType(node.Type); 210public sealed override TypeSymbol? VisitType(TypeSymbol? type) 234var rewrittenType = this.VisitType(node.Type); 503TypeSymbol rewrittenType = VisitType(node.Type); 546TypeSymbol type = this.VisitType(node.Type); 556if (!TypeSymbol.Equals(rewritten.Type, node.Type, TypeCompareKind.ConsiderEverything2) && (object)node.Constructor != null) 588TypeSymbol type = this.VisitType(node.Type); 602TypeSymbol type = this.VisitType(node.Type); 694TypeSymbol type = this.VisitType(node.Type); 695TypeSymbol receiverType = this.VisitType(node.ReceiverType); 717TypeSymbol type = this.VisitType(node.Type);
Lowering\SpillSequenceSpiller.cs (2)
653TypeSymbol exceptionTypeOpt = this.VisitType(node.ExceptionTypeOpt); 972var receiverType = receiver.Type;
Lowering\StateMachineRewriter\IteratorAndAsyncCaptureWalker.cs (2)
79var type = (variable.Kind == SymbolKind.Local) ? ((LocalSymbol)variable).Type : ((ParameterSymbol)variable).Type; 194var type = (variable.Kind == SymbolKind.Local) ? ((LocalSymbol)variable).Type : ((ParameterSymbol)variable).Type;
Lowering\StateMachineRewriter\MethodToStateMachineRewriter.cs (8)
70private Dictionary<TypeSymbol, ArrayBuilder<StateMachineFieldSymbol>>? _lazyAvailableReusableHoistedFields; 204Debug.Assert(TypeSymbol.Equals(frameClass, result.Type, TypeCompareKind.ConsiderEverything2)); 437private bool MightContainReferences(TypeSymbol type) 451private StateMachineFieldSymbol GetOrAllocateReusableHoistedField(TypeSymbol type, out bool reused, LocalSymbol local = null) 481_lazyAvailableReusableHoistedFields = new Dictionary<TypeSymbol, ArrayBuilder<StateMachineFieldSymbol>>(Symbols.SymbolEqualityComparer.IgnoringDynamicTupleNamesAndNullability); 524var type = TypeMap.SubstituteType(local.Type).Type; 526Debug.Assert(TypeSymbol.Equals(type, replacement.Type, TypeCompareKind.ConsiderEverything2)); 643TypeSymbol fieldType = expr.Type;
Lowering\StateMachineRewriter\StateMachineFieldSymbol.cs (2)
36public StateMachineFieldSymbol(NamedTypeSymbol stateMachineType, TypeSymbol type, string name, SynthesizedLocalKind synthesizedKind, int slotIndex, bool isPublic) 41public StateMachineFieldSymbol(NamedTypeSymbol stateMachineType, TypeSymbol type, string name, LocalSlotDebugInfo slotDebugInfo, int slotIndex, bool isPublic) :
Lowering\StateMachineRewriter\StateMachineRewriter.cs (2)
63Debug.Assert(TypeSymbol.Equals(F.CurrentType, method.ContainingType, TypeCompareKind.ConsiderEverything2)); 182var fieldType = typeMap.SubstituteType(local.Type).Type;
Lowering\SynthesizedMethodBaseSymbol.cs (3)
115protected virtual ImmutableArray<TypeSymbol> ExtraSynthesizedRefParameters 117get { return default(ImmutableArray<TypeSymbol>); } 148foreach (var extra in extraSynthed)
Lowering\SynthesizedSubmissionFields.cs (1)
63var hostObjectTypeSymbol = _compilation.GetHostObjectTypeSymbol();
Lowering\SyntheticBoundNodeFactory.cs (51)
104ImmutableArray<TypeSymbol> typeArgs = default(ImmutableArray<TypeSymbol>), 135internal override bool IsAccessibleHelper(Symbol symbol, TypeSymbol accessThroughType, out bool failedThroughTypeCheck, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, ConsList<TypeSymbol> basesBeingResolved) 181Debug.Assert(TopLevelMethod is null || TypeSymbol.Equals(TopLevelMethod.ContainingType, CurrentType, TypeCompareKind.ConsiderEverything2)); 190TypeSymbol.Equals(CurrentFunction.ContainingType, CurrentType, TypeCompareKind.ConsiderEverything2)); 225public StateMachineFieldSymbol StateMachineField(TypeSymbol type, string name, bool isPublic = false, bool isThis = false) 233public StateMachineFieldSymbol StateMachineField(TypeSymbol type, string name, SynthesizedLocalKind synthesizedKind, int slotIndex) 241public StateMachineFieldSymbol StateMachineField(TypeSymbol type, string name, LocalSlotDebugInfo slotDebugInfo, int slotIndex) 278public BoundBadExpression BadExpression(TypeSymbol type) 447public BoundExpression AssignmentExpression(SyntaxNode syntax, BoundExpression left, BoundExpression right, TypeSymbol type, bool isRef = false, bool hasErrors = false, bool wasCompilerGenerated = false) 550TypeSymbol type, 572TypeSymbol type, 592public ParameterSymbol SynthesizedParameter(TypeSymbol type, string name, MethodSymbol? container = null, int ordinal = 0) 597public BoundBinaryOperator Binary(BinaryOperatorKind kind, TypeSymbol type, BoundExpression left, BoundExpression right) 602public BoundAsOperator As(BoundExpression operand, TypeSymbol type) 607public BoundIsOperator Is(BoundExpression operand, TypeSymbol type) 688public BoundLiteral Literal(ConstantValue value, TypeSymbol type) 742public BoundExpression StaticCall(TypeSymbol receiver, string name, params BoundExpression[] args) 747public BoundExpression StaticCall(TypeSymbol receiver, string name, ImmutableArray<BoundExpression> args, bool allowUnexpandedForm) 752public BoundExpression StaticCall(BinderFlags flags, TypeSymbol receiver, string name, ImmutableArray<TypeSymbol> typeArgs, params BoundExpression[] args) 757public BoundExpression StaticCall(TypeSymbol receiver, MethodSymbol method, params BoundExpression[] args) 831public BoundExpression Conditional(BoundExpression condition, BoundExpression consequence, BoundExpression alternative, TypeSymbol type, bool isRef = false) 839Debug.Assert(TypeSymbol.Equals(valueTypeReceiver.Type, referenceTypeReceiver.Type, TypeCompareKind.ConsiderEverything2)); 954public BoundSequence Sequence(BoundExpression[] sideEffects, BoundExpression result, TypeSymbol? type = null) 957var resultType = type ?? result.Type; 1149public BoundExpression ThrowExpression(BoundExpression thrown, TypeSymbol type) 1154public BoundExpression Null(TypeSymbol type) 1166public static BoundExpression Null(TypeSymbol type, SyntaxNode syntax) 1175public BoundTypeExpression Type(TypeSymbol type) 1185public BoundExpression Typeof(TypeSymbol type) 1211public BoundExpression Sizeof(TypeSymbol type) 1277public BoundExpression InstrumentationPayloadRoot(int analysisKind, TypeSymbol payloadType) 1347public BoundExpression Convert(TypeSymbol type, BoundExpression arg) 1349if (TypeSymbol.Equals(type, arg.Type, TypeCompareKind.ConsiderEverything2)) 1368public BoundExpression Convert(TypeSymbol type, BoundExpression arg, Conversion conversion, bool isChecked = false) 1372if (conversion.Method is { } && !TypeSymbol.Equals(conversion.Method.Parameters[0].Type, arg.Type, TypeCompareKind.ConsiderEverything2)) 1395public BoundExpression ArrayOrEmpty(TypeSymbol elementType, BoundExpression[] elements) 1407public BoundExpression ArrayOrEmpty(TypeSymbol elementType, ImmutableArray<BoundExpression> elements) 1422public BoundExpression Array(TypeSymbol elementType, ImmutableArray<BoundExpression> elements) 1431public BoundExpression Array(TypeSymbol elementType, BoundExpression length) 1441internal BoundExpression Default(TypeSymbol type) 1446internal static BoundExpression Default(TypeSymbol type, SyntaxNode syntax) 1486internal BoundExpression NullOrDefault(TypeSymbol typeSymbol) 1491internal static BoundExpression NullOrDefault(TypeSymbol typeSymbol, SyntaxNode syntax) 1552var type = argument.Type; 1622TypeSymbol exprType = rewrittenExpr.Type; 1631TypeSymbol boolType = Compilation.GetSpecialType(CodeAnalysis.SpecialType.System_Boolean); 1645TypeSymbol objectType = SpecialType(CodeAnalysis.SpecialType.System_Object); 1680TypeSymbol returnType)
Operations\CSharpOperationFactory.cs (11)
761return CreateBoundDynamicMemberAccessOperation(implicitReceiver, typeArgumentsOpt: ImmutableArray<TypeSymbol>.Empty, memberName: "Add", 945ImmutableArray<TypeSymbol> typeArgumentsOpt, 1076if (boundOperand.Kind == BoundKind.ConvertedTupleLiteral && TypeSymbol.Equals(boundOperand.Type, boundConversion.Type, TypeCompareKind.ConsiderEverything2)) 1097!TypeSymbol.Equals(nestedConversion.Type, nestedOperand.Type, TypeCompareKind.ConsiderEverything2)) 1307private static TypeParameterSymbol? GetConstrainedToTypeForOperator(MethodSymbol? operatorMethod, TypeSymbol? constrainedToTypeOpt) 1430TypeSymbol? constrainedToTypeOpt = GetConstrainedToTypeForOperator(boundBinaryOperator.LogicalOperator, boundBinaryOperator.ConstrainedToTypeOpt) ?? 2131TypeSymbol? naturalType = boundTupleExpression switch 2403TypeSymbol inputType = boundConstantPattern.InputType; 2404TypeSymbol narrowedType = boundConstantPattern.NarrowedType; 2414TypeSymbol inputType = boundRelationalPattern.InputType; 2415TypeSymbol narrowedType = boundRelationalPattern.NarrowedType;
Operations\CSharpOperationFactory_Methods.cs (1)
33private IInstanceReferenceOperation CreateImplicitReceiver(SyntaxNode syntax, TypeSymbol type) =>
Symbols\AbstractTypeMap.cs (12)
91internal TypeWithAnnotations SubstituteType(TypeSymbol previous) 96TypeSymbol result; 144if (!TypeSymbol.Equals(modifier, substituted, TypeCompareKind.ConsiderEverything2)) 155if (!TypeSymbol.Equals(modifier, substituted, TypeCompareKind.ConsiderEverything2)) 173protected virtual TypeSymbol SubstituteDynamicType() 285internal ImmutableArray<TypeSymbol> SubstituteTypesWithoutModifiers(ImmutableArray<TypeSymbol> original) 292TypeSymbol[] result = null; 296var t = original[i]; 297var substituted = SubstituteType(t).Type; 302result = new TypeSymbol[original.Length]; 363var map = PooledDictionary<TypeSymbol, int>.GetInstance();
Symbols\AliasSymbol.cs (7)
230internal abstract NamespaceOrTypeSymbol GetAliasTarget(ConsList<TypeSymbol>? basesBeingResolved); 234var target = this.Target as TypeSymbol; 317internal override NamespaceOrTypeSymbol GetAliasTarget(ConsList<TypeSymbol>? basesBeingResolved) 378ConsList<TypeSymbol>? basesBeingResolved) 421if (namespaceOrType is TypeSymbol { IsNativeIntegerWrapperType: true } && 459internal override NamespaceOrTypeSymbol GetAliasTarget(ConsList<TypeSymbol>? basesBeingResolved)
Symbols\AnonymousTypes\AnonymousTypeField.cs (1)
34public TypeSymbol Type => TypeWithAnnotations.Type;
Symbols\AnonymousTypes\PublicSymbols\AnonymousManager.TypeOrDelegatePublicSymbol.cs (4)
150internal sealed override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol> basesBeingResolved) 254internal sealed override NamedTypeSymbol GetDeclaredBaseType(ConsList<TypeSymbol> basesBeingResolved) 259internal sealed override ImmutableArray<NamedTypeSymbol> GetDeclaredInterfaces(ConsList<TypeSymbol> basesBeingResolved) 271internal abstract override bool Equals(TypeSymbol t2, TypeCompareKind comparison);
Symbols\AnonymousTypes\PublicSymbols\AnonymousType.DelegatePublicSymbol.cs (1)
77internal override bool Equals(TypeSymbol t2, TypeCompareKind comparison)
Symbols\AnonymousTypes\PublicSymbols\AnonymousType.TypePublicSymbol.cs (1)
120internal override bool Equals(TypeSymbol t2, TypeCompareKind comparison)
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.DelegateTemplateSymbol.cs (5)
33TypeSymbol objectType, 34TypeSymbol intPtrType, 35TypeSymbol? voidReturnTypeOpt, 51static SynthesizedDelegateInvokeMethod createInvokeMethod(AnonymousDelegateTemplateSymbol containingType, RefKindVector refKinds, TypeSymbol? voidReturnTypeOpt) 227internal 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 (2)
225internal sealed override NamedTypeSymbol GetDeclaredBaseType(ConsList<TypeSymbol> basesBeingResolved) 230internal sealed override ImmutableArray<NamedTypeSymbol> GetDeclaredInterfaces(ConsList<TypeSymbol> basesBeingResolved)
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.TypeParameterSymbol.cs (1)
138internal override TypeSymbol GetDeducedBaseType(ConsList<TypeParameterSymbol> inProgress)
Symbols\ArrayTypeSymbol.cs (10)
211public TypeSymbol ElementType 340internal override bool Equals(TypeSymbol? t2, TypeCompareKind comparison) 374TypeSymbol current = this; 390internal override bool ApplyNullableTransforms(byte defaultTransformFlag, ImmutableArray<byte> transforms, ref int position, out TypeSymbol result) 405internal override TypeSymbol SetNullabilityForReferenceTypes(Func<TypeWithAnnotations, TypeWithAnnotations> transform) 410internal override TypeSymbol MergeEquivalentTypes(TypeSymbol other, VarianceKind variance) 462internal override bool GetUnificationUseSiteDiagnosticRecursive(ref DiagnosticInfo result, Symbol owner, ref HashSet<TypeSymbol> checkedTypes) 535internal override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol>? basesBeingResolved = null) 582internal sealed override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol>? basesBeingResolved = null)
Symbols\AssemblySymbol.cs (7)
572internal static TypeSymbol DynamicType 706/// Resolves <see cref="System.Type"/> to a <see cref="TypeSymbol"/> available in this assembly 711internal TypeSymbol? GetTypeByReflectionType(Type type) 722TypeSymbol? symbol = GetTypeByReflectionType(typeInfo.GetElementType()!); 734TypeSymbol? symbol = GetTypeByReflectionType(typeInfo.GetElementType()!); 838var argSymbol = GetTypeByReflectionType(typeArguments[currentTypeArgument++]); 936Debug.Assert(!TypeSymbol.Equals(candidate, result, TypeCompareKind.ConsiderEverything));
Symbols\Attributes\AttributeData.cs (5)
272internal static void DecodeMemberNotNullAttribute<T>(TypeSymbol type, ref DecodeWellKnownAttributeArguments<AttributeSyntax, CSharpAttributeData, AttributeLocation> arguments) 308private static void ReportBadNotNullMemberIfNeeded(TypeSymbol type, DecodeWellKnownAttributeArguments<AttributeSyntax, CSharpAttributeData, AttributeLocation> arguments, string memberName) 322internal static void DecodeMemberNotNullWhenAttribute<T>(TypeSymbol type, ref DecodeWellKnownAttributeArguments<AttributeSyntax, CSharpAttributeData, AttributeLocation> arguments) 389var firstArgType = (TypeSymbol?)firstArg.TypeInternal;
Symbols\Attributes\PEAttributeData.cs (1)
79TypeSymbol? attributeClass;
Symbols\Attributes\RetargetingAttributeData.cs (2)
33internal override TypeSymbol GetSystemType(Symbol targetSymbol) 39TypeSymbol systemType = underlyingAssembly.DeclaringCompilation.GetWellKnownType(WellKnownType.System_Type);
Symbols\Attributes\SourceAttributeData.cs (5)
206TypeSymbol? lazySystemType = null; 222bool matches(byte[] targetSignature, ImmutableArray<ParameterSymbol> parameters, ref TypeSymbol? lazySystemType) 248TypeSymbol parameterType = parameters[parameterIndex].Type; 406if (!TypeSymbol.Equals(parameterType, lazySystemType, TypeCompareKind.ConsiderEverything)) 435internal virtual TypeSymbol GetSystemType(Symbol targetSymbol)
Symbols\BaseTypeAnalysis.cs (3)
96var fieldType = field?.NonPointerType(); 186TypeSymbol fieldType = field.NonPointerType(); 236internal static TypeSymbol NonPointerType(this FieldSymbol field) =>
Symbols\Compilation_WellKnownMembers.cs (49)
178TypeSymbol.Equals(result, _lazyWellKnownTypes[index], TypeCompareKind.ConsiderEverything2) || (_lazyWellKnownTypes[index]!.IsErrorType() && result.IsErrorType()) 192internal bool IsAttributeType(TypeSymbol type) 203internal bool IsExceptionType(TypeSymbol type, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 208internal bool IsReadOnlySpanType(TypeSymbol type) 210return TypeSymbol.Equals(type.OriginalDefinition, GetWellKnownType(WellKnownType.System_ReadOnlySpan_T), TypeCompareKind.ConsiderEverything2); 213internal bool IsEqualOrDerivedFromWellKnownClass(TypeSymbol type, WellKnownType wellKnownType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 229return TypeSymbol.Equals((TypeSymbol)type, GetWellKnownType(WellKnownType.System_Type), TypeCompareKind.ConsiderEverything2); 242internal static Symbol? GetRuntimeMember(NamedTypeSymbol declaringType, in MemberDescriptor descriptor, SignatureComparer<MethodSymbol, FieldSymbol, PropertySymbol, TypeSymbol, ParameterSymbol> comparer, AssemblySymbol? accessWithinOpt) 248internal static Symbol? GetRuntimeMember(ImmutableArray<Symbol> members, in MemberDescriptor descriptor, SignatureComparer<MethodSymbol, FieldSymbol, PropertySymbol, TypeSymbol, ParameterSymbol> comparer, AssemblySymbol? accessWithinOpt) 672TypeSymbol debuggableAttribute = GetWellKnownType(WellKnownType.System_Diagnostics_DebuggableAttribute); 679TypeSymbol debuggingModesType = GetWellKnownType(WellKnownType.System_Diagnostics_DebuggableAttribute__DebuggingModes); 747internal SynthesizedAttributeData? SynthesizeDynamicAttribute(TypeSymbol type, int customModifiersCount, RefKind refKindOpt = RefKind.None) 767internal SynthesizedAttributeData? SynthesizeTupleNamesAttribute(TypeSymbol type) 797public static ImmutableArray<string?> Encode(TypeSymbol type) 810public static ImmutableArray<TypedConstant> Encode(TypeSymbol type, TypeSymbol stringType) 826internal static bool TryGetNames(TypeSymbol type, ArrayBuilder<string?> namesBuilder) 832private static bool AddNames(TypeSymbol type, ArrayBuilder<string?> namesBuilder) 861internal static ImmutableArray<TypedConstant> Encode(TypeSymbol type, RefKind refKind, int customModifiersCount, TypeSymbol booleanType) 873internal static ImmutableArray<bool> Encode(TypeSymbol type, RefKind refKind, int customModifiersCount) 880internal static ImmutableArray<bool> EncodeWithoutCustomModifierFlags(TypeSymbol type, RefKind refKind) 887internal static void Encode(TypeSymbol type, int customModifiersCount, RefKind refKind, ArrayBuilder<bool> transformFlagsBuilder, bool addCustomModifierFlags) 909private static bool AddFlags(TypeSymbol type, ArrayBuilder<bool> transformFlagsBuilder, bool isNestedNamedType, bool addCustomModifierFlags) 968Func<TypeSymbol, (ArrayBuilder<bool>, bool), bool, bool> visitor = 969(TypeSymbol type, (ArrayBuilder<bool> builder, bool addCustomModifierFlags) param, bool isNestedNamedType) => AddFlags(type, param.builder, isNestedNamedType, param.addCustomModifierFlags); 1013internal static void Encode(ArrayBuilder<bool> builder, TypeSymbol type) 1019private static bool AddFlags(TypeSymbol type, ArrayBuilder<bool> builder) 1033internal class SpecialMembersSignatureComparer : SignatureComparer<MethodSymbol, FieldSymbol, PropertySymbol, TypeSymbol, ParameterSymbol> 1043protected override TypeSymbol? GetMDArrayElementType(TypeSymbol type) 1057protected override TypeSymbol GetFieldType(FieldSymbol field) 1062protected override TypeSymbol GetPropertyType(PropertySymbol property) 1067protected override TypeSymbol? GetGenericTypeArgument(TypeSymbol type, int argumentIndex) 1085protected override TypeSymbol? GetGenericTypeDefinition(TypeSymbol type) 1113protected override TypeSymbol GetParamType(ParameterSymbol parameter) 1118protected override TypeSymbol? GetPointedToType(TypeSymbol type) 1123protected override TypeSymbol GetReturnType(MethodSymbol method) 1128protected override TypeSymbol? GetSZArrayElementType(TypeSymbol type) 1157protected override bool IsGenericMethodTypeParam(TypeSymbol type, int paramPosition) 1171protected override bool IsGenericTypeParam(TypeSymbol type, int paramPosition) 1185protected override bool MatchArrayRank(TypeSymbol type, int countOfDimensions) 1196protected override bool MatchTypeToTypeId(TypeSymbol type, int typeId) 1221protected override bool MatchTypeToTypeId(TypeSymbol type, int typeId)
Symbols\ConstantValueUtils.cs (1)
82TypeSymbol typeSymbol,
Symbols\ConstraintsHelper.cs (20)
115TypeSymbol deducedBaseType = effectiveBaseClass; 135TypeSymbol constraintDeducedBase; 212var underlyingType = constraintType.Type.GetNullableUnderlyingType(); 440var deducedBase = bounds.DeducedBaseType; 460this TypeSymbol type, 471this TypeSymbol type, 486public static void CheckAllConstraints(this TypeSymbol type, CheckConstraintsArgsBoxed args) 538private static readonly Func<TypeSymbol, CheckConstraintsArgsBoxed, bool, bool> s_checkConstraintsSingleTypeFunc = (type, arg, unused) => CheckConstraintsSingleType(type, in arg.Args); 540private static bool CheckConstraintsSingleType(TypeSymbol type, in CheckConstraintsArgs args) 629ConsList<TypeSymbol> basesBeingResolved) 707private static bool HasDuplicateInterfaces(NamedTypeSymbol type, ConsList<TypeSymbol> basesBeingResolved) 1123var type = typeWithAnnotations.Type; 1166var type = typeWithAnnotations.Type; 1336private static TypeParameterDiagnosticInfo GenerateConflictingConstraintsError(TypeParameterSymbol typeParameter, TypeSymbol deducedBase, bool classConflict) 1366private static ConstructorConstraintError SatisfiesConstructorConstraint(TypeSymbol typeArgument) 1437private static bool IsEncompassedBy(ConversionsBase conversions, TypeSymbol a, TypeSymbol b, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1448private static bool IsValidEncompassedByArgument(TypeSymbol type) 1508private static void CheckEffectiveAndDeducedBaseTypes(ConversionsBase conversions, TypeSymbol effectiveBase, TypeSymbol deducedBase)
Symbols\ConstructedNamedTypeSymbol.cs (2)
30internal override bool GetUnificationUseSiteDiagnosticRecursive(ref DiagnosticInfo result, Symbol owner, ref HashSet<TypeSymbol> checkedTypes) 113internal sealed override bool GetUnificationUseSiteDiagnosticRecursive(ref DiagnosticInfo result, Symbol owner, ref HashSet<TypeSymbol> checkedTypes)
Symbols\CustomModifier.cs (2)
58internal static ImmutableArray<CustomModifier> Convert(ImmutableArray<ModifierInfo<TypeSymbol>> customModifiers) 67private static CustomModifier Convert(ModifierInfo<TypeSymbol> customModifier)
Symbols\DynamicTypeEraser.cs (5)
16private readonly TypeSymbol _objectType; 18public DynamicTypeEraser(TypeSymbol objectType) 24public TypeSymbol EraseDynamic(TypeSymbol type) 29protected override TypeSymbol SubstituteDynamicType()
Symbols\DynamicTypeSymbol.cs (7)
88internal override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol>? basesBeingResolved) 183internal override bool GetUnificationUseSiteDiagnosticRecursive(ref DiagnosticInfo result, Symbol owner, ref HashSet<TypeSymbol> checkedTypes) 195internal override bool Equals(TypeSymbol? t2, TypeCompareKind comparison) 220internal override bool ApplyNullableTransforms(byte defaultTransformFlag, ImmutableArray<byte> transforms, ref int position, out TypeSymbol result) 226internal override TypeSymbol SetNullabilityForReferenceTypes(Func<TypeWithAnnotations, TypeWithAnnotations> transform) 231internal override TypeSymbol MergeEquivalentTypes(TypeSymbol other, VarianceKind variance)
Symbols\ErrorMethodSymbol.cs (4)
18private readonly TypeSymbol _containingType; 19private readonly TypeSymbol _returnType; 22public ErrorMethodSymbol(TypeSymbol containingType, TypeSymbol returnType, string name)
Symbols\ErrorPropertySymbol.cs (1)
33public ErrorPropertySymbol(Symbol containingSymbol, TypeSymbol type, string name, bool isIndexer, bool isIndexedProperty)
Symbols\ErrorTypeSymbol.cs (4)
35/// Called by <see cref="AbstractTypeMap.SubstituteType(TypeSymbol)"/> to perform substitution 438internal override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol>? basesBeingResolved) 448internal override NamedTypeSymbol? GetDeclaredBaseType(ConsList<TypeSymbol> basesBeingResolved) 453internal override ImmutableArray<NamedTypeSymbol> GetDeclaredInterfaces(ConsList<TypeSymbol> basesBeingResolved)
Symbols\ErrorTypeSymbol.ErrorTypeParameterSymbol.cs (2)
169internal override TypeSymbol? GetDeducedBaseType(ConsList<TypeParameterSymbol> inProgress) 179internal override bool Equals(TypeSymbol? t2, TypeCompareKind comparison)
Symbols\EventSymbol.cs (3)
58public TypeSymbol Type => TypeWithAnnotations.Type; 296HashSet<TypeSymbol>? unificationCheckedTypes = null; 346return TypeSymbol.Equals(this.ContainingType, other.ContainingType, compareKind) && ReferenceEquals(this.OriginalDefinition, other.OriginalDefinition);
Symbols\ExtendedErrorTypeSymbol.cs (10)
191internal override NamedTypeSymbol? GetDeclaredBaseType(ConsList<TypeSymbol> basesBeingResolved) 196internal override ImmutableArray<NamedTypeSymbol> GetDeclaredInterfaces(ConsList<TypeSymbol> basesBeingResolved) 221internal static TypeSymbol? ExtractNonErrorType(TypeSymbol? oldSymbol) 240TypeSymbol? type = oldError._candidateSymbols[0] as TypeSymbol; 249internal static TypeKind ExtractNonErrorTypeKind(TypeSymbol oldSymbol) 271TypeSymbol? type = sym as TypeSymbol; 285internal override bool Equals(TypeSymbol? t2, TypeCompareKind comparison)
Symbols\FieldSymbol.cs (2)
75public TypeSymbol Type => TypeWithAnnotations.Type; 366HashSet<TypeSymbol> unificationCheckedTypes = null;
Symbols\FunctionPointers\FunctionPointerMethodSymbol.cs (8)
23public static FunctionPointerMethodSymbol CreateFromSource(FunctionPointerTypeSyntax syntax, Binder typeBinder, BindingDiagnosticBag diagnostics, ConsList<TypeSymbol> basesBeingResolved, bool suppressUseSiteDiagnostics) 328public static FunctionPointerMethodSymbol CreateFromMetadata(ModuleSymbol containingModule, CallingConvention callingConvention, ImmutableArray<ParamInfo<TypeSymbol>> retAndParamTypes) 541private FunctionPointerMethodSymbol(CallingConvention callingConvention, ImmutableArray<ParamInfo<TypeSymbol>> retAndParamTypes, bool useUpdatedEscapeRules) 545ParamInfo<TypeSymbol> retInfo = retAndParamTypes[0]; 556static ImmutableArray<FunctionPointerParameterSymbol> makeParametersFromMetadata(ReadOnlySpan<ParamInfo<TypeSymbol>> parameterTypes, FunctionPointerMethodSymbol parent) 564ParamInfo<TypeSymbol> param = parameterTypes[i]; 579static RefKind getRefKind(ParamInfo<TypeSymbol> param, ImmutableArray<CustomModifier> paramRefCustomMods, RefKind hasInRefKind, RefKind hasOutRefKind) 784internal bool GetUnificationUseSiteDiagnosticRecursive(ref DiagnosticInfo? result, Symbol owner, ref HashSet<TypeSymbol> checkedTypes)
Symbols\FunctionPointers\FunctionPointerTypeSymbol.cs (9)
18public static FunctionPointerTypeSymbol CreateFromSource(FunctionPointerTypeSyntax syntax, Binder typeBinder, BindingDiagnosticBag diagnostics, ConsList<TypeSymbol> basesBeingResolved, bool suppressUseSiteDiagnostics) 55public static FunctionPointerTypeSymbol CreateFromMetadata(ModuleSymbol containingModule, Cci.CallingConvention callingConvention, ImmutableArray<ParamInfo<TypeSymbol>> retAndParamTypes) 97internal override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol>? basesBeingResolved = null) => ImmutableArray<NamedTypeSymbol>.Empty; 99internal override bool Equals(TypeSymbol t2, TypeCompareKind compareKind) 135internal override bool ApplyNullableTransforms(byte defaultTransformFlag, ImmutableArray<byte> transforms, ref int position, out TypeSymbol result) 155internal override bool GetUnificationUseSiteDiagnosticRecursive(ref DiagnosticInfo? result, Symbol owner, ref HashSet<TypeSymbol> checkedTypes) 160internal override TypeSymbol MergeEquivalentTypes(TypeSymbol other, VarianceKind variance) 172internal override TypeSymbol SetNullabilityForReferenceTypes(Func<TypeWithAnnotations, TypeWithAnnotations> transform)
Symbols\FunctionTypeSymbol.cs (9)
27/// A <see cref="TypeSymbol"/> implementation that represents the lazily-inferred signature of a 28/// lambda expression or method group. This is implemented as a <see cref="TypeSymbol"/> 152internal override bool ApplyNullableTransforms(byte defaultTransformFlag, ImmutableArray<byte> transforms, ref int position, out TypeSymbol result) => throw ExceptionUtilities.Unreachable(); 156internal override bool GetUnificationUseSiteDiagnosticRecursive(ref DiagnosticInfo result, Symbol owner, ref HashSet<TypeSymbol> checkedTypes) => throw ExceptionUtilities.Unreachable(); 158internal override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol>? basesBeingResolved = null) => ImmutableArray<NamedTypeSymbol>.Empty; 160internal override TypeSymbol MergeEquivalentTypes(TypeSymbol other, VarianceKind variance) 179internal override TypeSymbol SetNullabilityForReferenceTypes(Func<TypeWithAnnotations, TypeWithAnnotations> transform) 199internal override bool Equals(TypeSymbol t2, TypeCompareKind compareKind)
Symbols\LocalSymbol.cs (1)
73public TypeSymbol Type => TypeWithAnnotations.Type;
Symbols\MemberSignatureComparer.cs (7)
627private static bool HaveSameTypeConstraints(TypeParameterSymbol typeParameter1, TypeMap typeMap1, TypeParameterSymbol typeParameter2, TypeMap typeMap2, IEqualityComparer<TypeSymbol> comparer) 644var substitutedTypes1 = new HashSet<TypeSymbol>(comparer); 645var substitutedTypes2 = new HashSet<TypeSymbol>(comparer); 674private static bool AreConstraintTypesSubset(HashSet<TypeSymbol> constraintTypes1, HashSet<TypeSymbol> constraintTypes2, TypeParameterSymbol typeParameter2) 676foreach (var constraintType in constraintTypes1) 704private static void SubstituteConstraintTypes(ImmutableArray<TypeWithAnnotations> types, TypeMap typeMap, HashSet<TypeSymbol> result)
Symbols\MemberSymbolExtensions.cs (3)
228return ((TypeSymbol)m).CustomModifierCount(); 340internal static ImmutableArray<TypeSymbol> GetMemberTypeArgumentsNoUseSiteDiagnostics(this Symbol symbol) 352return ImmutableArray<TypeSymbol>.Empty;
Symbols\Metadata\PE\DynamicTypeDecoder.cs (17)
64internal static TypeSymbol TransformType( 65TypeSymbol metadataType, 86internal static TypeSymbol TransformTypeWithoutCustomModifierFlags( 87TypeSymbol type, 103private static TypeSymbol TransformTypeInternal( 104TypeSymbol metadataType, 126TypeSymbol transformedType = decoder.TransformType(metadataType); 140private TypeSymbol TransformType(TypeSymbol type) 252bool containerIsChanged = (!TypeSymbol.Equals(newContainingType, containingType, TypeCompareKind.ConsiderEverything2)); 281TypeSymbol transformedTypeArg = TransformType(typeArg.Type); 290anyTransformed |= !TypeSymbol.Equals(transformedTypeArg, typeArg.Type, TypeCompareKind.ConsiderEverything2); 312TypeSymbol transformedElementType = TransformType(arrayType.ElementType); 318return TypeSymbol.Equals(transformedElementType, arrayType.ElementType, TypeCompareKind.ConsiderEverything2) ? 335TypeSymbol transformedPointedAtType = TransformType(pointerType.PointedAtType); 341return TypeSymbol.Equals(transformedPointedAtType, pointerType.PointedAtType, TypeCompareKind.ConsiderEverything2) ? 407var transformedType = decoder.TransformType(typeWithAnnotations.Type);
Symbols\Metadata\PE\MemberRefMetadataDecoder.cs (18)
31private readonly TypeSymbol _containingType; 35TypeSymbol containingType) : 49protected override TypeSymbol GetGenericMethodTypeParamSymbol(int position) 58protected override TypeSymbol GetGenericTypeParamSymbol(int position) 150ParamInfo<TypeSymbol>[] targetParamInfo = this.DecodeSignatureParametersOrThrow(ref signaturePointer, signatureHeader, out typeParamCount); 160FieldInfo<TypeSymbol> fieldInfo = this.DecodeFieldSignature(ref signaturePointer); 174private static FieldSymbol FindFieldBySignature(TypeSymbol targetTypeSymbol, string targetMemberName, in FieldInfo<TypeSymbol> fieldInfo) 185TypeSymbol.Equals((fieldType = field.TypeWithAnnotations).Type, fieldInfo.Type, TypeCompareKind.CLRSignatureCompareOptions) && 197private static MethodSymbol FindMethodBySignature(TypeSymbol targetTypeSymbol, string targetMemberName, SignatureHeader targetMemberSignatureHeader, int targetMemberTypeParamCount, ParamInfo<TypeSymbol>[] targetParamInfo) 216private static bool MethodSymbolMatchesParamInfo(MethodSymbol candidateMethod, ParamInfo<TypeSymbol>[] targetParamInfo) 247private static bool ParametersMatch(ParameterSymbol candidateParam, TypeMap candidateMethodTypeMap, ref ParamInfo<TypeSymbol> targetParam) 261if (!TypeSymbol.Equals(substituted.Type, targetParam.Type, TypeCompareKind.CLRSignatureCompareOptions)) 275private static bool ReturnTypesMatch(MethodSymbol candidateMethod, TypeMap candidateMethodTypeMap, ref ParamInfo<TypeSymbol> targetReturnParam) 285TypeSymbol targetReturnType = targetReturnParam.Type; 289if (!TypeSymbol.Equals(substituted.Type, targetReturnType, TypeCompareKind.CLRSignatureCompareOptions)) 303private static bool CustomModifiersMatch(ImmutableArray<CustomModifier> candidateCustomModifiers, ImmutableArray<ModifierInfo<TypeSymbol>> targetCustomModifiers)
Symbols\Metadata\PE\MetadataDecoder.cs (26)
21internal class MetadataDecoder : MetadataDecoder<PEModuleSymbol, TypeSymbol, MethodSymbol, FieldSymbol, Symbol> 69protected override TypeSymbol GetGenericMethodTypeParamSymbol(int position) 86protected override TypeSymbol GetGenericTypeParamSymbol(int position) 106protected override ConcurrentDictionary<TypeDefinitionHandle, TypeSymbol> GetTypeHandleToTypeMap() 111protected override ConcurrentDictionary<TypeReferenceHandle, TypeSymbol> GetTypeRefHandleToTypeMap() 118protected override TypeSymbol LookupNestedTypeDefSymbol(TypeSymbol container, ref MetadataTypeName emittedName) 132protected override TypeSymbol LookupTopLevelTypeDefSymbol( 155protected override TypeSymbol LookupTopLevelTypeDefSymbol(string moduleName, ref MetadataTypeName emittedName, out bool isNoPiaLocalType) 187protected override TypeSymbol LookupTopLevelTypeDefSymbol(ref MetadataTypeName emittedName, out bool isNoPiaLocalType) 214public static bool IsOrClosedOverATypeFromAssemblies(TypeSymbol symbol, ImmutableArray<AssemblySymbol> assemblies) 272protected override TypeSymbol SubstituteNoPiaLocalType( 279TypeSymbol result; 284TypeSymbol baseType = null; 312ConcurrentDictionary<TypeDefinitionHandle, TypeSymbol> cache = GetTypeHandleToTypeMap(); 315TypeSymbol newresult = cache.GetOrAdd(typeDef, result); 332TypeSymbol baseType, 488protected override MethodSymbol FindMethodSymbolInType(TypeSymbol typeSymbol, MethodDefinitionHandle targetMethodDef) 515protected override FieldSymbol FindFieldSymbolInType(TypeSymbol typeSymbol, FieldDefinitionHandle fieldDef) 531internal override Symbol GetSymbolForMemberRef(MemberReferenceHandle memberRef, TypeSymbol scope = null, bool methodsOnly = false) 533TypeSymbol targetTypeSymbol = GetMemberRefTypeSymbol(memberRef); 548if (!TypeSymbol.Equals(scope, targetTypeSymbol, TypeCompareKind.ConsiderEverything2) && 576protected override void EnqueueTypeSymbolInterfacesAndBaseTypes(Queue<TypeDefinitionHandle> typeDefsToSearch, Queue<TypeSymbol> typeSymbolsToSearch, TypeSymbol typeSymbol) 586protected override void EnqueueTypeSymbol(Queue<TypeDefinitionHandle> typeDefsToSearch, Queue<TypeSymbol> typeSymbolsToSearch, TypeSymbol typeSymbol)
Symbols\Metadata\PE\NativeIntegerTypeDecoder.cs (8)
16internal static TypeSymbol TransformType(TypeSymbol type, EntityHandle handle, PEModuleSymbol containingModule, TypeSymbol? containingType) 30internal static TypeSymbol TransformType(TypeSymbol type, ImmutableArray<bool> transformFlags) 35var result = decoder.TransformType(type); 83private 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)
290Debug.Assert(TypeSymbol.Equals(eventSymbol.ContainingType, _containingType, TypeCompareKind.ConsiderEverything2)); 308FieldInfo<TypeSymbol> fieldInfo = new MetadataDecoder(moduleSymbol, _containingType).DecodeFieldSignature(_handle); 309TypeSymbol typeSymbol = fieldInfo.Type; 329TypeSymbol fixedElementType; 344private bool IsFixedBuffer(out int fixedSize, out TypeSymbol fixedElementType) 355var elementType = decoder.GetTypeSymbolForSerializedType(elementTypeName);
Symbols\Metadata\PE\PEMethodSymbol.cs (3)
776Debug.Assert(TypeSymbol.Equals(propertyOrEventSymbol.ContainingType, _containingType, TypeCompareKind.ConsiderEverything2)); 807ParamInfo<TypeSymbol>[] paramInfo = new MetadataDecoder(moduleSymbol, this).GetSignatureForMethod(_handle, out signatureHeader, out mrEx); 845var returnType = paramInfo[0].Type.AsDynamicIfNoPia(_containingType);
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); 447internal TypeSymbol TryDecodeAttributeWithTypeArgument(EntityHandle handle, AttributeDescription attributeDescription) 632if (!TypeSymbol.Equals(referencedAssemblyResult, currResult, TypeCompareKind.ConsiderEverything2))
Symbols\Metadata\PE\PENamedTypeSymbol.cs (12)
471internal override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol> basesBeingResolved = null) 486internal override NamedTypeSymbol GetDeclaredBaseType(ConsList<TypeSymbol> basesBeingResolved) 506TypeSymbol decodedType = DynamicTypeDecoder.TransformType(baseType, 0, _handle, moduleSymbol); 518internal override ImmutableArray<NamedTypeSymbol> GetDeclaredInterfaces(ConsList<TypeSymbol> basesBeingResolved) 565TypeSymbol typeSymbol = tokenDecoder.GetTypeOfToken(interfaceHandle); 1213FieldInfo<TypeSymbol> fieldInfo = decoder.DecodeFieldSignature(fieldDef); 1214TypeSymbol type = fieldInfo.Type; 1757TypeSymbol @base = GetDeclaredBaseType(skipTransformsIfNecessary: true); 1804private static ExtendedErrorTypeSymbol CyclicInheritanceError(TypeSymbol declaredBase) 2093TypeSymbol @base = GetDeclaredBaseType(null); 2319var type = this.ContainingPEModule.TryDecodeAttributeWithTypeArgument(this.Handle, AttributeDescription.CoClassAttribute); 2504internal override bool Equals(TypeSymbol t2, TypeCompareKind comparison)
Symbols\Metadata\PE\PEParameterSymbol.cs (7)
186ParamInfo<TypeSymbol> parameterInfo, 214ParamInfo<TypeSymbol> parameterInfo, 293var typeSymbol = DynamicTypeDecoder.TransformType(typeWithAnnotations.Type, countOfCustomModifiers, handle, moduleSymbol, refKind); 366ImmutableArray<ModifierInfo<TypeSymbol>> refCustomModifiers, 367TypeSymbol type, 370ImmutableArray<ModifierInfo<TypeSymbol>> customModifiers, 411ImmutableArray<ModifierInfo<TypeSymbol>> refCustomModifiers,
Symbols\Metadata\PE\PEPropertySymbol.cs (9)
161ParamInfo<TypeSymbol>[] propertyParams, 227TypeSymbol originalPropertyType = returnInfo.Type; 273static bool anyUnexpectedRequiredModifiers(ParamInfo<TypeSymbol>[] propertyParams) 716ParamInfo<TypeSymbol>[] propertyParams, 718ParamInfo<TypeSymbol>[] getMethodParams, 720ParamInfo<TypeSymbol>[] setMethodParams) 767ParamInfo<TypeSymbol>[] propertyParams, 768ParamInfo<TypeSymbol>[] accessorParams, 896ParamInfo<TypeSymbol>[] propertyParams,
Symbols\Metadata\PE\PETypeParameterSymbol.cs (4)
267var typeSymbol = tokenDecoder.DecodeGenericParameterConstraint(constraint.Type, out ImmutableArray<ModifierInfo<TypeSymbol>> modifiers); 278ModifierInfo<TypeSymbol> m = modifiers.Single(); 625internal 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 (9)
243public TypeSymbol ReturnType => ReturnTypeWithAnnotations.Type; 741public MethodSymbol ReduceExtensionMethod(TypeSymbol receiverType, CSharpCompilation compilation) 805public virtual TypeSymbol ReceiverType 821public virtual TypeSymbol GetTypeInferredDuringReduction(TypeParameterSymbol reducedFromTypeParameter) 831public MethodSymbol Construct(params TypeSymbol[] typeArguments) 842public MethodSymbol Construct(ImmutableArray<TypeSymbol> typeArguments) 896internal TypeSymbol GetParameterType(int index) => ParameterTypesWithAnnotations[index].Type; 960HashSet<TypeSymbol> unificationCheckedTypes = null; 1187return Construct((TypeSymbol[])typeArguments);
Symbols\MissingMetadataTypeSymbol.cs (2)
365internal override bool Equals(TypeSymbol t2, TypeCompareKind comparison) 454internal override bool Equals(TypeSymbol t2, TypeCompareKind comparison)
Symbols\MissingModuleSymbol.cs (1)
173internal override bool GetUnificationUseSiteDiagnostic(ref DiagnosticInfo result, TypeSymbol dependentType)
Symbols\ModuleSymbol.cs (1)
298internal abstract bool GetUnificationUseSiteDiagnostic(ref DiagnosticInfo result, TypeSymbol dependentType);
Symbols\NamedTypeSymbol.cs (17)
776internal abstract NamedTypeSymbol GetDeclaredBaseType(ConsList<TypeSymbol> basesBeingResolved); 778internal abstract ImmutableArray<NamedTypeSymbol> GetDeclaredInterfaces(ConsList<TypeSymbol> basesBeingResolved); 797internal override bool Equals(TypeSymbol t2, TypeCompareKind comparison) 933internal override bool ApplyNullableTransforms(byte defaultTransformFlag, ImmutableArray<byte> transforms, ref int position, out TypeSymbol result) 967internal override TypeSymbol SetNullabilityForReferenceTypes(Func<TypeWithAnnotations, TypeWithAnnotations> transform) 1001internal override TypeSymbol MergeEquivalentTypes(TypeSymbol other, VarianceKind variance) 1113public NamedTypeSymbol Construct(params TypeSymbol[] typeArguments) 1124public NamedTypeSymbol Construct(ImmutableArray<TypeSymbol> typeArguments) 1134public NamedTypeSymbol Construct(IEnumerable<TypeSymbol> typeArguments) 1172private NamedTypeSymbol ConstructWithoutModifiers(ImmutableArray<TypeSymbol> typeArguments, bool unbound) 1271internal void GetAllTypeArguments(ref TemporaryArray<TypeSymbol> builder, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1340protected sealed override TypeSymbol OriginalTypeSymbolDefinition 1420HashSet<TypeSymbol> unificationCheckedTypes = null; 1447internal override bool GetUnificationUseSiteDiagnosticRecursive(ref DiagnosticInfo result, Symbol owner, ref HashSet<TypeSymbol> checkedTypes) 1622/// Requires less computation than <see cref="TypeSymbol.TypeKind"/> == <see cref="TypeKind.Interface"/>. 1656TypeSymbol typeToCheck = this;
Symbols\NamespaceSymbol.cs (1)
227var types = this.GetTypeMembers(TypeSymbol.ImplicitTypeName);
Symbols\NativeIntegerTypeSymbol.cs (5)
148internal override NamedTypeSymbol GetDeclaredBaseType(ConsList<TypeSymbol> basesBeingResolved) => _underlyingType.GetDeclaredBaseType(basesBeingResolved); 150internal override ImmutableArray<NamedTypeSymbol> GetDeclaredInterfaces(ConsList<TypeSymbol> basesBeingResolved) => GetInterfaces(basesBeingResolved); 160internal override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol>? basesBeingResolved = null) => GetInterfaces(basesBeingResolved); 186internal override bool Equals(TypeSymbol? other, TypeCompareKind comparison) 215private ImmutableArray<NamedTypeSymbol> GetInterfaces(ConsList<TypeSymbol>? basesBeingResolved)
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)
91internal override bool Equals(TypeSymbol t2, TypeCompareKind comparison)
Symbols\NoPiaIllegalGenericInstantiationSymbol.cs (1)
77internal override bool Equals(TypeSymbol t2, TypeCompareKind comparison)
Symbols\NoPiaMissingCanonicalTypeSymbol.cs (1)
115internal 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. 61internal override bool Equals(TypeSymbol t2, TypeCompareKind comparison)
Symbols\PointerTypeSymbol.cs (9)
76public TypeSymbol PointedAtType => PointedAtTypeWithAnnotations.Type; 87internal override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol>? basesBeingResolved) 218TypeSymbol current = this; 228internal override bool Equals(TypeSymbol? t2, TypeCompareKind comparison) 253internal override bool ApplyNullableTransforms(byte defaultTransformFlag, ImmutableArray<byte> transforms, ref int position, out TypeSymbol result) 268internal override TypeSymbol SetNullabilityForReferenceTypes(Func<TypeWithAnnotations, TypeWithAnnotations> transform) 273internal override TypeSymbol MergeEquivalentTypes(TypeSymbol other, VarianceKind variance) 294internal override bool GetUnificationUseSiteDiagnosticRecursive(ref DiagnosticInfo result, Symbol owner, ref HashSet<TypeSymbol> checkedTypes)
Symbols\PropertySymbol.cs (3)
90public TypeSymbol Type => TypeWithAnnotations.Type; 388HashSet<TypeSymbol> unificationCheckedTypes = null; 448return TypeSymbol.Equals(this.ContainingType, other.ContainingType, compareKind) && ReferenceEquals(this.OriginalDefinition, other.OriginalDefinition);
Symbols\PublicModel\ArrayTypeSymbol.cs (1)
32internal override Symbols.TypeSymbol UnderlyingTypeSymbol => _underlying;
Symbols\PublicModel\DynamicTypeSymbol.cs (1)
29internal override Symbols.TypeSymbol UnderlyingTypeSymbol => _underlying;
Symbols\PublicModel\ErrorTypeSymbol.cs (1)
31internal override Symbols.TypeSymbol UnderlyingTypeSymbol => _underlying;
Symbols\PublicModel\FunctionPointerTypeSymbol.cs (1)
22internal override Symbols.TypeSymbol UnderlyingTypeSymbol => _underlying;
Symbols\PublicModel\NonErrorNamedTypeSymbol.cs (1)
32internal override Symbols.TypeSymbol UnderlyingTypeSymbol => _underlying;
Symbols\PublicModel\PointerTypeSymbol.cs (1)
32internal override Symbols.TypeSymbol UnderlyingTypeSymbol => _underlying;
Symbols\PublicModel\Symbol.cs (2)
24var type = typeArg.EnsureCSharpSymbolOrNull(nameof(typeArguments)); 47var type = typeArguments[i].EnsureCSharpSymbolOrNull(nameof(typeArguments));
Symbols\PublicModel\TypeParameterSymbol.cs (1)
30internal override Symbols.TypeSymbol UnderlyingTypeSymbol => _underlying;
Symbols\PublicModel\TypeSymbol.cs (1)
23internal abstract Symbols.TypeSymbol UnderlyingTypeSymbol { get; }
Symbols\ReducedExtensionMethodSymbol.cs (4)
37public static MethodSymbol Create(MethodSymbol method, TypeSymbol receiverType, CSharpCompilation compilation) 112private static MethodSymbol InferExtensionMethodTypeArguments(MethodSymbol method, TypeSymbol thisType, CSharpCompilation compilation, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 238public override TypeSymbol ReceiverType 249public override TypeSymbol GetTypeInferredDuringReduction(TypeParameterSymbol reducedFromTypeParameter)
Symbols\Retargeting\RetargetingNamedTypeSymbol.cs (4)
272private static ExtendedErrorTypeSymbol CyclicInheritanceError(TypeSymbol declaredBase) 308internal override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol> basesBeingResolved) 333internal override NamedTypeSymbol GetDeclaredBaseType(ConsList<TypeSymbol> basesBeingResolved) 345internal override ImmutableArray<NamedTypeSymbol> GetDeclaredInterfaces(ConsList<TypeSymbol> basesBeingResolved)
Symbols\Retargeting\RetargetingPropertySymbol.cs (1)
70if (type.Type.TryAsDynamicIfNoPia(this.ContainingType, out TypeSymbol asDynamic))
Symbols\Retargeting\RetargetingSymbolTranslator.cs (20)
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) 855public ImmutableArray<TypeSymbol> Retarget(ImmutableArray<TypeSymbol> sequence) 857var result = ArrayBuilder<TypeSymbol>.GetInstance(sequence.Length); 859foreach (var ts in sequence) 1146if (TypeSymbol.Equals(retargetedEvent.Type, targetType.Type, TypeCompareKind.ConsiderEverything2)) 1260TypeSymbol oldConstantType = (TypeSymbol)oldConstant.TypeInternal; 1261TypeSymbol newConstantType = (object)oldConstantType == null ? 1268if (!TypeSymbol.Equals(newConstantType, oldConstantType, TypeCompareKind.ConsiderEverything2) || newArray != oldConstant.Values) 1283newConstantValue = Retarget((TypeSymbol)oldConstantValue, RetargetOptions.RetargetPrimitiveTypesByTypeCode); 1290if (!TypeSymbol.Equals(newConstantType, oldConstantType, TypeCompareKind.ConsiderEverything2) || newConstantValue != oldConstantValue)
Symbols\Retargeting\RetargetingTypeParameterSymbol.cs (1)
107internal override TypeSymbol GetDeducedBaseType(ConsList<TypeParameterSymbol> inProgress)
Symbols\SignatureOnlyMethodSymbol.cs (2)
22private readonly TypeSymbol _containingType; 36TypeSymbol containingType,
Symbols\SignatureOnlyParameterSymbol.cs (1)
113TypeSymbol.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) 208internal override TypeSymbol GetDeducedBaseType(ConsList<TypeParameterSymbol> inProgress)
Symbols\Source\CustomModifierUtils.cs (6)
48TypeSymbol returnTypeSymbol = returnType.Type; 56TypeSymbol returnTypeWithCustomModifiers = sourceMethodReturnType.Type; 69internal static TypeSymbol CopyTypeCustomModifiers(TypeSymbol sourceType, TypeSymbol destinationType, AssemblySymbol containingAssembly) 79TypeSymbol resultType = DynamicTypeDecoder.TransformTypeWithoutCustomModifierFlags(sourceType, containingAssembly, refKind, flags);
Symbols\Source\ExplicitInterfaceHelpers.cs (7)
27TypeSymbol discardedExplicitInterfaceType; 39out TypeSymbol explicitInterfaceTypeOpt, 59public static string GetMemberName(string name, TypeSymbol explicitInterfaceTypeOpt, string aliasQualifierOpt) 147TypeSymbol explicitInterfaceType, 157TypeSymbol explicitInterfaceType, 167TypeSymbol explicitInterfaceType, 178TypeSymbol explicitInterfaceType,
Symbols\Source\GlobalExpressionVariable.cs (2)
128var originalType = _lazyType?.Value.DefaultType; 135TypeSymbol.Equals(originalType, type.Type, TypeCompareKind.ConsiderEverything2));
Symbols\Source\ImplicitNamedTypeSymbol.cs (3)
66internal override NamedTypeSymbol GetDeclaredBaseType(ConsList<TypeSymbol> basesBeingResolved) 71internal override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol> basesBeingResolved) 76internal override ImmutableArray<NamedTypeSymbol> GetDeclaredInterfaces(ConsList<TypeSymbol> basesBeingResolved)
Symbols\Source\IndexedTypeParameterSymbol.cs (2)
125internal override bool Equals(TypeSymbol t2, TypeCompareKind comparison) 222internal override TypeSymbol GetDeducedBaseType(ConsList<TypeParameterSymbol> inProgress)
Symbols\Source\LambdaSymbol.cs (3)
32internal static readonly TypeSymbol ReturnTypeIsBeingInferred = new UnsupportedMetadataTypeSymbol(); 37internal static readonly TypeSymbol InferenceFailureReturnType = new UnsupportedMetadataTypeSymbol(); 378&& TypeSymbol.Equals(lambda.ReturnType, this.ReturnType, compareKind)
Symbols\Source\LocalFunctionOrSourceMemberMethodSymbol.cs (1)
38Debug.Assert(TypeSymbol.Equals(_lazyIteratorElementType.Value.Type, elementType.Type, TypeCompareKind.ConsiderEverything));
Symbols\Source\ParameterHelpers.cs (1)
708TypeSymbol parameterType = parameter.Type;
Symbols\Source\SourceAssemblySymbol.cs (11)
110internal ConcurrentSet<TypeSymbol> TypesReferencedInExternalMethods = new ConcurrentSet<TypeSymbol>(); 646TypeSymbol compilationRelaxationsAttribute = compilation.GetWellKnownType(WellKnownType.System_Runtime_CompilerServices_CompilationRelaxationsAttribute); 655TypeSymbol runtimeCompatibilityAttribute = compilation.GetWellKnownType(WellKnownType.System_Runtime_CompilerServices_RuntimeCompatibilityAttribute); 688TypeSymbol unverifiableCodeAttribute = compilation.GetWellKnownType(WellKnownType.System_Security_UnverifiableCodeAttribute); 700TypeSymbol securityPermissionAttribute = compilation.GetWellKnownType(WellKnownType.System_Security_Permissions_SecurityPermissionAttribute); 707TypeSymbol securityAction = compilation.GetWellKnownType(WellKnownType.System_Security_Permissions_SecurityAction); 1230if (uniqueAttributes == null || !uniqueAttributes.Contains((a) => TypeSymbol.Equals(a.AttributeClass, attributeClass, TypeCompareKind.ConsiderEverything2))) 2182TypeSymbol forwardedType = (TypeSymbol)arguments.Attribute.CommonConstructorArguments[0].ValueInternal; 2733private static string DefaultValue(TypeSymbol type)
Symbols\Source\SourceComplexParameterSymbol.cs (5)
997else if (!compilation.Conversions.ClassifyConversionFromType((TypeSymbol)arg.TypeInternal, this.Type, isChecked: false, ref useSiteInfo).Kind.IsImplicitConversion()) 1062TypeSymbol intType = compilation.GetSpecialType(SpecialType.System_Int32); 1090TypeSymbol stringType = compilation.GetSpecialType(SpecialType.System_String); 1123TypeSymbol stringType = compilation.GetSpecialType(SpecialType.System_String); 1164TypeSymbol stringType = compilation.GetSpecialType(SpecialType.System_String);
Symbols\Source\SourceCustomEventSymbol.cs (2)
23private readonly TypeSymbol _explicitInterfaceType; 228TypeSymbol.CheckNullableReferenceTypeAndScopedMismatchOnImplementingMember(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)
112TypeSymbol eventTokenType = compilation.GetWellKnownType(WellKnownType.System_Runtime_InteropServices_WindowsRuntime_EventRegistrationToken); 131TypeSymbol voidType = compilation.GetSpecialType(SpecialType.System_Void); 145TypeSymbol voidType = compilation.GetSpecialType(SpecialType.System_Void);
Symbols\Source\SourceEventSymbol.cs (1)
619TypeSymbol overriddenEventType = eventWithCustomModifiers.Type;
Symbols\Source\SourceFixedFieldSymbol.cs (3)
89TypeSymbol intType = binder.GetSpecialType(SpecialType.System_Int32, diagnostics, sizeExpression); 109TypeSymbol elementType = ((PointerTypeSymbol)this.Type).PointedAtType; 183var elementType = ((PointerTypeSymbol)_field.Type).PointedAtType;
Symbols\Source\SourceLocalSymbol.cs (1)
565var type = this.Type;
Symbols\Source\SourceMemberContainerSymbol.cs (8)
1048Debug.Assert(!nonTypeMembers.Any(static s => s is TypeSymbol)); 1801static bool needsTupleElementNamesAttribute(TypeSymbol type) 1808var resultType = type.VisitType( 2292var type = field.NonPointerType(); 2329if (member is TypeSymbol) 2592return (!TypeSymbol.Equals(oldInstance, t, TypeCompareKind.AllNullableIgnoreOptions)) && ReferenceEquals(tOriginal, top); 2832Debug.Assert(!nonTypeMembers.Any(static s => s is TypeSymbol)); 3688var 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)) 1191internal static bool IsOrContainsErrorType(TypeSymbol typeSymbol) 1346TypeSymbol sourceType, 1347TypeSymbol targetType) 1717TypeSymbol.Equals(interface1.OriginalDefinition, interface2.OriginalDefinition, TypeCompareKind.ConsiderEverything2) &&
Symbols\Source\SourceMemberFieldSymbol.cs (2)
47protected void TypeChecks(TypeSymbol type, BindingDiagnosticBag diagnostics) 569var elementType = ((PointerTypeSymbol)type.Type).PointedAtType;
Symbols\Source\SourceMethodSymbolWithAttributes.cs (2)
960static void checkAndReportManagedTypes(TypeSymbol type, RefKind refKind, SyntaxNode syntax, bool isParam, BindingDiagnosticBag diagnostics) 1162var returnType = methodSymbol.ReturnType;
Symbols\Source\SourceNamedTypeSymbol.cs (3)
72TypeSymbol bt = baseBinder.BindType(t, BindingDiagnosticBag.Discarded).Type; 74if (TypeSymbol.Equals(bt, @base, TypeCompareKind.ConsiderEverything2)) 1655internal override bool Equals(TypeSymbol t2, TypeCompareKind comparison)
Symbols\Source\SourceNamedTypeSymbol_Bases.cs (12)
65internal sealed override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol> basesBeingResolved) 225var curBaseSym = baseBinder.BindType(b, BindingDiagnosticBag.Discarded).Type; 254internal Tuple<NamedTypeSymbol, ImmutableArray<NamedTypeSymbol>> GetDeclaredBases(ConsList<TypeSymbol> basesBeingResolved) 269internal override NamedTypeSymbol GetDeclaredBaseType(ConsList<TypeSymbol> basesBeingResolved) 274internal override ImmutableArray<NamedTypeSymbol> GetDeclaredInterfaces(ConsList<TypeSymbol> basesBeingResolved) 279private Tuple<NamedTypeSymbol, ImmutableArray<NamedTypeSymbol>> MakeDeclaredBases(ConsList<TypeSymbol> basesBeingResolved, BindingDiagnosticBag diagnostics) 318else if ((object)partBase != null && !TypeSymbol.Equals(partBase, baseType, TypeCompareKind.ConsiderEverything) && partBase.TypeKind != TypeKind.Error) 346static bool containsOnlyOblivious(TypeSymbol type) 437private Tuple<NamedTypeSymbol, ImmutableArray<NamedTypeSymbol>> MakeOneDeclaredBases(ConsList<TypeSymbol> newBasesBeingResolved, SingleTypeDeclaration decl, BindingDiagnosticBag diagnostics) 466TypeSymbol baseType; 630void checkPrimaryConstructorBaseType(BaseTypeSyntax baseTypeSyntax, TypeSymbol baseType) 658private ImmutableArray<NamedTypeSymbol> MakeAcyclicInterfaces(ConsList<TypeSymbol> basesBeingResolved, BindingDiagnosticBag diagnostics)
Symbols\Source\SourceNamedTypeSymbol_Enum.cs (1)
62var type = baseBinder.BindType(typeSyntax, diagnostics).Type;
Symbols\Source\SourceNamespaceSymbol.AliasesAndUsings.cs (21)
20public Imports GetImports(CSharpSyntaxNode declarationSyntax, ConsList<TypeSymbol>? basesBeingResolved) 132public ImmutableArray<AliasAndUsingDirective> GetUsingAliases(CSharpSyntaxNode declarationSyntax, ConsList<TypeSymbol>? basesBeingResolved) 163public ImmutableDictionary<string, AliasAndUsingDirective> GetUsingAliasesMap(CSharpSyntaxNode declarationSyntax, ConsList<TypeSymbol>? basesBeingResolved) 195public ImmutableArray<NamespaceOrTypeAndUsingDirective> GetUsingNamespacesOrTypes(CSharpSyntaxNode declarationSyntax, ConsList<TypeSymbol>? basesBeingResolved) 227private Imports GetGlobalUsingImports(ConsList<TypeSymbol>? basesBeingResolved) 232private ImmutableDictionary<string, AliasAndUsingDirective> GetGlobalUsingAliasesMap(ConsList<TypeSymbol>? basesBeingResolved) 237private ImmutableArray<NamespaceOrTypeAndUsingDirective> GetGlobalUsingNamespacesOrTypes(ConsList<TypeSymbol>? basesBeingResolved) 242private MergedGlobalAliasesAndUsings GetMergedGlobalAliasesAndUsings(ConsList<TypeSymbol>? basesBeingResolved, CancellationToken cancellationToken = default) 499internal ImmutableArray<AliasAndUsingDirective> GetUsingAliases(SourceNamespaceSymbol declaringSymbol, CSharpSyntaxNode declarationSyntax, ConsList<TypeSymbol>? basesBeingResolved) 504internal ImmutableArray<AliasAndUsingDirective> GetGlobalUsingAliases(SourceNamespaceSymbol declaringSymbol, CSharpSyntaxNode declarationSyntax, ConsList<TypeSymbol>? basesBeingResolved) 509internal ImmutableDictionary<string, AliasAndUsingDirective> GetUsingAliasesMap(SourceNamespaceSymbol declaringSymbol, CSharpSyntaxNode declarationSyntax, ConsList<TypeSymbol>? basesBeingResolved) 514internal ImmutableDictionary<string, AliasAndUsingDirective> GetGlobalUsingAliasesMap(SourceNamespaceSymbol declaringSymbol, SyntaxReference declarationSyntax, ConsList<TypeSymbol>? basesBeingResolved) 519internal ImmutableArray<NamespaceOrTypeAndUsingDirective> GetUsingNamespacesOrTypes(SourceNamespaceSymbol declaringSymbol, CSharpSyntaxNode declarationSyntax, ConsList<TypeSymbol>? basesBeingResolved) 524private UsingsAndDiagnostics GetUsingsAndDiagnostics(SourceNamespaceSymbol declaringSymbol, CSharpSyntaxNode declarationSyntax, ConsList<TypeSymbol>? basesBeingResolved) 529internal ImmutableArray<NamespaceOrTypeAndUsingDirective> GetGlobalUsingNamespacesOrTypes(SourceNamespaceSymbol declaringSymbol, SyntaxReference declarationSyntax, ConsList<TypeSymbol>? basesBeingResolved) 534private UsingsAndDiagnostics GetGlobalUsingsAndDiagnostics(SourceNamespaceSymbol declaringSymbol, CSharpSyntaxNode declarationSyntax, ConsList<TypeSymbol>? basesBeingResolved) 539private UsingsAndDiagnostics GetUsingsAndDiagnostics(ref UsingsAndDiagnostics? usings, SourceNamespaceSymbol declaringSymbol, CSharpSyntaxNode declarationSyntax, ConsList<TypeSymbol>? basesBeingResolved, bool onlyGlobal) 609ConsList<TypeSymbol>? basesBeingResolved) 850internal Imports GetImports(SourceNamespaceSymbol declaringSymbol, CSharpSyntaxNode declarationSyntax, ConsList<TypeSymbol>? basesBeingResolved) 971var typeSymbol = (TypeSymbol)target;
Symbols\Source\SourceOrdinaryMethodOrUserDefinedOperatorSymbol.cs (2)
146TypeSymbol.CheckNullableReferenceTypeAndScopedMismatchOnImplementingMember(this.ContainingType, this, overriddenOrExplicitlyImplementedMethod, isExplicit: true, diagnostics); 164protected abstract TypeSymbol? ExplicitInterfaceType { get; }
Symbols\Source\SourceOrdinaryMethodSymbol.cs (4)
22private readonly TypeSymbol _explicitInterfaceType; 59TypeSymbol explicitInterfaceType; 72TypeSymbol explicitInterfaceType, 286protected override TypeSymbol ExplicitInterfaceType => _explicitInterfaceType;
Symbols\Source\SourceParameterSymbol.cs (2)
123internal override ParameterSymbol WithCustomModifiersAndParams(TypeSymbol newType, ImmutableArray<CustomModifier> newCustomModifiers, ImmutableArray<CustomModifier> newRefCustomModifiers, bool newIsParams) 128internal SourceParameterSymbol WithCustomModifiersAndParamsCore(TypeSymbol newType, ImmutableArray<CustomModifier> newCustomModifiers, ImmutableArray<CustomModifier> newRefCustomModifiers, bool newIsParams)
Symbols\Source\SourceParameterSymbolBase.cs (1)
123internal 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)
63TypeSymbol? explicitInterfaceType; 90TypeSymbol? explicitInterfaceType,
Symbols\Source\SourcePropertySymbolBase.cs (5)
49private readonly TypeSymbol _explicitInterfaceType; 77TypeSymbol? explicitInterfaceType, 810TypeSymbol.CheckNullableReferenceTypeAndScopedMismatchOnImplementingMember(this.ContainingType, this, explicitlyImplementedProperty, isExplicit: true, diagnostics); 955else if (TypeSymbol.HaveInitOnlyMismatch(thisAccessor, otherAccessor)) 1525var type = this.Type;
Symbols\Source\SourceTypeParameterSymbol.cs (1)
109internal override TypeSymbol GetDeducedBaseType(ConsList<TypeParameterSymbol> inProgress)
Symbols\Source\SourceUserDefinedConversionSymbol.cs (2)
39TypeSymbol explicitInterfaceType; 56TypeSymbol explicitInterfaceType,
Symbols\Source\SourceUserDefinedOperatorSymbol.cs (2)
44TypeSymbol explicitInterfaceType; 61TypeSymbol explicitInterfaceType,
Symbols\Source\SourceUserDefinedOperatorSymbolBase.cs (14)
22private readonly TypeSymbol? _explicitInterfaceType; 27TypeSymbol explicitInterfaceType, 323protected sealed override TypeSymbol? ExplicitInterfaceType => _explicitInterfaceType; 440var source = this.GetParameterType(0); 441var target = this.ReturnType; 442var source0 = source.StrippedType(); 443var target0 = target.StrippedType(); 550TypeSymbol same; 551TypeSymbol different; 667var parameterType = this.GetParameterType(0); 688private bool MatchesContainingType(TypeSymbol type) 693private bool IsContainingType(TypeSymbol type) 698public static bool IsSelfConstrainedTypeParameter(TypeSymbol type, NamedTypeSymbol containingType) 707private bool IsSelfConstrainedTypeParameter(TypeSymbol type)
Symbols\Source\ThisParameterSymbol.cs (2)
15private readonly TypeSymbol _containingType; 21internal ThisParameterSymbol(MethodSymbol? forMethod, TypeSymbol containingType)
Symbols\Source\TypeParameterConstraintClause.cs (2)
170TypeSymbol type = constraintType.IsResolved ? constraintType.Type : constraintType.DefaultType; 230TypeSymbol 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 (5)
43Debug.Assert(TypeSymbol.Equals(originalDefinition.ContainingType, containingSymbol.OriginalDefinition, TypeCompareKind.ConsiderEverything2)); 158public override TypeSymbol ReceiverType 172public override TypeSymbol GetTypeInferredDuringReduction(TypeParameterSymbol reducedFromTypeParameter) 175var notUsed = OriginalDefinition.GetTypeInferredDuringReduction(reducedFromTypeParameter); 437if (!TypeSymbol.Equals(this.ContainingType, other.ContainingType, compareKind)) return false;
Symbols\SubstitutedNamedTypeSymbol.cs (4)
140internal sealed override NamedTypeSymbol GetDeclaredBaseType(ConsList<TypeSymbol> basesBeingResolved) 145internal sealed override ImmutableArray<NamedTypeSymbol> GetDeclaredInterfaces(ConsList<TypeSymbol> basesBeingResolved) 153internal sealed override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol> basesBeingResolved) 163internal abstract override bool GetUnificationUseSiteDiagnosticRecursive(ref DiagnosticInfo result, Symbol owner, ref HashSet<TypeSymbol> checkedTypes);
Symbols\SubstitutedTypeParameterSymbol.cs (1)
180internal override TypeSymbol GetDeducedBaseType(ConsList<TypeParameterSymbol> inProgress)
Symbols\Symbol.cs (7)
1059internal bool DeriveUseSiteInfoFromType(ref UseSiteInfo<AssemblySymbol> result, TypeSymbol type) 1191internal static bool GetUnificationUseSiteDiagnosticRecursive<T>(ref DiagnosticInfo result, ImmutableArray<T> types, Symbol owner, ref HashSet<TypeSymbol> checkedTypes) where T : TypeSymbol 1204internal static bool GetUnificationUseSiteDiagnosticRecursive(ref DiagnosticInfo result, ImmutableArray<TypeWithAnnotations> types, Symbol owner, ref HashSet<TypeSymbol> checkedTypes) 1217internal static bool GetUnificationUseSiteDiagnosticRecursive(ref DiagnosticInfo result, ImmutableArray<CustomModifier> modifiers, Symbol owner, ref HashSet<TypeSymbol> checkedTypes) 1230internal static bool GetUnificationUseSiteDiagnosticRecursive(ref DiagnosticInfo result, ImmutableArray<ParameterSymbol> parameters, Symbol owner, ref HashSet<TypeSymbol> checkedTypes) 1244internal static bool GetUnificationUseSiteDiagnosticRecursive(ref DiagnosticInfo result, ImmutableArray<TypeParameterSymbol> typeParameters, Symbol owner, ref HashSet<TypeSymbol> checkedTypes)
Symbols\Symbol_Attributes.cs (1)
462boundAttribute.CommonConstructorArguments[0].ValueInternal is TypeSymbol &&
Symbols\SymbolExtensions.cs (13)
87public static bool IsNoMoreVisibleThan(this Symbol symbol, TypeSymbol type, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 231public static bool IsContainingSymbolOfAllTypeParameters(this Symbol containingSymbol, TypeSymbol type) 240public static bool IsContainingSymbolOfAllTypeParameters(this Symbol containingSymbol, ImmutableArray<TypeSymbol> types) 245private static readonly Func<TypeSymbol, Symbol, bool, bool> s_hasInvalidTypeParameterFunc = 248private static bool HasInvalidTypeParameter(TypeSymbol type, Symbol? containingSymbol) 280Debug.Assert(!(symbol is TypeSymbol)); 414internal static TypeSymbol? EnsureCSharpSymbolOrNull(this ITypeSymbol? symbol, string paramName) 416return (TypeSymbol?)EnsureCSharpSymbolOrNull((ISymbol?)symbol, paramName); 524returnType = TypeWithAnnotations.Create((TypeSymbol)symbol); 587internal static ITypeSymbol? GetPublicSymbol(this TypeSymbol? symbol) 708internal static ImmutableArray<ITypeSymbol> GetPublicSymbols(this ImmutableArray<TypeSymbol> symbols) 772internal static TypeSymbol? GetSymbol(this ITypeSymbol? symbol) 774return symbol.GetSymbol<TypeSymbol>();
Symbols\Synthesized\Records\SynthesizedRecordClone.cs (1)
146internal static MethodSymbol? FindValidCloneMethod(TypeSymbol containingType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Symbols\Synthesized\Records\SynthesizedRecordDeconstruct.cs (1)
76var type = positionalMember switch
Symbols\Synthesized\Records\SynthesizedRecordEquals.cs (1)
144var parameterType = f.Type;
Symbols\Synthesized\Records\SynthesizedRecordOrdinaryMethod.cs (1)
60protected sealed override TypeSymbol? ExplicitInterfaceType => null;
Symbols\Synthesized\Records\SynthesizedRecordPropertySymbol.cs (1)
63private static bool ShouldUseInit(TypeSymbol container)
Symbols\Synthesized\SynthesizedContainer.cs (3)
152internal override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol> basesBeingResolved) => ImmutableArray<NamedTypeSymbol>.Empty; 158internal override NamedTypeSymbol GetDeclaredBaseType(ConsList<TypeSymbol> basesBeingResolved) => BaseTypeNoUseSiteDiagnostics; 160internal override ImmutableArray<NamedTypeSymbol> GetDeclaredInterfaces(ConsList<TypeSymbol> basesBeingResolved) => InterfacesNoUseSiteDiagnostics(basesBeingResolved);
Symbols\Synthesized\SynthesizedDelegateSymbol.cs (2)
17public SynthesizedDelegateConstructor(NamedTypeSymbol containingType, TypeSymbol objectType, TypeSymbol intPtrType)
Symbols\Synthesized\SynthesizedEmbeddedAttributeSymbol.cs (3)
148internal override NamedTypeSymbol GetDeclaredBaseType(ConsList<TypeSymbol> basesBeingResolved) => _baseType; 150internal override ImmutableArray<NamedTypeSymbol> GetDeclaredInterfaces(ConsList<TypeSymbol> basesBeingResolved) => ImmutableArray<NamedTypeSymbol>.Empty; 162internal override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol> basesBeingResolved = null) => ImmutableArray<NamedTypeSymbol>.Empty;
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 (2)
522internal SubmissionEntryPoint(NamedTypeSymbol containingType, TypeWithAnnotations returnType, TypeSymbol submissionArrayType) : 596Debug.Assert(TypeSymbol.Equals(initializeResult.Type, _returnType.Type, TypeCompareKind.ConsiderEverything2));
Symbols\Synthesized\SynthesizedFieldSymbol.cs (1)
25TypeSymbol type,
Symbols\Synthesized\SynthesizedFieldSymbolBase.cs (1)
52var type = typeWithAnnotations.Type;
Symbols\Synthesized\SynthesizedGlobalMethodSymbol.cs (2)
28private readonly TypeSymbol _returnType; 32internal SynthesizedGlobalMethodSymbol(ModuleSymbol containingModule, PrivateImplementationDetails privateImplType, TypeSymbol returnType, string name)
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 (11)
17private readonly TypeSymbol _containingType; 20private readonly TypeSymbol _returnType; 22public SynthesizedIntrinsicOperatorSymbol(TypeSymbol leftType, string name, TypeSymbol rightType, TypeSymbol returnType) 48public SynthesizedIntrinsicOperatorSymbol(TypeSymbol container, string name, TypeSymbol returnType) 439TypeSymbol.Equals(_containingType, other._containingType, compareKind) && 440TypeSymbol.Equals(_returnType, other._returnType, compareKind)) 444if (!TypeSymbol.Equals(_parameters[i].Type, other._parameters[i].Type, compareKind)) 465TypeSymbol type,
Symbols\Synthesized\SynthesizedLambdaCacheFieldSymbol.cs (1)
19public SynthesizedLambdaCacheFieldSymbol(NamedTypeSymbol containingType, TypeSymbol type, string name, MethodSymbol topLevelMethod, bool isReadOnly, bool isStatic)
Symbols\Synthesized\SynthesizedParameterlessThrowMethod.cs (1)
17internal SynthesizedParameterlessThrowMethod(SourceModuleSymbol containingModule, PrivateImplementationDetails privateImplType, TypeSymbol returnType, string synthesizedMethodName, MethodSymbol exceptionConstructor)
Symbols\Synthesized\SynthesizedSimpleProgramEntryPointSymbol.cs (1)
23private readonly TypeSymbol _returnType;
Symbols\Synthesized\SynthesizedStringHashFunctionSymbol.cs (4)
18internal SynthesizedStringSwitchHashMethod(SourceModuleSymbol containingModule, PrivateImplementationDetails privateImplType, TypeSymbol returnType, TypeSymbol paramType) 27internal SynthesizedSpanSwitchHashMethod(SourceModuleSymbol containingModule, PrivateImplementationDetails privateImplType, TypeSymbol returnType, TypeSymbol paramType, bool isReadOnlySpan)
Symbols\Synthesized\SynthesizedThrowIfNullMethod.cs (3)
16internal SynthesizedThrowIfNullMethod(SourceModuleSymbol containingModule, PrivateImplementationDetails privateImplType, MethodSymbol throwMethod, TypeSymbol returnType, TypeSymbol argumentParamType, TypeSymbol paramNameParamType)
Symbols\Synthesized\SynthesizedThrowMethod.cs (2)
15internal SynthesizedThrowMethod(SourceModuleSymbol containingModule, PrivateImplementationDetails privateImplType, TypeSymbol returnType, TypeSymbol paramType)
Symbols\Synthesized\SynthesizedThrowSwitchExpressionExceptionMethod.cs (2)
16internal SynthesizedThrowSwitchExpressionExceptionMethod(SourceModuleSymbol containingModule, PrivateImplementationDetails privateImplType, TypeSymbol returnType, TypeSymbol paramType)
Symbols\Tuples\TupleErrorFieldSymbol.cs (1)
190TypeSymbol.Equals(ContainingType, other.ContainingType, compareKind);
Symbols\Tuples\TupleFieldSymbol.cs (1)
171TypeSymbol.Equals(_containingTuple, other._containingTuple, compareKind);
Symbols\Tuples\TupleTypeSymbol.cs (3)
284internal static void ReportTupleNamesMismatchesIfAny(TypeSymbol destination, BoundTupleLiteral literal, BindingDiagnosticBag diagnostics) 860private TypeSymbol MergeTupleNames(NamedTypeSymbol other, NamedTypeSymbol mergedType) 1119if (TypeSymbol.Equals(underlyingMemberDefinition.ContainingType, TupleUnderlyingType.OriginalDefinition, TypeCompareKind.ConsiderEverything))
Symbols\TypeMap.cs (3)
24public static readonly Func<TypeWithAnnotations, TypeSymbol> AsTypeSymbol = t => t.Type; 36internal static ImmutableArray<TypeSymbol> AsTypeSymbols(ImmutableArray<TypeWithAnnotations> typesOpt) 141Debug.Assert(TypeSymbol.Equals(oldOwner.ConstructedFrom, oldOwner, TypeCompareKind.ConsiderEverything2));
Symbols\TypeParameterBounds.cs (2)
27TypeSymbol deducedBaseType) 80public readonly TypeSymbol DeducedBaseType;
Symbols\TypeParameterSymbol.cs (17)
35protected sealed override TypeSymbol OriginalTypeSymbolDefinition 99((TypeSymbol)constraint.Type.OriginalDefinition).AddUseSiteInfo(ref useSiteInfo); 242internal sealed override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol> basesBeingResolved = null) 308internal TypeSymbol DeducedBaseTypeNoUseSiteDiagnostics 317internal TypeSymbol DeducedBaseType(ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 320var result = DeducedBaseTypeNoUseSiteDiagnostics; 324((TypeSymbol)result.OriginalDefinition).AddUseSiteInfo(ref useSiteInfo); 348var current = DeducedBaseType(ref useSiteInfo); 389internal abstract TypeSymbol GetDeducedBaseType(ConsList<TypeParameterSymbol> inProgress); 391private static bool ConstraintImpliesReferenceType(TypeSymbol constraint) 401internal static bool NonTypeParameterConstraintImpliesReferenceType(TypeSymbol constraint) 638internal sealed override bool GetUnificationUseSiteDiagnosticRecursive(ref DiagnosticInfo result, Symbol owner, ref HashSet<TypeSymbol> checkedTypes) 643internal override bool Equals(TypeSymbol t2, TypeCompareKind comparison) 678internal override bool ApplyNullableTransforms(byte defaultTransformFlag, ImmutableArray<byte> transforms, ref int position, out TypeSymbol result) 684internal override TypeSymbol SetNullabilityForReferenceTypes(Func<TypeWithAnnotations, TypeWithAnnotations> transform) 689internal 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) 529internal abstract bool GetUnificationUseSiteDiagnosticRecursive(ref DiagnosticInfo result, Symbol owner, ref HashSet<TypeSymbol> checkedTypes); 631internal abstract bool ApplyNullableTransforms(byte defaultTransformFlag, ImmutableArray<byte> transforms, ref int position, out TypeSymbol result); 633internal abstract TypeSymbol SetNullabilityForReferenceTypes(Func<TypeWithAnnotations, TypeWithAnnotations> transform); 635internal TypeSymbol SetUnknownNullabilityForReferenceTypes() 649internal abstract TypeSymbol MergeEquivalentTypes(TypeSymbol other, VarianceKind variance); 800private static Symbol ComputeImplementationForInterfaceMember(Symbol interfaceMember, TypeSymbol implementingType, BindingDiagnosticBag diagnostics, 831TypeSymbol implementingBaseOpt = null; // Calculated only if canBeImplementedImplicitly == false 836for (TypeSymbol currType = implementingType; (object)currType != null; currType = currType.BaseTypeWithDefinitionUseSiteDiagnostics(ref useSiteInfo)) 1046private static Symbol FindMostSpecificImplementationInInterfaces(Symbol interfaceMember, TypeSymbol implementingType, 1079static bool stopLookup(MethodSymbol interfaceAccessor, TypeSymbol implementingType) 1142TypeSymbol implementingType, 1455private static bool IsExplicitlyImplementedViaAccessors(bool checkPendingExplicitImplementations, Symbol interfaceMember, TypeSymbol currType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, out Symbol implementingMember) 1492private static bool TryGetExplicitImplementationAssociatedPropertyOrEvent(bool checkPendingExplicitImplementations, MethodSymbol interfaceAccessor, TypeSymbol currType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, out Symbol associated) 1536private static void CheckForImplementationOfCorrespondingPropertyOrEvent(MethodSymbol interfaceMethod, TypeSymbol implementingType, bool implementingTypeIsFromSomeCompilation, 1588else if ((object)correspondingImplementingAccessor != null && ((object)implicitImpl == null || TypeSymbol.Equals(correspondingImplementingAccessor.ContainingType, implicitImpl.ContainingType, TypeCompareKind.ConsiderEverything2))) 1619private static void ReportDefaultInterfaceImplementationMatchDiagnostics(Symbol interfaceMember, TypeSymbol implementingType, Symbol implicitImpl, BindingDiagnosticBag diagnostics) 1657private static void ReportImplicitImplementationMatchDiagnostics(Symbol interfaceMember, TypeSymbol implementingType, Symbol implicitImpl, BindingDiagnosticBag diagnostics) 1749internal static void CheckNullableReferenceTypeAndScopedMismatchOnImplementingMember(TypeSymbol implementingType, Symbol implementingMember, Symbol interfaceMember, bool isExplicit, BindingDiagnosticBag diagnostics) 1780TypeSymbol implementingType, 1788ReportMismatchInReturnType<(TypeSymbol implementingType, bool isExplicit)> reportMismatchInReturnType = 1811ReportMismatchInParameterType<(TypeSymbol implementingType, bool isExplicit)> reportMismatchInParameterType = 1939private static void ReportImplicitImplementationMismatchDiagnostics(Symbol interfaceMember, TypeSymbol implementingType, Symbol closestMismatch, BindingDiagnosticBag diagnostics) 1961TypeSymbol interfaceMemberReturnType; 2029private static Location GetInterfaceLocation(Symbol interfaceMember, TypeSymbol implementingType) 2043private static bool ReportAnyMismatchedConstraints(MethodSymbol interfaceMethod, TypeSymbol implementingType, MethodSymbol implicitImpl, BindingDiagnosticBag diagnostics) 2088internal static Location GetImplicitImplementationDiagnosticLocation(Symbol interfaceMember, TypeSymbol implementingType, Symbol member) 2090if (TypeSymbol.Equals(member.ContainingType, implementingType, TypeCompareKind.ConsiderEverything2)) 2120TypeSymbol currType, 2404public static bool Equals(TypeSymbol? left, TypeSymbol? right, TypeCompareKind comparison) 2416public static bool operator ==(TypeSymbol left, TypeSymbol right) 2420public static bool operator !=(TypeSymbol left, TypeSymbol right) 2424public static bool operator ==(Symbol left, TypeSymbol right) 2428public static bool operator !=(Symbol left, TypeSymbol right) 2432public static bool operator ==(TypeSymbol left, Symbol right) 2436public static bool operator !=(TypeSymbol left, Symbol right)
Symbols\TypeSymbolExtensions.cs (160)
18public static bool ImplementsInterface(this TypeSymbol subType, TypeSymbol superInterface, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 22if (@interface.IsInterface && TypeSymbol.Equals(@interface, superInterface, TypeCompareKind.ConsiderEverything2)) 30public static bool CanBeAssignedNull(this TypeSymbol type) 35public static bool CanContainNull(this TypeSymbol type) 41public static bool CanBeConst(this TypeSymbol typeSymbol) 61public static bool IsTypeParameterDisallowingAnnotationInCSharp8(this TypeSymbol type) 82public static bool IsPossiblyNullableReferenceTypeTypeParameter(this TypeSymbol type) 87public static bool IsNonNullableValueType(this TypeSymbol typeArgument) 97public static bool IsVoidType(this TypeSymbol type) 102public static bool IsNullableTypeOrTypeParameter(this TypeSymbol? type) 131public static bool IsNullableType(this TypeSymbol type) 136public static bool IsValidNullableTypeArgument(this TypeSymbol type) 144public static TypeSymbol GetNullableUnderlyingType(this TypeSymbol type) 149public static TypeWithAnnotations GetNullableUnderlyingTypeWithAnnotations(this TypeSymbol type) 158public static TypeSymbol StrippedType(this TypeSymbol type) 163public static TypeSymbol EnumUnderlyingTypeOrSelf(this TypeSymbol type) 168public static bool IsNativeIntegerOrNullableThereof(this TypeSymbol? type) 173public static bool IsObjectType(this TypeSymbol type) 178public static bool IsStringType(this TypeSymbol type) 183public static bool IsCharType(this TypeSymbol type) 188public static bool IsIntegralType(this TypeSymbol type) 193public static NamedTypeSymbol? GetEnumUnderlyingType(this TypeSymbol? type) 198public static bool IsEnumType(this TypeSymbol type) 204public static bool IsValidEnumType(this TypeSymbol type) 217public static bool IsValidAttributeParameterType(this TypeSymbol type, CSharpCompilation compilation) 228public static TypedConstantKind GetAttributeParameterTypedConstantKind(this TypeSymbol type, CSharpCompilation compilation) 292public static bool IsValidExtensionParameterType(this TypeSymbol type) 305public static bool IsInterfaceType(this TypeSymbol type) 311public static bool IsClassType(this TypeSymbol type) 317public static bool IsStructType(this TypeSymbol type) 323public static bool IsErrorType(this TypeSymbol type) 334public static bool IsDynamic(this TypeSymbol type) 339public static bool IsTypeParameter(this TypeSymbol type) 345public static bool IsArray(this TypeSymbol type) 351public static bool IsSZArray(this TypeSymbol type) 357public static bool IsFunctionPointer(this TypeSymbol type) 362public static bool IsPointerOrFunctionPointer(this TypeSymbol type) 378public static NamedTypeSymbol? GetDelegateType(this TypeSymbol? type) 389public static TypeSymbol? GetDelegateOrFunctionPointerType(this TypeSymbol? type) 391return (TypeSymbol?)GetDelegateType(type) ?? type as FunctionPointerTypeSymbol; 398public static bool IsExpressionTree(this TypeSymbol type) 407public static bool IsNonGenericExpressionType(this TypeSymbol type) 417public static bool IsGenericOrNonGenericExpressionType(this TypeSymbol _type, out bool isGenericType) 457public static bool IsPossibleArrayGenericInterface(this TypeSymbol type) 480internal static bool IsErrorTypeOrRefLikeType(this TypeSymbol type) 503public static bool IsDelegateType(this TypeSymbol type) 509public static ImmutableArray<ParameterSymbol> DelegateParameters(this TypeSymbol type) 519public static ImmutableArray<ParameterSymbol> DelegateOrFunctionPointerParameters(this TypeSymbol type) 532public static bool TryGetElementTypesWithAnnotationsIfTupleType(this TypeSymbol type, out ImmutableArray<TypeWithAnnotations> elementTypes) 545public static MethodSymbol? DelegateInvokeMethod(this TypeSymbol type) 556public static ConstantValue? GetDefaultValue(this TypeSymbol type) 604public static SpecialType GetSpecialTypeSafe(this TypeSymbol? type) 609public static bool IsAtLeastAsVisibleAs(this TypeSymbol type, Symbol sym, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 612var result = type.VisitType((type1, symbol, unused) => IsTypeLessVisibleThan(type1, symbol, ref localUseSiteInfo), sym, 618private static bool IsTypeLessVisibleThan(TypeSymbol type, Symbol sym, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 642public static TypeSymbol? VisitType<T>( 643this TypeSymbol type, 644Func<TypeSymbol, T, bool, bool> predicate, 670public static TypeSymbol? VisitType<T>( 672TypeSymbol? type, 674Func<TypeSymbol, T, bool, bool>? typePredicate, 691TypeSymbol current = type ?? (useDefaultType ? typeWithAnnotationsOpt.DefaultType : typeWithAnnotationsOpt.Type); 707var result = VisitType(default, containingType, typeWithAnnotationsPredicate, typePredicate, arg, canDigThroughNullable, useDefaultType, visitCustomModifiers); 740var result = VisitType( 781(TypeWithAnnotations nextTypeWithAnnotations, TypeSymbol? nextType) = getNextIterationElements(fields[i].TypeWithAnnotations, canDigThroughNullable); 782var result = VisitType( 812(TypeWithAnnotations nextTypeWithAnnotations, TypeSymbol? nextType) = getNextIterationElements(typeArguments[i], canDigThroughNullable); 813var result = VisitType( 843var result = visitFunctionPointerType((FunctionPointerTypeSymbol)current, typeWithAnnotationsPredicate, typePredicate, arg, useDefaultType, canDigThroughNullable, visitCustomModifiers, out next); 861static (TypeWithAnnotations, TypeSymbol?) getNextIterationElements(TypeWithAnnotations type, bool canDigThroughNullable) 864static 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) 873var result = VisitType( 891(TypeWithAnnotations nextTypeWithAnnotations, TypeSymbol? nextType) = getNextIterationElements(currentPointer.Parameters[i].TypeWithAnnotations, canDigThroughNullable); 1093public static bool IsUnboundGenericType(this TypeSymbol type) 1109public static bool ContainsTypeParameter(this TypeSymbol type, TypeParameterSymbol? parameter = null) 1111var result = type.VisitType(s_containsTypeParameterPredicate, parameter); 1115private static readonly Func<TypeSymbol, TypeParameterSymbol?, bool, bool> s_containsTypeParameterPredicate = 1116(type, parameter, unused) => type.TypeKind == TypeKind.TypeParameter && (parameter is null || TypeSymbol.Equals(type, parameter, TypeCompareKind.ConsiderEverything2)); 1118public static bool ContainsTypeParameter(this TypeSymbol type, MethodSymbol parameterContainer) 1122var result = type.VisitType(s_isTypeParameterWithSpecificContainerPredicate, parameterContainer); 1126private static readonly Func<TypeSymbol, Symbol, bool, bool> s_isTypeParameterWithSpecificContainerPredicate = 1129public static bool ContainsTypeParameters(this TypeSymbol type, HashSet<TypeParameterSymbol> parameters) 1131var result = type.VisitType(s_containsTypeParametersPredicate, parameters); 1135private static readonly Func<TypeSymbol, HashSet<TypeParameterSymbol>, bool, bool> s_containsTypeParametersPredicate = 1138public static bool ContainsMethodTypeParameter(this TypeSymbol type) 1140var result = type.VisitType(s_containsMethodTypeParameterPredicate, null); 1144private static readonly Func<TypeSymbol, object?, bool, bool> s_containsMethodTypeParameterPredicate = 1150public static bool ContainsDynamic(this TypeSymbol type) 1152var result = type.VisitType(s_containsDynamicPredicate, null, canDigThroughNullable: true); 1156private static readonly Func<TypeSymbol, object?, bool, bool> s_containsDynamicPredicate = (type, unused1, unused2) => type.TypeKind == TypeKind.Dynamic; 1158internal static bool ContainsNativeIntegerWrapperType(this TypeSymbol type) 1160var result = type.VisitType((type, unused1, unused2) => type.IsNativeIntegerWrapperType, (object?)null, canDigThroughNullable: true); 1169internal static bool ContainsErrorType(this TypeSymbol type) 1171var result = type.VisitType((type, unused1, unused2) => type.IsErrorType(), (object?)null, canDigThroughNullable: true); 1178internal static bool ContainsTuple(this TypeSymbol type) => 1179type.VisitType((TypeSymbol t, object? _1, bool _2) => t.IsTupleType, null) is object; 1184internal static bool ContainsTupleNames(this TypeSymbol type) => 1185type.VisitType((TypeSymbol t, object? _1, bool _2) => !t.TupleElementNames.IsDefault, null) is object; 1190internal static bool ContainsFunctionPointer(this TypeSymbol type) => 1191type.VisitType((TypeSymbol t, object? _, bool _) => t.IsFunctionPointer(), null) is object; 1193internal static bool ContainsPointer(this TypeSymbol type) => 1194type.VisitType((TypeSymbol t, object? _, bool _) => t.TypeKind is TypeKind.Pointer or TypeKind.FunctionPointer, null) is object; 1211internal static TypeSymbol? GetNonErrorGuess(this TypeSymbol type) 1213var result = ExtendedErrorTypeSymbol.ExtractNonErrorType(type); 1222internal static TypeKind GetNonErrorTypeKindGuess(this TypeSymbol type) 1232internal static bool IsValidV6SwitchGoverningType(this TypeSymbol type, bool isTargetTypeOfUserDefinedOp = false) 1277internal static bool IsSpanChar(this TypeSymbol type) 1288internal static bool IsReadOnlySpanChar(this TypeSymbol type) 1299internal static bool IsSpanOrReadOnlySpanChar(this TypeSymbol type) 1317internal static bool IsRestrictedType(this TypeSymbol type, 1335public static bool IsIntrinsicType(this TypeSymbol type) 1362public static bool IsPartial(this TypeSymbol type) 1367public static bool HasFileLocalTypes(this TypeSymbol type) 1369var foundType = type.VisitType(predicate: (type, _, _) => type is SourceMemberContainerTypeSymbol { IsFileLocal: true }, arg: (object?)null); 1382public static bool IsPointerType(this TypeSymbol type) 1387internal static int FixedBufferElementSizeInBytes(this TypeSymbol type) 1393internal static bool IsValidVolatileFieldType(this TypeSymbol type) 1427public static bool MarkCheckedIfNecessary(this TypeSymbol type, ref HashSet<TypeSymbol> checkedTypes) 1431checkedTypes = new HashSet<TypeSymbol>(); 1437internal static bool IsUnsafe(this TypeSymbol type) 1458internal static bool IsVoidPointer(this TypeSymbol type) 1467internal static bool IsPrimitiveRecursiveStruct(this TypeSymbol t) 1551public static TypeSymbol AsDynamicIfNoPia(this TypeSymbol type, NamedTypeSymbol containingType) 1553return type.TryAsDynamicIfNoPia(containingType, out TypeSymbol? result) ? result : type; 1556public static bool TryAsDynamicIfNoPia(this TypeSymbol type, NamedTypeSymbol containingType, [NotNullWhen(true)] out TypeSymbol? result) 1576internal static bool IsVerifierReference(this TypeSymbol type) 1584internal static bool IsVerifierValue(this TypeSymbol type) 1737internal static bool IsNonGenericTaskType(this TypeSymbol type, CSharpCompilation compilation) 1755internal static bool IsGenericTaskType(this TypeSymbol type, CSharpCompilation compilation) 1768internal static bool IsIAsyncEnumerableType(this TypeSymbol type, CSharpCompilation compilation) 1778internal static bool IsIAsyncEnumeratorType(this TypeSymbol type, CSharpCompilation compilation) 1815internal static TypeSymbol NormalizeTaskTypes(this TypeSymbol type, CSharpCompilation compilation) 1824private static bool NormalizeTaskTypesInType(CSharpCompilation compilation, ref TypeSymbol type) 1863var type = typeWithAnnotations.Type; 1885var typeArgNormalized = typeWithModifier.Type; 2028internal static bool IsWellKnownTypeInAttribute(this TypeSymbol typeSymbol) 2031internal static bool IsWellKnownTypeUnmanagedType(this TypeSymbol typeSymbol) 2034internal static bool IsWellKnownTypeIsExternalInit(this TypeSymbol typeSymbol) 2037internal static bool IsWellKnownTypeOutAttribute(this TypeSymbol typeSymbol) => typeSymbol.IsWellKnownInteropServicesTopLevelType("OutAttribute"); 2039private static bool IsWellKnownInteropServicesTopLevelType(this TypeSymbol typeSymbol, string name) 2049private static bool IsWellKnownCompilerServicesTopLevelType(this TypeSymbol typeSymbol, string name) 2059internal static bool IsCompilerServicesTopLevelType(this TypeSymbol typeSymbol) 2062internal static bool IsWellKnownSetsRequiredMembersAttribute(this TypeSymbol type) 2065internal static bool IsWellKnownINumberBaseType(this TypeSymbol type) 2072private static bool IsWellKnownDiagnosticsCodeAnalysisTopLevelType(this TypeSymbol typeSymbol) 2075private static bool IsContainedInNamespace(this TypeSymbol typeSymbol, string outerNS, string midNS, string? innerNS = null) 2108internal static int TypeToIndex(this TypeSymbol type) 2133TypeSymbol underlyingType = type.GetNullableUnderlyingType(); 2162internal 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 (71)
40internal readonly TypeSymbol DefaultType; 50private TypeWithAnnotations(TypeSymbol defaultType, NullableAnnotation nullableAnnotation, Extensions extensions) 72internal static TypeWithAnnotations Create(bool isNullableEnabled, TypeSymbol typeSymbol, bool isAnnotated = false) 82internal static TypeWithAnnotations Create(TypeSymbol typeSymbol, NullableAnnotation nullableAnnotation = NullableAnnotation.Oblivious, ImmutableArray<CustomModifier> customModifiers = default) 165private static TypeWithAnnotations CreateNonLazyType(TypeSymbol typeSymbol, NullableAnnotation nullableAnnotation, ImmutableArray<CustomModifier> customModifiers) 190var typeSymbol = this.Type; 235TypeSymbol typeSymbol = other.Type; 237TypeSymbol type = Type.MergeEquivalentTypes(typeSymbol, variance); 246public TypeSymbol Type => _extensions?.GetResolvedType(DefaultType); 247public TypeSymbol NullableUnderlyingTypeOrSelf => _extensions.GetNullableUnderlyingTypeOrSelf(DefaultType); 366TypeSymbol type = Type; 413public bool GetUnificationUseSiteDiagnosticRecursive(ref DiagnosticInfo result, Symbol owner, ref HashSet<TypeSymbol> checkedTypes) 434TypeSymbol typeSymbol = this.Type; 528public TypeSymbol AsTypeSymbolOnly() => _extensions.AsTypeSymbolOnly(DefaultType); 539public TypeWithAnnotations WithTypeAndModifiers(TypeSymbol typeSymbol, ImmutableArray<CustomModifier> customModifiers) => 542public TypeWithAnnotations WithType(TypeSymbol typeSymbol) => 563TypeSymbol typeOpt) 565var type = TypeSymbolExtensions.VisitType( 578private static bool IsNonGenericValueType(TypeSymbol type) 601var type = typeWithAnnotations.Type; 637TypeSymbol oldTypeSymbol = Type; 659TypeSymbol newTypeSymbol; 698var typeSymbol = Type; 709var typeSymbol = Type; 710var newTypeSymbol = typeSymbol.SetUnknownNullabilityForReferenceTypes(); 784static NullableFlowState getFlowState(TypeSymbol type, NullableAnnotation annotation) 828internal abstract TypeSymbol GetResolvedType(TypeSymbol defaultType); 836internal abstract TypeSymbol GetNullableUnderlyingTypeOrSelf(TypeSymbol typeSymbol); 838internal abstract TypeSymbol AsTypeSymbolOnly(TypeSymbol typeSymbol); 840internal abstract SpecialType GetSpecialType(TypeSymbol typeSymbol); 841internal abstract bool IsRestrictedType(TypeSymbol typeSymbol, bool ignoreSpanLikeTypes); 842internal abstract bool IsStatic(TypeSymbol typeSymbol); 843internal abstract bool IsVoid(TypeSymbol typeSymbol); 844internal abstract bool IsSZArray(TypeSymbol typeSymbol); 845internal abstract bool IsRefLikeType(TypeSymbol typeSymbol); 847internal abstract TypeWithAnnotations WithTypeAndModifiers(TypeWithAnnotations type, TypeSymbol typeSymbol, ImmutableArray<CustomModifier> customModifiers); 867internal override TypeSymbol GetResolvedType(TypeSymbol defaultType) => defaultType; 870internal override SpecialType GetSpecialType(TypeSymbol typeSymbol) => typeSymbol.SpecialType; 871internal override bool IsRestrictedType(TypeSymbol typeSymbol, bool ignoreSpanLikeTypes) => typeSymbol.IsRestrictedType(ignoreSpanLikeTypes); 872internal override bool IsStatic(TypeSymbol typeSymbol) => typeSymbol.IsStatic; 873internal override bool IsVoid(TypeSymbol typeSymbol) => typeSymbol.IsVoidType(); 874internal override bool IsSZArray(TypeSymbol typeSymbol) => typeSymbol.IsSZArray(); 875internal override bool IsRefLikeType(TypeSymbol typeSymbol) => typeSymbol.IsRefLikeType; 877internal override TypeSymbol GetNullableUnderlyingTypeOrSelf(TypeSymbol typeSymbol) => typeSymbol.StrippedType(); 884internal override TypeSymbol AsTypeSymbolOnly(TypeSymbol typeSymbol) => typeSymbol; 886internal override TypeWithAnnotations WithTypeAndModifiers(TypeWithAnnotations type, TypeSymbol typeSymbol, ImmutableArray<CustomModifier> customModifiers) 898var defaultType = type.DefaultType; 930private TypeSymbol _resolved; 941internal override bool IsVoid(TypeSymbol typeSymbol) => false; 942internal override bool IsSZArray(TypeSymbol typeSymbol) => false; 943internal override bool IsRefLikeType(TypeSymbol typeSymbol) => false; 944internal override bool IsStatic(TypeSymbol typeSymbol) => false; 946private TypeSymbol GetResolvedType() 956internal override TypeSymbol GetNullableUnderlyingTypeOrSelf(TypeSymbol typeSymbol) => _underlying.Type; 958internal override SpecialType GetSpecialType(TypeSymbol typeSymbol) 964internal override bool IsRestrictedType(TypeSymbol typeSymbol, bool ignoreSpanLikeTypes) => _underlying.IsRestrictedType(ignoreSpanLikeTypes); 966internal override TypeSymbol AsTypeSymbolOnly(TypeSymbol typeSymbol) 968var resolvedType = GetResolvedType(); 974internal override TypeSymbol GetResolvedType(TypeSymbol defaultType) => GetResolvedType(); 984var resolvedType = GetResolvedType(); 993internal override TypeWithAnnotations WithTypeAndModifiers(TypeWithAnnotations type, TypeSymbol typeSymbol, ImmutableArray<CustomModifier> customModifiers) 1067var 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)
104internal override bool Equals(TypeSymbol t2, TypeCompareKind comparison)
Symbols\VarianceSafety.cs (3)
289TypeSymbol type, 386TypeSymbol typeArg = namedType.TypeArgumentsWithAnnotationsNoUseSiteDiagnostics[i].Type; 472if (!(context is TypeSymbol) && context.IsStatic && !context.IsAbstract && !context.IsVirtual)
Utilities\TypeSymbolExtensions.cs (9)
21public static int CustomModifierCount(this TypeSymbol type) 87public static bool HasCustomModifiers(this TypeSymbol type, bool flagNonDefaultArraySizesOrLowerBounds) 165public static bool CanUnifyWith(this TypeSymbol thisType, TypeSymbol otherType) 179internal static TypeSymbol GetNextBaseTypeNoUseSiteDiagnostics(this TypeSymbol type, ConsList<TypeSymbol> basesBeingResolved, CSharpCompilation compilation, ref PooledHashSet<NamedTypeSymbol> visited) 200private 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 (112)
CodeGen\CodeGenAsyncLocalsTests.cs (2)
968IEnumerable<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); 971Assert.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) 7062static 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; 5784TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 5821TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 5822TypeSymbol stringType = comp.GetSpecialType(SpecialType.System_String); 5848TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 5865TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 5866TypeSymbol stringType = comp.GetSpecialType(SpecialType.System_String); 5942TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 5943TypeSymbol stringType = comp.GetSpecialType(SpecialType.System_String); 5963TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 5964TypeSymbol stringType = comp.GetSpecialType(SpecialType.System_String); 5982TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 5983TypeSymbol stringType = comp.GetSpecialType(SpecialType.System_String); 6001TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 6019TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 6020TypeSymbol stringType = comp.GetSpecialType(SpecialType.System_String); 6045TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 6046TypeSymbol stringType = comp.GetSpecialType(SpecialType.System_String); 6071TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 6072TypeSymbol stringType = comp.GetSpecialType(SpecialType.System_String); 6096TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 6097TypeSymbol stringType = comp.GetSpecialType(SpecialType.System_String); 6121TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 6122TypeSymbol stringType = comp.GetSpecialType(SpecialType.System_String); 6147TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 6148TypeSymbol stringType = comp.GetSpecialType(SpecialType.System_String); 6181TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 6334TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 6359TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 6360TypeSymbol stringType = comp.GetSpecialType(SpecialType.System_String); 6385ImmutableArray.Create<TypeSymbol>(intType, stringType), 6407TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 6408TypeSymbol stringType = comp.GetSpecialType(SpecialType.System_String); 6423TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 6424TypeSymbol stringType = comp.GetSpecialType(SpecialType.System_String); 6439TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 6454TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 6455TypeSymbol stringType = comp.GetSpecialType(SpecialType.System_String); 6474TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 6475TypeSymbol stringType = comp.GetSpecialType(SpecialType.System_String); 6494TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 6495TypeSymbol stringType = comp.GetSpecialType(SpecialType.System_String); 6515TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 6516TypeSymbol stringType = comp.GetSpecialType(SpecialType.System_String); 6538TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 6555TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 11595private static void AssertTupleTypeEquality(TypeSymbol tuple) 11617private static void AssertTupleTypeMembersEquality(TypeSymbol tuple1, TypeSymbol tuple2) 12008var m4TupleRestTuple = ((FieldSymbol)m4Tuple.GetMembers("Rest").Single()).Type; 12237var m5TupleRestTuple = ((FieldSymbol)m5Tuple.GetMembers("Rest").Single()).Type; 12279var m5TupleRestTupleRestTuple = ((FieldSymbol)m5TupleRestTuple.GetMembers("Rest").Single()).Type; 12468var m7Tuple = c.GetMember<MethodSymbol>("M7").ReturnType; 12626var m8TupleRestTuple = ((FieldSymbol)m8Tuple.GetMembers("Rest").Single()).Type; 13534var m9Tuple = c.GetMember<MethodSymbol>("M9").ReturnType; 18849TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 18850TypeSymbol stringType = comp.GetSpecialType(SpecialType.System_String); 18910TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 18911TypeSymbol stringType = comp.GetSpecialType(SpecialType.System_String); 18912TypeSymbol objectType = comp.GetSpecialType(SpecialType.System_Object); 19828var m3 = comp.GetMember<MethodSymbol>("Derived.M3").ReturnType; 20569Assert.Equal("void C2.M1()", c2.FindImplementationForInterfaceMember(((TypeSymbol)c2Interfaces[0]).GetMember("M1")).ToTestDisplayString()); 20571c2.FindImplementationForInterfaceMember(((TypeSymbol)c1Interfaces[0]).GetMember("M1")).ToTestDisplayString()); 20573var m2 = (MethodSymbol)((TypeSymbol)c2).GetMember("I1<(System.Int32c,System.Int32d)>.M2"); 20582c2.FindImplementationForInterfaceMember(((TypeSymbol)c2Interfaces[0]).GetMember("M2"))); 20584c2.FindImplementationForInterfaceMember(((TypeSymbol)c1Interfaces[0]).GetMember("M2"))); 20814c3.FindImplementationForInterfaceMember(((TypeSymbol)c3Interfaces[0]).GetMember("M")).ToTestDisplayString()); 26789var tuple = iEnumerable.TypeArguments()[0]; 26862var tuple = iEnumerable.TypeArguments()[0]; 28625var tuple = m.ReturnType; 28657var tuple = m.ReturnType;
CodeGen\DestructorTests.cs (2)
600var intType = systemNamespace.GetMember<TypeSymbol>("Int32");
CodeGen\WinMdDelegateTests.cs (1)
225var fieldType = field.Type;
Emit\EditAndContinue\EditAndContinueStateMachineTests.cs (4)
9843var ism1 = compilation1.GetMember<TypeSymbol>("System.Runtime.CompilerServices.IteratorStateMachineAttribute"); 10025var asm1 = compilation1.GetMember<TypeSymbol>("System.Runtime.CompilerServices.AsyncStateMachineAttribute");
Emit\EditAndContinue\EditAndContinueTests.cs (3)
11706var mX1 = compilationA1.GetMember<TypeSymbol>("X"); 11723SemanticEdit.Create(SemanticEditKind.Insert, null, compilationB1.GetMember<TypeSymbol>("Y"))),
Emit\EditAndContinue\SymbolMatcherTests.cs (6)
394var elementType = compilation1.GetMember<TypeSymbol>("C.D"); 434var elementType = compilation1.GetMember<TypeSymbol>("C.D"); 475var elementType = compilation1.GetMember<TypeSymbol>("C.D");
Emit\EmitMetadataTests.cs (3)
446var parameter1Type = parameter1.Type; 2084var invokeReturn = invoke.ReturnType; 2086var endInvokeReturn = endInvoke.ReturnType;
Emit\NoPiaEmbedTypes.cs (1)
1476ParamInfo<TypeSymbol>[] paramInfo = new MetadataDecoder((PEModuleSymbol)module, itest17).GetSignatureForMethod(gapMethodDef, out signatureHeader, out mrEx);
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (41)
Attributes\AttributeTests.cs (14)
2845Assert.Equal(1, invokeMethod.GetReturnTypeAttributes().Where(a => TypeSymbol.Equals(a.AttributeClass, returnTypeAttrType, TypeCompareKind.ConsiderEverything2)).Count()); 2887Assert.Equal(1, endInvokeMethod.GetReturnTypeAttributes().Where(a => TypeSymbol.Equals(a.AttributeClass, returnTypeAttrType, TypeCompareKind.ConsiderEverything2)).Count()); 3081var nenum = top.GetMember<TypeSymbol>("NestedEnum"); 3978attrs = setter.GetReturnTypeAttributes().Where(a => TypeSymbol.Equals(a.AttributeClass, attributeTypeForReturn, TypeCompareKind.ConsiderEverything2)); 3991attrs = getter.GetReturnTypeAttributes().Where(a => TypeSymbol.Equals(a.AttributeClass, attributeTypeForReturn, TypeCompareKind.ConsiderEverything2)); 4796Assert.Equal(1, gooMethod.GetReturnTypeAttributes().Where(a => TypeSymbol.Equals(a.AttributeClass, b1Class, TypeCompareKind.ConsiderEverything2)).Count()); 4797Assert.Equal(1, gooMethod.GetReturnTypeAttributes().Where(a => TypeSymbol.Equals(a.AttributeClass, b2Class, TypeCompareKind.ConsiderEverything2)).Count()); 10850var program = module.GlobalNamespace.GetMember<TypeSymbol>("Program"); 10944var holder = module.GlobalNamespace.GetMember<TypeSymbol>("Holder"); 10954var 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)
4891var valueTupleS = comp.GetTypeByMetadataName("ValueTupleS").GetMember("M").GetTypeOrReturnType().Type; 4923var unbound = comp2.GetTypeByMetadataName("Unbound").BaseType().TypeArgumentsWithAnnotationsNoUseSiteDiagnostics[0].Type;
Emit\NumericIntPtrTests.cs (9)
1564static bool isNativeInt(TypeSymbol type, bool signed) 1569static bool isNullableNativeInt(TypeSymbol type, bool signed) 10314var nintType = method.Parameters[0].Type; 10318var intPtrType = method.Parameters[1].Type; 10327var nuintType = method.Parameters[2].Type; 10331var uintPtrType = method.Parameters[3].Type; 10343static void verifyIntPtr(TypeSymbol type) 10352static void verifyUIntPtr(TypeSymbol type) 10361static void verifyCommon(TypeSymbol type)
Microsoft.CodeAnalysis.CSharp.ExpressionEvaluator.ExpressionCompiler (83)
Binders\EEMethodBinder.cs (1)
52internal override void LookupSymbolsInSingleBinder(LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binders\PlaceholderLocalBinder.cs (1)
66ConsList<TypeSymbol> basesBeingResolved,
CompilationContext.cs (14)
60MethodDebugInfo<TypeSymbol, LocalSymbol> methodDebugInfo) 490var returnType = typeVariablesType.Construct(allTypeParameters.Cast<TypeParameterSymbol, TypeSymbol>()); 709var expressionType = expression.Type; 1062var typeSymbol = (TypeSymbol?)importRecord.TargetType; 1376var displayClassTypes = PooledHashSet<TypeSymbol>.GetInstance(); 1395var localType = local.Type; 1494TypeSymbol possiblyCapturingType, 1532HashSet<TypeSymbol> displayClassTypes, 1543HashSet<TypeSymbol> displayClassTypes, 1556var fieldType = field.Type; 1600var type = parameter.Type; 1746private static bool IsDisplayClassType(TypeSymbol type) 1906internal TypeSymbol Type
CompilationExtensions.cs (3)
104TypeSymbol type, 115TypeSymbol type, 130TypeSymbol type)
CSharpEESymbolProvider.cs (10)
15internal sealed class CSharpEESymbolProvider : EESymbolProvider<TypeSymbol, LocalSymbol> 31LocalInfo<TypeSymbol> info, 39TypeSymbol type; 62TypeSymbol type, 73public override TypeSymbol DecodeLocalVariableType(ImmutableArray<byte> signature) 78public override TypeSymbol GetTypeSymbolForSerializedType(string typeName) 85public override void DecodeLocalConstant(ref BlobReader reader, out TypeSymbol type, out ConstantValue value) 103public override TypeSymbol GetType(EntityHandle handle) 109private TypeSymbol IncludeDynamicAndTupleElementNamesIfAny( 110TypeSymbol type,
CSharpFrameDecoder.cs (1)
14internal sealed class CSharpFrameDecoder : FrameDecoder<CSharpCompilation, MethodSymbol, PEModuleSymbol, TypeSymbol, TypeParameterSymbol>
CSharpInstructionDecoder.cs (3)
18internal sealed class CSharpInstructionDecoder : InstructionDecoder<CSharpCompilation, MethodSymbol, PEModuleSymbol, TypeSymbol, TypeParameterSymbol> 117internal override MethodSymbol ConstructMethod(MethodSymbol method, ImmutableArray<TypeParameterSymbol> typeParameters, ImmutableArray<TypeSymbol> typeArguments) 171internal override TypeNameDecoder<PEModuleSymbol, TypeSymbol> GetTypeNameDecoder(CSharpCompilation compilation, MethodSymbol method)
CSharpLanguageInstructionDecoder.cs (1)
13internal sealed class CSharpLanguageInstructionDecoder : LanguageInstructionDecoder<CSharpCompilation, MethodSymbol, PEModuleSymbol, TypeSymbol, TypeParameterSymbol, ParameterSymbol>
EEAssemblyBuilder.cs (1)
98TypeSymbol type;
EETypeNameDecoder.cs (5)
13internal sealed class EETypeNameDecoder : TypeNameDecoder<PEModuleSymbol, TypeSymbol> 56protected override TypeSymbol LookupNestedTypeDefSymbol(TypeSymbol container, ref MetadataTypeName emittedName) 62protected override TypeSymbol LookupTopLevelTypeDefSymbol(int referencedAssemblyIndex, ref MetadataTypeName emittedName) 70protected override TypeSymbol LookupTopLevelTypeDefSymbol(ref MetadataTypeName emittedName, out bool isNoPiaLocalType)
EvaluationContext.cs (5)
40private readonly MethodDebugInfo<TypeSymbol, LocalSymbol> _methodDebugInfo; 49MethodDebugInfo<TypeSymbol, LocalSymbol> methodDebugInfo) 90methodDebugInfo: MethodDebugInfo<TypeSymbol, LocalSymbol>.None); 160var debugInfo = MethodDebugInfo<TypeSymbol, LocalSymbol>.ReadMethodDebugInfo(typedSymReader, symbolProvider, methodToken, methodVersion, ilOffset, isVisualBasicMethod: false); 164MethodDebugInfo<TypeSymbol, LocalSymbol>.GetLocals(
Rewriters\CapturedVariableRewriter.cs (2)
63Debug.Assert(TypeSymbol.Equals(node.Type, result.Type, TypeCompareKind.ConsiderEverything2)); 86var baseType = node.Type;
Rewriters\LocalDeclarationRewriter.cs (2)
77var type = local.Type; 149var byteType = byteArrayType.ElementType;
Rewriters\PlaceholderLocalRewriter.cs (1)
35Debug.Assert(TypeSymbol.Equals(result.Type, node.Type, TypeCompareKind.ConsiderEverything2));
Symbols\DisplayClassInstance.cs (3)
18internal abstract TypeSymbol Type { get; } 57internal override TypeSymbol Type 95internal override TypeSymbol Type
Symbols\DisplayClassVariable.cs (1)
47internal TypeSymbol Type
Symbols\EELocalConstantSymbol.cs (1)
23TypeSymbol type,
Symbols\EELocalSymbol.cs (1)
35TypeSymbol type,
Symbols\EELocalSymbolBase.cs (1)
86HashSet<TypeSymbol> unificationCheckedTypes = null;
Symbols\EEMethodSymbol.cs (5)
92Debug.Assert(TypeSymbol.Equals((TypeSymbol)sourceMethod.ContainingSymbol, container.SubstitutedSourceType.OriginalDefinition, TypeCompareKind.ConsiderEverything2)); 129this.SubstitutedSourceMethod = this.SubstitutedSourceMethod.Construct(_typeParameters.As<TypeSymbol>()); 141Debug.Assert(TypeSymbol.Equals(_thisParameter.Type, this.SubstitutedSourceMethod.ContainingType, TypeCompareKind.ConsiderEverything2)); 729private static TypeSymbol CalculateReturnType(CSharpCompilation compilation, BoundStatement bodyOpt)
Symbols\EENamedTypeSymbol.cs (3)
214internal override NamedTypeSymbol GetDeclaredBaseType(ConsList<TypeSymbol> basesBeingResolved) 219internal override ImmutableArray<NamedTypeSymbol> GetDeclaredInterfaces(ConsList<TypeSymbol> basesBeingResolved) 284internal override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol> basesBeingResolved)
Symbols\EETypeParameterSymbol.cs (2)
155internal override TypeSymbol GetDeducedBaseType(ConsList<TypeParameterSymbol> inProgress) 157var type = _sourceTypeParameter.GetDeducedBaseType(inProgress);
Symbols\ExceptionLocalSymbol.cs (1)
15internal ExceptionLocalSymbol(MethodSymbol method, string name, string displayName, TypeSymbol type, string getExceptionMethodName) :
Symbols\ObjectAddressLocalSymbol.cs (2)
18internal ObjectAddressLocalSymbol(MethodSymbol method, string name, TypeSymbol type, ulong address) : 43Debug.Assert(TypeSymbol.Equals(call.Type, this.Type, TypeCompareKind.ConsiderEverything2));
Symbols\ObjectIdLocalSymbol.cs (1)
18internal ObjectIdLocalSymbol(MethodSymbol method, TypeSymbol type, string name, string displayName, bool isWritable) :
Symbols\PlaceholderLocalSymbol.cs (9)
28internal PlaceholderLocalSymbol(MethodSymbol method, string name, string displayName, TypeSymbol type) 38TypeNameDecoder<PEModuleSymbol, TypeSymbol> typeNameDecoder, 46var type = typeNameDecoder.GetTypeSymbolForSerializedType(typeName); 153internal static BoundExpression ConvertToLocalType(CSharpCompilation compilation, BoundExpression expr, TypeSymbol type, DiagnosticBag diagnostics) 186private static BoundExpression ConvertToLocalTypeHelper(CSharpCompilation compilation, BoundExpression expr, TypeSymbol type, BindingDiagnosticBag diagnostics) 221private static TypeSymbol DecodeDynamicTypes(TypeSymbol type, AssemblySymbol sourceAssembly, ReadOnlyCollection<byte> bytes) 225var dynamicType = DynamicTypeDecoder.TransformTypeWithoutCustomModifierFlags( 232Debug.Assert(!TypeSymbol.Equals(dynamicType, type, TypeCompareKind.ConsiderEverything2));
Symbols\PlaceholderMethodSymbol.cs (1)
23internal delegate TypeSymbol GetReturnType(PlaceholderMethodSymbol method);
Symbols\ReturnValueLocalSymbol.cs (1)
17internal ReturnValueLocalSymbol(MethodSymbol method, string name, string displayName, TypeSymbol type, int index) :
Symbols\SimpleTypeParameterSymbol.cs (1)
129internal override TypeSymbol GetDeducedBaseType(ConsList<TypeParameterSymbol> inProgress)
Microsoft.CodeAnalysis.CSharp.ExpressionEvaluator.ExpressionCompiler.UnitTests (10)
ExpressionCompilerTestBase.cs (2)
509internal static MethodDebugInfo<TypeSymbol, LocalSymbol> GetMethodDebugInfo(RuntimeInstance runtime, string qualifiedMethodName, int ilOffset = 0) 518return MethodDebugInfo<TypeSymbol, LocalSymbol>.ReadMethodDebugInfo((ISymUnmanagedReader3)symReader, symbolProvider, MetadataTokens.GetToken(peMethod.Handle), methodVersion: 1, ilOffset: ilOffset, isVisualBasicMethod: false);
ExpressionCompilerTests.cs (3)
2096var typeArg = localType.TypeArguments()[0]; 2164var localType = (TypeSymbol)local.Type.GetInternalSymbol();
ManagedAddressOfTests.cs (1)
305private static void AssertIsStringPointer(TypeSymbol returnType)
TupleTests.cs (3)
277var returnType = method.ReturnType; 474var returnType = (TypeSymbol)method.ReturnType;
WinMdTests.cs (1)
234var actualReturnType = parameters[0].Type;
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (124)
Semantics\BindingTests.cs (2)
1934var method = module.GlobalNamespace.GetMember<TypeSymbol>("C").GetMember<MethodSymbol>("F"); 1956var method = module.GlobalNamespace.GetMember<TypeSymbol>("C").GetMember<MethodSymbol>("F");
Semantics\DeconstructionTests.cs (1)
4729var aaType = model.GetTypeInfo(aa).Type.GetSymbol();
Semantics\DelegateTypeTests.cs (1)
11470internal override TypeSymbol UnderlyingTypeSymbol => _underlying;
Semantics\DynamicTests.cs (5)
1929var c = compilation.GlobalNamespace.GetMember<TypeSymbol>("C"); 1932var erasedType = eraser.EraseDynamic(f.Type); 1957var derived = compilation.GlobalNamespace.GetMember<TypeSymbol>("Derived");
Semantics\ImplicitlyTypeArraysTests.cs (2)
45var 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)
399var underlyingTypeArgument = underlyingInterface.TypeArgumentsWithAnnotationsNoUseSiteDiagnostics[i].Type; 400var nativeIntegerTypeArgument = nativeIntegerInterface.TypeArgumentsWithAnnotationsNoUseSiteDiagnostics[i].Type; 779var typeA = comp.GetMember<FieldSymbol>("A.F1").Type; 860var typeA = comp.GetMember<FieldSymbol>("A.F1").Type; 975var typeA = comp.GetMember<FieldSymbol>("A.F1").Type; 1067var t1B = comp.GetMember<FieldSymbol>("B.F1").Type; 1068var t2B = comp.GetMember<FieldSymbol>("B.F2").Type; 1153var type1 = getConstraintType(comp); 1173var type2 = getConstraintType(comp); 1178static TypeSymbol getConstraintType(CSharpCompilation comp) => 4813static bool isNativeInt(TypeSymbol type, bool signed) 4819static bool isNullableNativeInt(TypeSymbol type, bool signed) 14706var type1 = getInterface(comp, "C1"); 14707var type2 = getInterface(comp, "C2"); 14708var type3 = getInterface(comp, "C3"); 14709var type4 = getInterface(comp, "C4"); 14710var type5 = getInterface(comp, "C5"); 14716static TypeSymbol getInterface(CSharpCompilation comp, string typeName) =>
Semantics\NullableReferenceTypesTests.cs (29)
16981Assert.Equal("void C2.M1()", c2.FindImplementationForInterfaceMember(((TypeSymbol)c2Interfaces[0]).GetMember("M1")).ToTestDisplayString(includeNonNullable: true)); 16983c2.FindImplementationForInterfaceMember(((TypeSymbol)c1Interfaces[0]).GetMember("M1")).ToTestDisplayString(includeNonNullable: true)); 16985var m2 = (MethodSymbol)((TypeSymbol)c2).GetMember("I1<A>.M2"); 16994c2.FindImplementationForInterfaceMember(((TypeSymbol)c2Interfaces[0]).GetMember("M2"))); 16996c2.FindImplementationForInterfaceMember(((TypeSymbol)c1Interfaces[0]).GetMember("M2"))); 17060Assert.Equal("void C1.M1()", c2.FindImplementationForInterfaceMember(((TypeSymbol)c2Interfaces[0]).GetMember("M1")).ToTestDisplayString(includeNonNullable: true)); 17062c2.FindImplementationForInterfaceMember(((TypeSymbol)c1Interfaces[0]).GetMember("M1")).ToTestDisplayString(includeNonNullable: true)); 17064var m2 = (MethodSymbol)((TypeSymbol)c1).GetMember("I1<A>.M2"); 17073c2.FindImplementationForInterfaceMember(((TypeSymbol)c2Interfaces[0]).GetMember("M2"))); 17075c2.FindImplementationForInterfaceMember(((TypeSymbol)c1Interfaces[0]).GetMember("M2"))); 17326var cMabImplementations = ((MethodSymbol)((TypeSymbol)c).GetMember("I1<T>.M")).ExplicitInterfaceImplementations; 17329var cMcdImplementations = ((MethodSymbol)((TypeSymbol)c).GetMember("I1<U>.M")).ExplicitInterfaceImplementations; 17385var method = (MethodSymbol)((TypeSymbol)c3).GetMember("I1<A>.M"); 17396c3.FindImplementationForInterfaceMember(((TypeSymbol)c3Interfaces[0]).GetMember("M"))); 17466var method = (MethodSymbol)((TypeSymbol)c3).GetMember("I1<A>.M"); 17477c3.FindImplementationForInterfaceMember(((TypeSymbol)c3Interfaces[0]).GetMember("M"))); 17550var method = (MethodSymbol)((TypeSymbol)c3).GetMember("I1<A>.M"); 17561c3.FindImplementationForInterfaceMember(((TypeSymbol)c3Interfaces[1]).GetMember("M"))); 17631var method = (MethodSymbol)((TypeSymbol)c3).GetMember("I1<A>.M"); 17642c3.FindImplementationForInterfaceMember(((TypeSymbol)c3Interfaces[0]).GetMember("M"))); 112017var type2 = comp.GetMember<MethodSymbol>("C.M").ReturnType; 112040var type2 = comp.GetMember<MethodSymbol>("C.M").ReturnType; 112167private static void AssertHashCodesMatch(TypeSymbol c, TypeSymbol c2) 135248var tuple = c2Goo.Parameters[0].Type.GetMemberTypeArgumentsNoUseSiteDiagnostics()[0]; 135336var tuple = c2Goo.ReturnType.GetMemberTypeArgumentsNoUseSiteDiagnostics()[0]; 135409var tuple = dGoo.Parameters[0].Type.GetMemberTypeArgumentsNoUseSiteDiagnostics()[0]; 135482var tuple = dGoo.ReturnType.GetMemberTypeArgumentsNoUseSiteDiagnostics()[0]; 135515var tuple = dGoo.Parameters[1].Type;
Semantics\OperatorTests.cs (22)
7494TypeSymbol type; 7529TypeSymbol type, 7560TypeSymbol underlying = type; 7856TypeSymbol[] types = new TypeSymbol[typeNames.Length]; 7877foreach (var leftType in types) 7879foreach (var rightType in types) 8016TypeSymbol[] types = new TypeSymbol[typeNames.Length]; 8037foreach (var leftType in types) 8039foreach (var rightType in types) 8067TypeSymbol leftType, 8068TypeSymbol rightType, 8169(TypeSymbol.Equals(leftType, rightType, TypeCompareKind.ConsiderEverything2) || compilation.Conversions.ClassifyConversionFromType(leftType, rightType, ref useSiteDiagnostics).IsReference)) 8227else if (op == BinaryOperatorKind.Subtraction && leftType.IsPointerType() && TypeSymbol.Equals(leftType, rightType, TypeCompareKind.ConsiderEverything2)) 8234TypeSymbol.Equals((signature = compilation.builtInOperators.GetSignature(result)).RightType, leftType.EnumUnderlyingTypeOrSelf(), TypeCompareKind.ConsiderEverything2)) 8241TypeSymbol.Equals((signature = compilation.builtInOperators.GetSignature(result)).LeftType, rightType.EnumUnderlyingTypeOrSelf(), TypeCompareKind.ConsiderEverything2)) 8246leftType.IsEnumType() && TypeSymbol.Equals(leftType, rightType, TypeCompareKind.ConsiderEverything2)) 8256leftType.IsEnumType() && TypeSymbol.Equals(leftType, rightType, TypeCompareKind.ConsiderEverything2)) 8263leftType.IsEnumType() && TypeSymbol.Equals(leftType, rightType, TypeCompareKind.ConsiderEverything2)) 8268leftType.IsDelegateType() && TypeSymbol.Equals(leftType, rightType, TypeCompareKind.ConsiderEverything2)) 8341!TypeSymbol.Equals(leftType, rightType, TypeCompareKind.ConsiderEverything2) &&
Semantics\OverloadResolutionTests.cs (23)
610var type = compilation.GetMember<FieldSymbol>("C.F0").Type; 611var normalized = type.NormalizeTaskTypes(compilation); 693var type = compilation.GetMember<FieldSymbol>("C.F0").Type; 694var normalized = type.NormalizeTaskTypes(compilation); 719private static NamedTypeSymbol GetUnderlyingTupleTypeRest(TypeSymbol type) 776var type = compilation.GetMember<FieldSymbol>("C.F0").Type; 777var normalized = type.NormalizeTaskTypes(compilation); 809var type = compilation.GetMember<FieldSymbol>("C.F0").Type; 810var normalized = type.NormalizeTaskTypes(compilation); 847var type = compilation.GetMember<FieldSymbol>("C.F0").Type; 848var normalized = type.NormalizeTaskTypes(compilation); 887var type = compilation.GetMember<FieldSymbol>($"C.{fieldName}").Type; 889var normalizedType = type.NormalizeTaskTypes(compilation); 934var type = compilation.GetMember<FieldSymbol>("C.F0").Type; 935var normalized = type.NormalizeTaskTypes(compilation); 977var type = compilation.GetMember<FieldSymbol>("C.F0").Type; 979var normalized = type.NormalizeTaskTypes(compilation); 1025var type = compilation.GetMember<FieldSymbol>("C.F0").Type; 1026var normalized = type.NormalizeTaskTypes(compilation); 1078var type = compilation.GetMember<FieldSymbol>("C.F0").Type; 1079var normalized = type.NormalizeTaskTypes(compilation); 1122var type = compilation.GetMember<FieldSymbol>("C.F").Type; 1123var 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)
3122var returnType = method.ReturnType; 3126var parameterType = method.GetParameterType(0); 5014var structType = compilation.GlobalNamespace.GetMember<TypeSymbol>("S"); 5081var structType = compilation.GlobalNamespace.GetMember<TypeSymbol>("S"); 6020var pointerType = methodSymbol.Parameters[0].Type; 7409var arraySymbol = compilation.GlobalNamespace.GetMember<TypeSymbol>("C").GetMember<FieldSymbol>("a"); 7478var arraySymbol = compilation.GlobalNamespace.GetMember<TypeSymbol>("C").GetMember<FieldSymbol>("a"); 9460var s = CreateCompilation(text).GlobalNamespace.GetMember<TypeSymbol>("S");
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (348)
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)
2726var hostTypeSymbol = comp.GetHostObjectTypeSymbol(); 2734var nestedTypeSymbol = (TypeSymbol)hostTypeSymbol.GetMember("NestedType"); 8444var 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(); 159var retval1 = asm2[1].GlobalNamespace.GetTypeMembers("Class4"). 190var retval2 = asm3[1].GlobalNamespace.GetTypeMembers("Class4"). 213var retval3 = type1.GetMembers("Foo1").OfType<MethodSymbol>().Single().ReturnType; 218var retval4 = type1.GetMembers("Foo2").OfType<MethodSymbol>().Single().ReturnType; 223var retval5 = type1.GetMembers("Foo3").OfType<MethodSymbol>().Single().ReturnType; 249var retval6 = asm4[1].GlobalNamespace.GetTypeMembers("Class4"). 276var retval7 = type2.GetMembers("Foo1").OfType<MethodSymbol>().Single().ReturnType; 281var retval8 = type2.GetMembers("Foo2").OfType<MethodSymbol>().Single().ReturnType; 286var retval9 = type2.GetMembers("Foo3").OfType<MethodSymbol>().Single().ReturnType; 301var retval10 = type3.GetMembers("Foo1").OfType<MethodSymbol>().Single().ReturnType; 306var retval11 = type3.GetMembers("Foo2").OfType<MethodSymbol>().Single().ReturnType; 311var retval12 = type3.GetMembers("Foo3").OfType<MethodSymbol>().Single().ReturnType; 316var retval13 = type3.GetMembers("Foo4").OfType<MethodSymbol>().Single().ReturnType; 321var retval14 = type3.GetMembers("Foo5").OfType<MethodSymbol>().Single().ReturnType; 367var retval15 = type4.GetMembers("Foo1").OfType<MethodSymbol>().Single().ReturnType; 371var retval16 = type4.GetMembers("Foo2").OfType<MethodSymbol>().Single().ReturnType; 375var retval17 = type4.GetMembers("Foo3").OfType<MethodSymbol>().Single().ReturnType; 390var retval18 = type5.GetMembers("Foo1").OfType<MethodSymbol>().Single().ReturnType; 394var retval19 = type5.GetMembers("Foo2").OfType<MethodSymbol>().Single().ReturnType; 398var retval20 = type5.GetMembers("Foo3").OfType<MethodSymbol>().Single().ReturnType; 402var retval21 = type5.GetMembers("Foo4").OfType<MethodSymbol>().Single().ReturnType; 407var retval22 = type5.GetMembers("Foo5").OfType<MethodSymbol>().Single().ReturnType; 742var retval1 = asm2[1].GlobalNamespace.GetTypeMembers("Class4"). 838var retval2 = asm3[1].GlobalNamespace.GetTypeMembers("Class4"). 861var retval3 = type1.GetMembers("Foo1").OfType<MethodSymbol>().Single().ReturnType; 866var retval4 = type1.GetMembers("Foo2").OfType<MethodSymbol>().Single().ReturnType; 871var retval5 = type1.GetMembers("Foo3").OfType<MethodSymbol>().Single().ReturnType; 979var retval6 = asm4[1].GlobalNamespace.GetTypeMembers("Class4"). 1006var retval7 = type2.GetMembers("Foo1").OfType<MethodSymbol>().Single().ReturnType; 1011var retval8 = type2.GetMembers("Foo2").OfType<MethodSymbol>().Single().ReturnType; 1016var retval9 = type2.GetMembers("Foo3").OfType<MethodSymbol>().Single().ReturnType; 1031var retval10 = type3.GetMembers("Foo1").OfType<MethodSymbol>().Single().ReturnType; 1036var retval11 = type3.GetMembers("Foo2").OfType<MethodSymbol>().Single().ReturnType; 1041var retval12 = type3.GetMembers("Foo3").OfType<MethodSymbol>().Single().ReturnType; 1046var retval13 = type3.GetMembers("Foo4").OfType<MethodSymbol>().Single().ReturnType; 1051var retval14 = type3.GetMembers("Foo5").OfType<MethodSymbol>().Single().ReturnType; 1095var retval15 = type4.GetMembers("Foo1").OfType<MethodSymbol>().Single().ReturnType; 1100var retval16 = type4.GetMembers("Foo2").OfType<MethodSymbol>().Single().ReturnType; 1104var retval17 = type4.GetMembers("Foo3").OfType<MethodSymbol>().Single().ReturnType; 1119var retval18 = type5.GetMembers("Foo1").OfType<MethodSymbol>().Single().ReturnType; 1123var retval19 = type5.GetMembers("Foo2").OfType<MethodSymbol>().Single().ReturnType; 1127var retval20 = type5.GetMembers("Foo3").OfType<MethodSymbol>().Single().ReturnType; 1131var retval21 = type5.GetMembers("Foo4").OfType<MethodSymbol>().Single().ReturnType; 1136var retval22 = type5.GetMembers("Foo5").OfType<MethodSymbol>().Single().ReturnType; 1449var retval1 = asm2[1].GlobalNamespace.GetTypeMembers("Class4"). 1508var retval2 = asm3[1].GlobalNamespace.GetTypeMembers("Class4"). 1535var retval3 = type1.GetMembers("Foo1").OfType<MethodSymbol>().Single().ReturnType; 1540var retval4 = type1.GetMembers("Foo2").OfType<MethodSymbol>().Single().ReturnType; 1545var retval5 = type1.GetMembers("Foo3").OfType<MethodSymbol>().Single().ReturnType; 1600var retval6 = asm4[1].GlobalNamespace.GetTypeMembers("Class4"). 1627var retval7 = type2.GetMembers("Foo1").OfType<MethodSymbol>().Single().ReturnType; 1632var retval8 = type2.GetMembers("Foo2").OfType<MethodSymbol>().Single().ReturnType; 1637var retval9 = type2.GetMembers("Foo3").OfType<MethodSymbol>().Single().ReturnType; 1652var retval10 = type3.GetMembers("Foo1").OfType<MethodSymbol>().Single().ReturnType; 1657var retval11 = type3.GetMembers("Foo2").OfType<MethodSymbol>().Single().ReturnType; 1662var retval12 = type3.GetMembers("Foo3").OfType<MethodSymbol>().Single().ReturnType; 1667var retval13 = type3.GetMembers("Foo4").OfType<MethodSymbol>().Single().ReturnType; 1672var retval14 = type3.GetMembers("Foo5").OfType<MethodSymbol>().Single().ReturnType; 1727var retval15 = type4.GetMembers("Foo1").OfType<MethodSymbol>().Single().ReturnType; 1736var retval16 = type4.GetMembers("Foo2").OfType<MethodSymbol>().Single().ReturnType; 1740var retval17 = type4.GetMembers("Foo3").OfType<MethodSymbol>().Single().ReturnType; 1755var retval18 = type5.GetMembers("Foo1").OfType<MethodSymbol>().Single().ReturnType; 1759var retval19 = type5.GetMembers("Foo2").OfType<MethodSymbol>().Single().ReturnType; 1763var retval20 = type5.GetMembers("Foo3").OfType<MethodSymbol>().Single().ReturnType; 1767var retval21 = type5.GetMembers("Foo4").OfType<MethodSymbol>().Single().ReturnType; 1772var retval22 = type5.GetMembers("Foo5").OfType<MethodSymbol>().Single().ReturnType; 2320var retval4 = foo1.ReturnType; 2519var retval5 = type3.GetMembers("Foo4").OfType<MethodSymbol>().Single().ReturnType; 2607return current is TypeSymbol type && type.TypeKind == kind;
Symbols\ConversionTests.cs (15)
27var types = new TypeSymbol[] 230var f1Type = ((FieldSymbol)(classX.ChildSymbol("f1"))).Type; 231var f2Type = ((FieldSymbol)(classX.ChildSymbol("f2"))).Type; 232var f3Type = ((FieldSymbol)(classX.ChildSymbol("f3"))).Type; 233var f4Type = ((FieldSymbol)(classX.ChildSymbol("f4"))).Type; 234var f5Type = ((FieldSymbol)(classX.ChildSymbol("f5"))).Type; 235var f6Type = ((FieldSymbol)(classX.ChildSymbol("f6"))).Type; 236var f7Type = ((FieldSymbol)(classX.ChildSymbol("f7"))).Type; 237var f8Type = ((FieldSymbol)(classX.ChildSymbol("f8"))).Type; 238var f9Type = ((FieldSymbol)(classX.ChildSymbol("f9"))).Type; 239var f10Type = ((FieldSymbol)(classX.ChildSymbol("f10"))).Type; 240var g1Type = ((FieldSymbol)(classI.ChildSymbol("g1"))).Type; 241var g2Type = ((FieldSymbol)(classI.ChildSymbol("g2"))).Type; 306var typeIntArray = classC.GetMember<FieldSymbol>("a").Type; 309var 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)
2637static 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; 1522var f1 = c.GetField("Field1").Type; 1523var f2 = c.GetField("Field2").Type;
Symbols\GenericConstraintTests.cs (3)
3414var constraintType = ((SourceOrdinaryMethodSymbol)m).TypeParameters[0].ConstraintTypesNoUseSiteDiagnostics[0].Type; 4930private void CheckTypeParameterContainingSymbols(MethodSymbol containingMethod, TypeSymbol type, int nReferencesExpected) 6602TypeSymbol typeSymbol = tokenDecoder.GetTypeOfToken(constraintTypeHandle);
Symbols\IndexerTests.cs (3)
2558Assert.True(((TypeSymbol)compilation.GlobalNamespace.GetTypeMembers("C").Single()).GetMembers().Any(x => x.IsIndexer())); 2562Assert.True(((TypeSymbol)compilation.GlobalNamespace.GetTypeMembers("C").Single()).GetMembers().Any(x => x.IsIndexer())); 2639var 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 (3)
245internal override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol> basesBeingResolved) 255internal override NamedTypeSymbol GetDeclaredBaseType(ConsList<TypeSymbol> basesBeingResolved) 260internal override ImmutableArray<NamedTypeSymbol> GetDeclaredInterfaces(ConsList<TypeSymbol> basesBeingResolved)
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)
2057Assert.Equal("Pia", ((TypeSymbol)args[0].ValueInternal).ContainingAssembly.Name); 2072Assert.Equal("Pia", ((TypeSymbol)args[0].ValueInternal).ContainingAssembly.Name); 2087Assert.Equal("Pia", ((TypeSymbol)args[0].ValueInternal).ContainingAssembly.Name); 2102Assert.Equal("Pia", ((TypeSymbol)args[0].ValueInternal).ContainingAssembly.Name); 2182Assert.Equal("Pia", ((TypeSymbol)args[0].ValueInternal).ContainingAssembly.Name); 2197Assert.Equal("Pia", ((TypeSymbol)args[0].ValueInternal).ContainingAssembly.Name); 2212Assert.Equal("Pia", ((TypeSymbol)args[0].ValueInternal).ContainingAssembly.Name); 2227Assert.Equal("Pia", ((TypeSymbol)args[0].ValueInternal).ContainingAssembly.Name); 2307Assert.Equal("LocalTypes2", ((TypeSymbol)args[0].ValueInternal).ContainingAssembly.Name); 2308Assert.Equal("LocalTypes2", ((TypeSymbol)args[1].ValueInternal).ContainingAssembly.Name); 2322Assert.Equal("LocalTypes2", ((TypeSymbol)args[0].ValueInternal).ContainingAssembly.Name); 2323Assert.Equal("LocalTypes2", ((TypeSymbol)args[1].ValueInternal).ContainingAssembly.Name); 2337Assert.Equal("LocalTypes2", ((TypeSymbol)args[0].ValueInternal).ContainingAssembly.Name); 2338Assert.Equal("LocalTypes2", ((TypeSymbol)args[1].ValueInternal).ContainingAssembly.Name); 2352Assert.Equal("LocalTypes2", ((TypeSymbol)args[0].ValueInternal).ContainingAssembly.Name); 2353Assert.Equal("LocalTypes2", ((TypeSymbol)args[1].ValueInternal).ContainingAssembly.Name); 2419Assert.Equal("Pia", ((TypeSymbol)args[0].ValueInternal).ContainingAssembly.Name); 2434Assert.Equal("Pia", ((TypeSymbol)args[0].ValueInternal).ContainingAssembly.Name); 2515Assert.Equal("Pia", ((TypeSymbol)args[0].ValueInternal).ContainingAssembly.Name); 2530Assert.Equal("Pia", ((TypeSymbol)args[0].ValueInternal).ContainingAssembly.Name); 2545Assert.Equal("Pia", ((TypeSymbol)args[0].ValueInternal).ContainingAssembly.Name); 2560Assert.Equal("Pia", ((TypeSymbol)args[0].ValueInternal).ContainingAssembly.Name);
Symbols\Retargeting\RetargetCustomAttributes.cs (4)
92m => ((MethodSymbol)m).ParameterCount == 1 && TypeSymbol.Equals(((MethodSymbol)m).GetParameterType(0), oldMsCorLib_systemType, TypeCompareKind.ConsiderEverything2)); 95m => ((MethodSymbol)m).ParameterCount == 1 && TypeSymbol.Equals(((MethodSymbol)m).GetParameterType(0), newMsCorLib_systemType, TypeCompareKind.ConsiderEverything2)); 127TestAttributeRetargeting(symbol.GetReturnTypeAttributes().Where(a => TypeSymbol.Equals(a.AttributeClass, newMsCorLib_debuggerTypeProxyAttributeType, TypeCompareKind.ConsiderEverything2))); 130Assert.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)
1339var 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)
1987var paramType = s.GetParameters().Single().Type; 1988var 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\MethodTests.cs (3)
193var t2 = element.Type; 366var refP = p1.Type; 374var outP = p2.Type;
Symbols\Source\PropertyTests.cs (1)
1876var 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)
16827var fieldType = fieldSym.Type; 16864var fieldType = fieldSym.Type; 16872Assert.True((TypeSymbol.Equals(classBinN1, (TypeSymbol)errorFieldType.CandidateSymbols[0], TypeCompareKind.ConsiderEverything2) && TypeSymbol.Equals(classBinN2, (TypeSymbol)errorFieldType.CandidateSymbols[1], TypeCompareKind.ConsiderEverything2)) || 16873(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 (23)
41var arr = x.Type; 67var xtype1 = (b1.GetMembers("X")[0] as FieldSymbol).Type; // Types using them are the same too 68var xtype2 = (b2.GetMembers("X")[0] as FieldSymbol).Type; 486var elemType2 = (field1 as FieldSymbol).Type; 496var retType = (method as MethodSymbol).ReturnType; 542var sym1 = (classTest.GetMembers("AryField").First() as FieldSymbol).Type; 571var sym2 = (classTest.GetMembers("AryField2").First() as FieldSymbol).Type; 590var sym1 = (classTest.GetMembers().First() as FieldSymbol).Type; 596var sym2 = (classTest.GetMembers("AryField2").First() as FieldSymbol).Type; 602var sym3 = (classTest.GetMembers("AryField3").First() as FieldSymbol).Type; 625var f1 = (m as FieldSymbol).Type; 642var objType = (obj as FieldSymbol).Type; 650var dynType = (obj as FieldSymbol).Type; 1365private static TypeSymbol ExtractErrorGuess(NamedTypeSymbol typeSymbol) 1506var memType = (mem as FieldSymbol).Type; 1510var underType = memType.GetNullableUnderlyingType(); 1613var deleType = (mem as EventSymbol).Type; 1615var memType = deleType.DelegateInvokeMethod().ReturnType; 1632var underType = memType.GetNullableUnderlyingType(); 1802var Dynamic = (Goo.GetMembers("X")[0] as FieldSymbol).Type; 1803var Object = (Goo.GetMembers("Y")[0] as FieldSymbol).Type; 1804var Func_Dynamic = (Goo.GetMembers("Z")[0] as FieldSymbol).Type; 1805var Func_Object = (Goo.GetMembers("W")[0] as FieldSymbol).Type;
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)
1871private static ImmutableArray<ILVisualizer.LocalInfo> ToLocalDefinitions(ImmutableArray<LocalInfo<TypeSymbol>> localInfos, ILBuilder builder) 1881var typeRef = localInfos[i].Type;
Extensions.cs (19)
329return @this.GetAttributes().Where(a => TypeSymbol.Equals(a.AttributeClass, c, TypeCompareKind.ConsiderEverything2)); 344return @this.GetAttributes().Where(a => TypeSymbol.Equals(a.AttributeClass, c, TypeCompareKind.ConsiderEverything2)).First(); 391var typeSym = arg.ValueInternal as TypeSymbol; 397var expTypeSym = expected as TypeSymbol; 429private static bool IsEqual(TypeSymbol typeSym, Type expType) 532var propertyOrEventType = propertyOrEvent.GetTypeOrReturnType().Type; 629public static NamedTypeSymbol BaseType(this TypeSymbol symbol) 634public static ImmutableArray<NamedTypeSymbol> Interfaces(this TypeSymbol symbol) 639public static ImmutableArray<NamedTypeSymbol> AllInterfaces(this TypeSymbol symbol) 644public static ImmutableArray<TypeSymbol> TypeArguments(this NamedTypeSymbol symbol) 649public static ImmutableArray<TypeSymbol> ConstraintTypes(this TypeParameterSymbol symbol) 747ImmutableArray<TypeSymbol> elementTypes, 755public static INamedTypeSymbol Construct(this INamedTypeSymbol definition, params TypeSymbol[] typeArguments) 847public static Conversion ClassifyConversionFromType(this ConversionsBase conversions, TypeSymbol source, TypeSymbol destination, ref HashSet<DiagnosticInfo> useSiteDiagnostics, bool forCast = false) 870public static Conversion ClassifyConversionFromExpression(this Conversions conversions, BoundExpression sourceExpression, TypeSymbol destination, ref HashSet<DiagnosticInfo> useSiteDiagnostics, bool forCast = false) 884ConsList<TypeSymbol> basesBeingResolved,
FunctionPointerUtilities.cs (13)
269public static void VerifyFunctionPointerSymbol(TypeSymbol type, CallingConvention expectedConvention, (RefKind RefKind, Action<TypeSymbol> TypeVerifier) returnVerifier, params (RefKind RefKind, Action<TypeSymbol> TypeVerifier)[] argumentVerifiers) 330public static Action<TypeSymbol> IsVoidType() => typeSymbol => Assert.True(typeSymbol.IsVoidType()); 332public static Action<TypeSymbol> IsSpecialType(SpecialType specialType) 335public static Action<TypeSymbol> IsTypeName(string typeName) 338public static Action<TypeSymbol> IsArrayType(Action<TypeSymbol> arrayTypeVerifier) 345public static Action<TypeSymbol> IsUnsupportedType() 348public static Action<TypeSymbol> IsFunctionPointerTypeSymbol(CallingConvention callingConvention, (RefKind, Action<TypeSymbol>) returnVerifier, params (RefKind, Action<TypeSymbol>)[] argumentVerifiers) 351public 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");