Binder\Binder_Await.cs (12)
41TypeSymbol awaitExpressionType = (info.GetResult ?? info.RuntimeAsyncAwaitCall?.Method)?.ReturnType ?? (hasErrors ? CreateErrorType() : Compilation.DynamicType);
87var type = expression.Type;
269Debug.Assert(TypeSymbol.Equals(expression.Type, getAwaiterArgument.Type, TypeCompareKind.ConsiderEverything));
305TypeSymbol awaiterType = getAwaiter.Type!;
429var unsubstitutedReturnType = method.ReturnType;
457static bool isValidConversion(TypeSymbol exprType, MethodSymbol method, SyntaxNode node, BindingDiagnosticBag diagnostics, Binder @this, out Conversion conversion)
475bool getRuntimeAwaitAwaiter(TypeSymbol awaiterType, out BoundCall? runtimeAwaitAwaiterCall, out BoundAwaitableValuePlaceholder? placeholder, SyntaxNode syntax, BindingDiagnosticBag diagnostics)
617private bool GetIsCompletedProperty(TypeSymbol awaiterType, SyntaxNode node, TypeSymbol awaitedExpressionType, BindingDiagnosticBag diagnostics, [NotNullWhen(true)] out PropertySymbol? isCompletedProperty)
660private bool AwaiterImplementsINotifyCompletion(TypeSymbol awaiterType, SyntaxNode node, BindingDiagnosticBag diagnostics)
684private bool GetGetResultMethod(BoundExpression awaiterExpression, SyntaxNode node, TypeSymbol awaitedExpressionType, BindingDiagnosticBag diagnostics, out MethodSymbol? getResultMethod, [NotNullWhen(true)] out BoundExpression? getAwaiterGetResultCall)
686var awaiterType = awaiterExpression.Type;
Binder\Binder_Conversions.cs (74)
22TypeSymbol destination,
35TypeSymbol destination,
47TypeSymbol destination,
60TypeSymbol destination,
102TypeSymbol destination,
211TypeSymbol? type = source.Type;
300void reportUseSiteDiagnostics(SyntaxNode syntax, Conversion conversion, BoundExpression source, TypeSymbol destination, BindingDiagnosticBag diagnostics)
314void ensureAllUnderlyingConversionsChecked(SyntaxNode syntax, BoundExpression source, Conversion conversion, bool wasCompilerGenerated, TypeSymbol destination, BindingDiagnosticBag diagnostics)
407void checkConstraintLanguageVersionAndRuntimeSupportForConversion(SyntaxNode syntax, Conversion conversion, BoundExpression source, TypeSymbol destination, BindingDiagnosticBag diagnostics)
525TypeSymbol sourceForCastUp = source.Type.IsSpan()
574internal static MethodSymbol? TryFindImplicitOperatorFromArray(TypeSymbol type)
584internal static MethodSymbol? TryFindImplicitOperatorFromSpan(TypeSymbol spanType, TypeSymbol readonlySpanType)
594private static MethodSymbol? TryFindImplicitOperator<TArg>(TypeSymbol type, TArg arg,
607internal static bool NeedsSpanCastUp(TypeSymbol source, TypeSymbol destination)
613var sourceElementType = ((NamedTypeSymbol)source).TypeArgumentsWithAnnotationsNoUseSiteDiagnostics[0].Type;
614var destinationElementType = ((NamedTypeSymbol)destination).TypeArgumentsWithAnnotationsNoUseSiteDiagnostics[0].Type;
624internal static MethodSymbol? TryFindCastUpMethod(TypeSymbol source, TypeSymbol destination)
652internal static MethodSymbol? TryFindAsSpanCharMethod(CSharpCompilation compilation, TypeSymbol readOnlySpanType)
686private static MethodSymbol? TryFindSingleMethod<TArg>(TypeSymbol type, string name, TArg arg, Func<TArg, MethodSymbol, bool> predicate)
707private BoundExpression BindUnconvertedInterpolatedExpressionToFormattableStringFactory(BoundUnconvertedInterpolatedString unconvertedSource, TypeSymbol destination, BindingDiagnosticBag diagnostics)
729private static void CheckInlineArrayTypeIsSupported(SyntaxNode syntax, TypeSymbol inlineArrayType, TypeSymbol elementType, BindingDiagnosticBag diagnostics)
742SyntaxNode syntax, BoundUnconvertedObjectCreationExpression node, Conversion conversion, bool isCast, TypeSymbol destination,
776TypeSymbol type, AnalyzedArguments arguments, BindingDiagnosticBag diagnostics)
809TypeSymbol targetType,
820var collectionTypeKind = conversion.GetCollectionExpressionTypeKind(out var elementType, out MethodSymbol? constructor, out bool isExpanded);
857collectionBuilderMethod = GetAndValidateCollectionBuilderMethod(syntax, namedType, diagnostics, out var updatedElementType);
986BoundNode bindSpreadElement(BoundCollectionExpressionSpreadElement element, TypeSymbol elementType, Conversion elementConversion, BindingDiagnosticBag diagnostics)
1014private bool HasCollectionInitializerTypeInProgress(SyntaxNode syntax, TypeSymbol targetType)
1036out TypeSymbol? elementType)
1039bool result = namedType.HasCollectionBuilderAttribute(out TypeSymbol? builderType, out string? methodName);
1077internal BoundExpression BindCollectionExpressionConstructor(SyntaxNode syntax, TypeSymbol targetType, MethodSymbol? constructor, BindingDiagnosticBag diagnostics)
1107internal bool HasCollectionExpressionApplicableConstructor(SyntaxNode syntax, TypeSymbol targetType, out MethodSymbol? constructor, out bool isExpanded, BindingDiagnosticBag diagnostics, bool isParamsModifierValidation = false)
1239internal bool HasCollectionExpressionApplicableAddMethod(SyntaxNode syntax, TypeSymbol targetType, out ImmutableArray<MethodSymbol> addMethods, BindingDiagnosticBag diagnostics)
1492TypeSymbol? receiverType = methodGroup.ReceiverOpt.Type;
1529TypeSymbol secondArgumentType = (constructed ?? member).Parameters[1].Type;
1689internal bool TryGetCollectionIterationType(SyntaxNode syntax, TypeSymbol collectionType, out TypeWithAnnotations iterationType)
1712TypeSymbol targetType,
1743TypeSymbol targetType,
1772var elementType = elementTypeWithAnnotations.Type;
1833TypeSymbol elementTypeOriginalDefinition,
1834TypeSymbol? builderType,
1893var spanTypeArg = ((NamedTypeSymbol)methodWithTargetTypeParameters.Parameters[0].Type).TypeArgumentsWithAnnotationsNoUseSiteDiagnostics[0].Type;
1924TypeSymbol destination,
1965private BoundExpression ConvertSwitchExpression(BoundUnconvertedSwitchExpression source, TypeSymbol destination, Conversion? conversionIfTargetTyped, BindingDiagnosticBag diagnostics, bool hasErrors = false)
1998TypeSymbol destination,
2064TypeSymbol conversionParameterType = conversion.BestUserDefinedConversionAnalysis.Operator.GetParameterType(0);
2068!TypeSymbol.Equals(conversion.BestUserDefinedConversionAnalysis.FromType, conversionParameterType, TypeCompareKind.ConsiderEverything2))
2084TypeSymbol conversionReturnType = conversion.BestUserDefinedConversionAnalysis.Operator.ReturnType;
2085TypeSymbol conversionToType = conversion.BestUserDefinedConversionAnalysis.ToType;
2089!TypeSymbol.Equals(conversionToType, conversionReturnType, TypeCompareKind.ConsiderEverything2))
2104if (conversionToType.IsNullableType() && TypeSymbol.Equals(conversionToType.GetNullableUnderlyingType(), conversionReturnType, TypeCompareKind.ConsiderEverything2))
2163private BoundExpression CreateFunctionTypeConversion(SyntaxNode syntax, BoundExpression source, Conversion conversion, bool isCast, ConversionGroup? conversionGroup, TypeSymbol destination, BindingDiagnosticBag diagnostics)
2211private BoundExpression CreateAnonymousFunctionConversion(SyntaxNode syntax, BoundExpression source, Conversion conversion, bool isCast, ConversionGroup? conversionGroup, TypeSymbol destination, BindingDiagnosticBag diagnostics)
2238private BoundExpression CreateMethodGroupConversion(SyntaxNode syntax, BoundExpression source, Conversion conversion, bool isCast, ConversionGroup? conversionGroup, TypeSymbol destination, BindingDiagnosticBag diagnostics)
2260private static void CheckParameterModifierMismatchMethodConversion(SyntaxNode syntax, MethodSymbol lambdaOrMethod, TypeSymbol targetType, bool invokedAsExtensionMethod, BindingDiagnosticBag diagnostics)
2308private static void CheckLambdaConversion(LambdaSymbol lambdaSymbol, TypeSymbol targetType, BindingDiagnosticBag diagnostics)
2396private BoundExpression CreateStackAllocConversion(SyntaxNode syntax, BoundExpression source, Conversion conversion, bool isCast, ConversionGroup? conversionGroup, TypeSymbol destination, BindingDiagnosticBag diagnostics)
2401var elementType = boundStackAlloc.ElementType;
2402TypeSymbol stackAllocType;
2424private BoundExpression CreateTupleLiteralConversion(SyntaxNode syntax, BoundTupleLiteral sourceTuple, Conversion conversion, bool isCast, ConversionGroup? conversionGroup, TypeSymbol destination, BindingDiagnosticBag diagnostics)
2430var destinationWithoutNullable = destination;
2500if (!TypeSymbol.Equals(sourceTuple.Type, destination, TypeCompareKind.ConsiderEverything2))
2808internal bool MethodIsCompatibleWithDelegateOrFunctionPointer(BoundExpression? receiverOpt, bool isExtensionMethod, MethodSymbol method, TypeSymbol delegateType, Location errorLocation, BindingDiagnosticBag diagnostics)
2880var methodReturnType = method.ReturnType;
2881var delegateReturnType = delegateOrFuncPtrMethod.ReturnType;
2927static bool hasConversion(TypeKind targetKind, Conversions conversions, TypeSymbol source, TypeSymbol destination,
2997TypeSymbol delegateOrFuncPtrType,
3093TypeSymbol destination,
3194TypeSymbol destination,
Binder\Binder_Crefs.cs (7)
497TypeSymbol returnType = BindCrefParameterOrReturnType(syntax.Type, syntax, diagnostics);
501symbol.Kind != SymbolKind.Method || TypeSymbol.Equals(((MethodSymbol)symbol).ReturnType, returnType, TypeCompareKind.ConsiderEverything2), returnType);
619if (containerType.Name == memberName && (hasParameterList || containerType.Arity == 0 || !TypeSymbol.Equals(this.ContainingType, containerType.OriginalDefinition, TypeCompareKind.ConsiderEverything2)))
750private static bool ContainsNestedTypeOfUnconstructedGenericType(TypeSymbol type)
1141TypeSymbol type = BindCrefParameterOrReturnType(parameter.Type, (MemberCrefSyntax)parameterListSyntax.Parent, diagnostics);
1152private TypeSymbol BindCrefParameterOrReturnType(TypeSyntax typeSyntax, MemberCrefSyntax memberCrefSyntax, BindingDiagnosticBag diagnostics)
1172TypeSymbol type = parameterOrReturnTypeBinder.BindType(typeSyntax, localDiagnostics).Type;
Binder\Binder_Deconstruct.cs (11)
128var type = boundRHS.Type ?? voidType;
159TypeSymbol returnType = hasErrors ? CreateErrorType() : lhsTuple.Type!;
220TypeSymbol? mergedTupleType = MakeMergedTupleType(checkedVariables, (BoundTupleLiteral)boundRHS, syntax, hadErrors ? null : diagnostics);
243TypeSymbol type,
251ImmutableArray<TypeSymbol> tupleOrDeconstructedTypes;
349private void SetInferredTypes(ArrayBuilder<DeconstructionVariable> variables, ImmutableArray<TypeSymbol> foundTypes, BindingDiagnosticBag diagnostics)
367private BoundExpression SetInferredType(BoundExpression expression, TypeSymbol type, BindingDiagnosticBag diagnostics)
471private TypeSymbol? MakeMergedTupleType(ArrayBuilder<DeconstructionVariable> lhsVariables, BoundTupleLiteral rhsLiteral, CSharpSyntaxNode syntax, BindingDiagnosticBag? diagnostics)
481TypeSymbol? mergedType = element.Type;
856var type = declTypeWithAnnotations.Type;
951Debug.Assert(TypeSymbol.Equals(declTypeWithAnnotations.Type, fieldType.Type, TypeCompareKind.ConsiderEverything2));
Binder\Binder_Expressions.cs (120)
205TypeSymbol resultType = expr.Type;
270internal BoundExpression BindToTypeForErrorRecovery(BoundExpression expression, TypeSymbol type = null)
298var commonType = expr.Type;
312TypeSymbol type = op.Type;
473TypeSymbol varType,
571TypeSymbol exprType = expr.Type;
851internal virtual BoundSwitchExpressionArm BindSwitchExpressionArm(SwitchExpressionArmSyntax node, TypeSymbol switchGoverningType, BindingDiagnosticBag diagnostics)
1228TypeSymbol typedReferenceType = this.Compilation.GetSpecialType(SpecialType.System_TypedReference);
1252TypeSymbol typedReferenceType = GetSpecialType(SpecialType.System_TypedReference, diagnostics, node);
1276TypeSymbol typedReferenceType = this.Compilation.GetSpecialType(SpecialType.System_TypedReference);
1277TypeSymbol typeType = this.GetWellKnownType(WellKnownType.System_Type, diagnostics, node);
1318TypeSymbol runtimeArgumentHandleType = GetSpecialType(SpecialType.System_RuntimeArgumentHandle, diagnostics, node);
1382TypeSymbol type = typeWithAnnotations.Type;
1410var type = typeWithAnnotations.Type;
1435TypeSymbol type = typeWithAnnotations.Type;
1552internal static bool CheckManagedAddr(CSharpCompilation compilation, TypeSymbol type, Location location, BindingDiagnosticBag diagnostics, bool errorForManaged = false)
1562internal static bool CheckManagedAddr(CSharpCompilation compilation, TypeSymbol type, ManagedKind managedKind, Location location, BindingDiagnosticBag diagnostics, bool errorForManaged = false)
1586internal static ConstantValue GetConstantSizeOf(TypeSymbol type)
1597TypeSymbol type = typeWithAnnotations.Type;
1995private bool IsBadLocalOrParameterCapture(Symbol symbol, TypeSymbol type, RefKind refKind)
2025TypeSymbol type;
2233return new BoundTypeExpression(node, null, (TypeSymbol)symbol, hasErrors: isError);
2261TypeSymbol typeSymbol => new BoundTypeExpression(node, alias, typeSymbol, hasErrors: isError),
2403TypeSymbol hostObjectType = Compilation.GetHostObjectTypeSymbol();
2508var type = symbol as TypeSymbol;
2579TypeSymbol baseType = this.ContainingType is null ? null : this.ContainingType.BaseTypeNoUseSiteDiagnostics;
2611TypeSymbol targetType = targetTypeWithAnnotations.Type;
2617!TypeSymbol.Equals(targetType.GetNullableUnderlyingType(), operand.Type, TypeCompareKind.ConsiderEverything2))
2635TypeSymbol intType = GetSpecialType(SpecialType.System_Int32, diagnostics, node);
2636TypeSymbol indexType = GetWellKnownType(WellKnownType.System_Index, diagnostics, node);
2672TypeSymbol rangeType = GetWellKnownType(WellKnownType.System_Range, diagnostics, node);
2743TypeSymbol indexType = GetWellKnownType(WellKnownType.System_Index, diagnostics, operand);
2773TypeSymbol targetType = targetTypeWithAnnotations.Type;
2794TypeSymbol targetType)
2931var targetElementType = targetElementTypesWithAnnotations[i].Type;
3203var type = declType.Type;
3303TypeSymbol fieldType = expressionVariableField.GetFieldType(this.FieldsBeingBound).Type;
3317internal static void CheckRestrictedTypeInAsyncMethod(Symbol containingSymbol, TypeSymbol type, BindingDiagnosticBag diagnostics, SyntaxNode syntax)
3690TypeSymbol handlerType,
3808TypeSymbol placeholderType;
4156TypeSymbol bestType = BestTypeInferrer.InferBestType(boundInitializerExpressions, this.Conversions, ref useSiteInfo, out _);
4183TypeSymbol bestType = BestTypeInferrer.InferBestType(boundInitializerExpressions, this.Conversions, ref useSiteInfo, out _);
4311TypeSymbol elemType = type.ElementType;
4549TypeSymbol type = GetStackAllocType(node, elementType, diagnostics, out bool hasErrors);
4632private TypeSymbol GetStackAllocType(SyntaxNode node, TypeWithAnnotations elementTypeWithAnnotations, BindingDiagnosticBag diagnostics, out bool hasErrors)
4692TypeSymbol type,
4693TypeSymbol elementType,
4872TypeSymbol constructorReturnType = constructor.ReturnType;
4997TypeSymbol constructorReturnType,
5229var type = typeWithAnnotations.Type;
5230var originalType = type;
5337var collectionType = enumeratorInfo.CollectionType;
5549private BoundExpression BindClassCreationExpression(ObjectCreationExpressionSyntax node, NamedTypeSymbol type, string typeName, BindingDiagnosticBag diagnostics, TypeSymbol initializerType = null)
5622private BoundExpression MakeBadExpressionForObjectCreation(ObjectCreationExpressionSyntax node, TypeSymbol type, AnalyzedArguments analyzedArguments, BindingDiagnosticBag diagnostics, bool wasCompilerGenerated = false)
5628private BoundExpression MakeBadExpressionForObjectCreation(SyntaxNode node, TypeSymbol type, AnalyzedArguments analyzedArguments, InitializerExpressionSyntax? initializerOpt, SyntaxNode? typeSyntax, BindingDiagnosticBag diagnostics, bool wasCompilerGenerated = false)
5648TypeSymbol type,
5680TypeSymbol type,
5702TypeSymbol initializerType,
5872var initializerType = implicitReceiver.Type;
6275TypeSymbol initializerType,
6329private bool CollectionInitializerTypeImplementsIEnumerable(TypeSymbol initializerType, CSharpSyntaxNode node, BindingDiagnosticBag diagnostics)
6367TypeSymbol initializerType,
6711TypeSymbol initializerTypeOpt = null,
6806TypeSymbol initializerTypeOpt,
6892TypeSymbol initializerTypeOpt,
6946private BoundObjectInitializerExpressionBase MakeBoundInitializerOpt(SyntaxNode typeNode, NamedTypeSymbol type, InitializerExpressionSyntax initializerSyntaxOpt, TypeSymbol initializerTypeOpt, BindingDiagnosticBag diagnostics)
6999Debug.Assert(TypeSymbol.Equals(interfaceType.ComImportCoClass, coClassType, TypeCompareKind.ConsiderEverything2));
7397TypeSymbol type = null;
7483TypeSymbol pointedAtType;
7560var leftType = boundValue.Type;
7568if (TypeSymbol.Equals(boundType.Type, leftType, TypeCompareKind.AllIgnoreOptions))
7595private bool IsPotentialColorColorReceiver(IdentifierNameSyntax id, TypeSymbol type)
7600TypeSymbol.Equals(BindNamespaceOrType(id, BindingDiagnosticBag.Discarded).Type, type, TypeCompareKind.AllIgnoreOptions);
7704TypeSymbol leftType = boundLeft.Type;
7919TypeSymbol leftType,
8112var leftType = boundLeft.Type;
8195private void LookupInstanceMember(LookupResult lookupResult, TypeSymbol leftType, bool leftIsBaseReference, string rightName, int rightArity, bool invoked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
8269private bool WouldUsingSystemFindExtension(TypeSymbol receiver, string methodName)
8281private bool ImplementsWinRTAsyncInterface(TypeSymbol type)
8286private bool IsWinRTAsyncInterface(TypeSymbol type)
8295TypeSymbol.Equals(namedType, Compilation.GetWellKnownType(WellKnownType.Windows_Foundation_IAsyncAction), TypeCompareKind.ConsiderEverything2) ||
8296TypeSymbol.Equals(namedType, Compilation.GetWellKnownType(WellKnownType.Windows_Foundation_IAsyncActionWithProgress_T), TypeCompareKind.ConsiderEverything2) ||
8297TypeSymbol.Equals(namedType, Compilation.GetWellKnownType(WellKnownType.Windows_Foundation_IAsyncOperation_T), TypeCompareKind.ConsiderEverything2) ||
8298TypeSymbol.Equals(namedType, Compilation.GetWellKnownType(WellKnownType.Windows_Foundation_IAsyncOperationWithProgress_T2), TypeCompareKind.ConsiderEverything2);
8357private TypeSymbol GetNonMethodMemberType(Symbol symbolOpt)
8359TypeSymbol resultType = null;
8559TypeSymbol? returnType,
8639TypeSymbol? returnType,
8746TypeSymbol? returnType,
8766TypeSymbol? receiverType = left.Type;
8865static MethodGroupResolution makeErrorResult(TypeSymbol receiverType, string memberName, int arity, LookupResult lookupResult, SyntaxNode expression, BindingDiagnosticBag diagnostics)
8919TypeSymbol receiverType = receiver.Type;
8987TypeSymbol fieldType = fieldSymbol.GetFieldType(this.FieldsBeingBound).Type;
9070Debug.Assert(symbol is not TypeSymbol);
9118return !symbol.IsStatic && !(symbol is TypeSymbol) &&
9400if (!TypeSymbol.IsInlineArrayElementFieldSupported(elementField))
9425{ Code: (int)ErrorCode.ERR_BadIndexLHS, Arguments: [TypeSymbol type] } && type.Equals(expr.Type, TypeCompareKind.ConsiderEverything))
9562TypeSymbol resultType;
9603if (TypeSymbol.Equals(convertedIndex.Type, compilation.GetWellKnownType(WellKnownType.System_Index), TypeCompareKind.AllIgnoreOptions))
9654var exprType = expr.Type;
9735TypeSymbol resultType = indexOrRangeWellknownType == WellKnownType.System_Range
9831TypeSymbol type = GetWellKnownType(wellKnownType, ref useSiteInfo);
9853TypeSymbol type = GetSpecialType(specialType, attemptDiagnostics, node);
9866private BoundExpression TryImplicitConversionToArrayIndex(BoundExpression expr, TypeSymbol targetType, SyntaxNode node, BindingDiagnosticBag diagnostics)
9910TypeSymbol pointedAtType = pointerType.PointedAtType;
10276var argType = argument.Type;
10278TypeSymbol.Equals(argType, Compilation.GetWellKnownType(WellKnownType.System_Index), TypeCompareKind.ConsiderEverything) ? ThreeState.True :
10279TypeSymbol.Equals(argType, Compilation.GetWellKnownType(WellKnownType.System_Range), TypeCompareKind.ConsiderEverything) ? ThreeState.False :
10541TypeSymbol receiverType,
10592TypeSymbol propertyType = GetCommonTypeOrReturnType(propertyGroup) ?? CreateErrorType();
10619TypeSymbol returnType = null,
10643TypeSymbol returnType = null,
10675TypeSymbol returnType = null,
10746TypeSymbol returnType = null,
11315internal static bool ReportDelegateInvokeUseSiteDiagnostic(BindingDiagnosticBag diagnostics, TypeSymbol possibleDelegateType,
11371var receiverType = receiver.Type;
11380var accessType = access.Type;
11516var receiverType = receiver.Type;
11547var receiverType = receiver.Type;
Binder\Binder_InterpolatedString.cs (6)
336TypeSymbol destination,
519Func<BoundUnconvertedInterpolatedString, int, (ImmutableArray<ImmutableArray<BoundExpression>>, TypeSymbol), BoundExpression> interpolationFactory =
521Func<BoundBinaryOperator, BoundExpression, BoundExpression, (ImmutableArray<ImmutableArray<BoundExpression>>, TypeSymbol), BoundExpression> binaryOperatorFactory =
528static BoundInterpolatedString createInterpolation(BoundUnconvertedInterpolatedString expression, int i, (ImmutableArray<ImmutableArray<BoundExpression>> AppendCalls, TypeSymbol _) arg)
540static BoundBinaryOperator createBinaryOperator(BoundBinaryOperator original, BoundExpression left, BoundExpression right, (ImmutableArray<ImmutableArray<BoundExpression>> _, TypeSymbol @string) arg)
674TypeSymbol objectType = GetSpecialType(SpecialType.System_Object, diagnostics, syntax);
Binder\Binder_Invocation.cs (23)
276TypeSymbol objType = GetSpecialType(SpecialType.System_Object, diagnostics, node);
1089if (call.ReceiverOpt.Type.IsRestrictedType() && !call.Method.ContainingType.IsInterface && !TypeSymbol.Equals(call.Method.ContainingType, call.ReceiverOpt.Type, TypeCompareKind.ConsiderEverything2))
1224var returnType = methodResult.Member.ReturnType;
1445var parameterType = parameter.Type;
1682TypeSymbol parameterType = parameter.Type;
1751TypeSymbol constantType = Compilation.GetSpecialType(defaultConstantValue.SpecialType);
1852TypeSymbol collectionType = paramsParameter.Type;
1857TypeSymbol int32Type = GetSpecialType(SpecialType.System_Int32, diagnostics, node);
1922TypeSymbol.Equals(containingMethod.ContainingType, method.ContainingType, TypeCompareKind.ConsiderEverything) &&
2089var returnType = GetCommonTypeOrReturnType(methods) ?? new ExtendedErrorTypeSymbol(this.Compilation, string.Empty, arity: 0, errorInfo: null);
2090var methodContainer = (object)receiver != null && (object)receiver.Type != null
2195var parameterType = GetCorrespondingParameterType(analyzedArguments, i, parameterList);
2217var candidateType = getCorrespondingParameterType(i);
2264TypeSymbol getCorrespondingParameterType(int i)
2267TypeSymbol candidateType = null;
2270var parameterType = GetCorrespondingParameterType(analyzedArguments, i, parameterList);
2298private static TypeSymbol GetCorrespondingParameterType(AnalyzedArguments analyzedArguments, int i, ImmutableArray<ParameterSymbol> parameterList)
2330TypeSymbol returnType = new ExtendedErrorTypeSymbol(this.Compilation, string.Empty, arity: 0, errorInfo: null);
2331var methodContainer = expr.Type ?? this.ContainingType;
2342private static TypeSymbol GetCommonTypeOrReturnType<TMember>(ImmutableArray<TMember> members)
2345TypeSymbol type = null;
2348TypeSymbol returnType = members[i].GetTypeOrReturnType().Type;
2353else if (!TypeSymbol.Equals(type, returnType, TypeCompareKind.ConsiderEverything2))
Binder\Binder_Lookup.cs (80)
32ConsList<TypeSymbol> basesBeingResolved,
67private Binder LookupSymbolsWithFallback(LookupResult result, string name, int arity, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, ConsList<TypeSymbol> basesBeingResolved = null, LookupOptions options = LookupOptions.Default)
88LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
122LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
136ConsList<TypeSymbol> basesBeingResolved,
154private void LookupMembersWithFallback(LookupResult result, NamespaceOrTypeSymbol nsOrType, string name, int arity, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, ConsList<TypeSymbol> basesBeingResolved = null, LookupOptions options = LookupOptions.Default)
170protected void LookupMembersInternal(LookupResult result, NamespaceOrTypeSymbol nsOrType, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
181this.LookupMembersInType(result, (TypeSymbol)nsOrType, name, arity, basesBeingResolved, options, originalBinder, diagnose, ref useSiteInfo);
243protected void LookupMembersInType(LookupResult result, TypeSymbol type, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
284private void LookupMembersInErrorType(LookupResult result, ErrorTypeSymbol errorType, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
293TypeSymbol candidateType = errorType.CandidateSymbols.First() as TypeSymbol;
319protected void LookupMembersInSubmissions(LookupResult result, TypeSymbol submissionClass, CompilationUnitSyntax declarationSyntax, bool inUsings, string name, int arity, ConsList<TypeSymbol> basesBeingResolved,
468ConsList<TypeSymbol> basesBeingResolved,
535ConsList<TypeSymbol> basesBeingResolved,
828protected static void LookupMembersWithoutInheritance(LookupResult result, TypeSymbol type, string name, int arity,
829LookupOptions options, Binder originalBinder, TypeSymbol accessThroughType, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, ConsList<TypeSymbol> basesBeingResolved)
845TypeSymbol type,
848ConsList<TypeSymbol> basesBeingResolved,
860TypeSymbol type,
863ConsList<TypeSymbol> basesBeingResolved,
866TypeSymbol accessThroughType,
873TypeSymbol currentType = type;
1041TypeSymbol.Equals(iFaceOriginal, idictSymbol, TypeCompareKind.ConsiderEverything2) ||
1044TypeSymbol.Equals(iFaceOriginal, iroDictSymbol, TypeCompareKind.ConsiderEverything2) ||
1046TypeSymbol.Equals(iFaceOriginal, iListSymbol, TypeCompareKind.ConsiderEverything2) ||
1047TypeSymbol.Equals(iFaceOriginal, iCollectionSymbol, TypeCompareKind.ConsiderEverything2) ||
1048TypeSymbol.Equals(iFaceOriginal, inccSymbol, TypeCompareKind.ConsiderEverything2) ||
1049TypeSymbol.Equals(iFaceOriginal, inpcSymbol, TypeCompareKind.ConsiderEverything2);
1053private static Symbol GetNearestOtherSymbol(ConsList<TypeSymbol> list, TypeSymbol type)
1055TypeSymbol other = type;
1057for (; list != null && list != ConsList<TypeSymbol>.Empty; list = list.Tail)
1059if (TypeSymbol.Equals(list.Head, type.OriginalDefinition, TypeCompareKind.ConsiderEverything2))
1061if (TypeSymbol.Equals(other, type, TypeCompareKind.ConsiderEverything2) && list.Tail != null && list.Tail != ConsList<TypeSymbol>.Empty)
1082ConsList<TypeSymbol> basesBeingResolved,
1085TypeSymbol accessThroughType,
1094((options & LookupOptions.NamespacesOrTypesOnly) == 0 || !(current.IsSingleViable && TypeSymbol.Equals(current.SingleSymbolOrDefault.ContainingType, type, TypeCompareKind.AllIgnoreOptions)))) // The nested type will shadow everything from bases
1101private static ImmutableArray<NamedTypeSymbol> GetBaseInterfaces(NamedTypeSymbol type, ConsList<TypeSymbol> basesBeingResolved, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
1154static void addAllInterfaces(NamedTypeSymbol @interface, HashSet<NamedTypeSymbol> visited, ArrayBuilder<NamedTypeSymbol> result, ConsList<TypeSymbol> basesBeingResolved, ConsList<NamedTypeSymbol> cycleGuard)
1185ConsList<TypeSymbol> basesBeingResolved,
1188TypeSymbol accessThroughType,
1215private void LookupMembersInInterface(LookupResult current, NamedTypeSymbol type, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
1233private void LookupMembersInTypeParameter(LookupResult current, TypeParameterSymbol typeParameter, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
1252private static bool IsDerivedType(NamedTypeSymbol baseType, NamedTypeSymbol derivedType, ConsList<TypeSymbol> basesBeingResolved, CSharpCompilation compilation, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
1254Debug.Assert(!TypeSymbol.Equals(baseType, derivedType, TypeCompareKind.ConsiderEverything2));
1260if (TypeSymbol.Equals(b, baseType, TypeCompareKind.ConsiderEverything2)) return true;
1273if (TypeSymbol.Equals(b, baseType, TypeCompareKind.ConsiderEverything2))
1289private void MergeHidingLookupResults(LookupResult resultHiding, LookupResult resultHidden, ConsList<TypeSymbol> basesBeingResolved, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
1360if ((options & LookupOptions.NamespacesOrTypesOnly) != 0 && nsOrType is TypeSymbol)
1384if ((options & LookupOptions.NamespacesOrTypesOnly) != 0 && nsOrType is TypeSymbol)
1450internal SingleLookupResult CheckViability(Symbol symbol, int arity, LookupOptions options, TypeSymbol accessThroughType, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, ConsList<TypeSymbol> basesBeingResolved = null)
1481(unwrappedSymbol is not TypeSymbol && IsInstance(unwrappedSymbol) || !(unwrappedSymbol.IsAbstract || unwrappedSymbol.IsVirtual)))
1648internal bool CanAddLookupSymbolInfo(Symbol symbol, LookupOptions options, LookupSymbolsInfo info, TypeSymbol accessThroughType, AliasSymbol aliasSymbol = null)
1700private static TypeSymbol RefineAccessThroughType(LookupOptions options, TypeSymbol accessThroughType)
1736internal bool IsAccessible(Symbol symbol, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, TypeSymbol accessThroughType = null, ConsList<TypeSymbol> basesBeingResolved = null)
1755internal bool IsAccessible(Symbol symbol, TypeSymbol accessThroughType, out bool failedThroughTypeCheck, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, ConsList<TypeSymbol> basesBeingResolved = null)
1767/// Should only be called by <see cref="IsAccessible(Symbol, TypeSymbol, out bool, ref CompoundUseSiteInfo{AssemblySymbol}, ConsList{TypeSymbol})"/>,
1770internal virtual bool IsAccessibleHelper(Symbol symbol, TypeSymbol accessThroughType, out bool failedThroughTypeCheck, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, ConsList<TypeSymbol> basesBeingResolved)
1797TypeSymbol type = null;
1928this.AddMemberLookupSymbolsInfoInType(result, (TypeSymbol)nsOrType, options, originalBinder);
1932private void AddMemberLookupSymbolsInfoInType(LookupSymbolsInfo result, TypeSymbol type, LookupOptions options, Binder originalBinder)
1956protected void AddMemberLookupSymbolsInfoInSubmissions(LookupSymbolsInfo result, TypeSymbol scriptClass, bool inUsings, LookupOptions options, Binder originalBinder)
2029private static void AddMemberLookupSymbolsInfoWithoutInheritance(LookupSymbolsInfo result, TypeSymbol type, LookupOptions options, Binder originalBinder, TypeSymbol accessThroughType)
2041private void AddWinRTMembersLookupSymbolsInfo(LookupSymbolsInfo result, NamedTypeSymbol type, LookupOptions options, Binder originalBinder, TypeSymbol accessThroughType)
2056private void AddMemberLookupSymbolsInfoInClass(LookupSymbolsInfo result, TypeSymbol type, LookupOptions options, Binder originalBinder, TypeSymbol accessThroughType)
2087private void AddMemberLookupSymbolsInfoInInterface(LookupSymbolsInfo result, TypeSymbol type, LookupOptions options, Binder originalBinder, TypeSymbol accessThroughType)
Binder\Binder_Operators.cs (75)
262var leftType = left.Type;
333var leftType = left.Type;
375var leftType = left.Type;
425var leftType = left.Type;
547TypeSymbol getResultType(ExpressionSyntax node, TypeSymbol leftType, BindingDiagnosticBag diagnostics)
673TypeSymbol delegateType = left.Type;
692TypeSymbol type;
753TypeSymbol type = operand.Type;
927TypeSymbol leftType = left.Type;
928TypeSymbol rightType = right.Type;
1037TypeSymbol resultType = signature.ReturnType;
1165TypeSymbol leftType = left.Type;
1166TypeSymbol rightType = right.Type;
1340bool isReadOnlySpanOfByte(TypeSymbol? type)
1492var trueFalseParameterType = (resultKind.Operator() == BinaryOperatorKind.And ? falseOperator : trueOperator).Parameters[0].Type;
1551var type = left.Type;
1609TypeSymbol parameterType = userDefinedOperator.Parameters[0].Type;
1697bool typesAreSame = TypeSymbol.Equals(signature.LeftType, signature.RightType, TypeCompareKind.ConsiderEverything2) && TypeSymbol.Equals(signature.LeftType, signature.ReturnType, TypeCompareKind.ConsiderEverything2);
1699bool typeMatchesContainer = TypeSymbol.Equals(signature.ReturnType.StrippedType(), t, TypeCompareKind.ConsiderEverything2) ||
1818if (!TypeSymbol.Equals(signature.LeftType, signature.RightType, TypeCompareKind.AllIgnoreOptions) ||
1819!TypeSymbol.Equals(signature.LeftType, signature.ReturnType, TypeCompareKind.AllIgnoreOptions))
1919private bool HasApplicableBooleanOperator(NamedTypeSymbol containingType, string name, TypeSymbol argumentType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, out MethodSymbol @operator)
1948private TypeSymbol GetBinaryOperatorErrorType(BinaryOperatorKind kind, BindingDiagnosticBag diagnostics, CSharpSyntaxNode node)
2300static bool isNuint(TypeSymbol type)
2530internal static TypeSymbol GetEnumType(BinaryOperatorKind kind, BoundExpression left, BoundExpression right)
2582TypeSymbol resultTypeSymbol,
2595TypeSymbol enumType = GetEnumType(kind, left, right);
2596TypeSymbol underlyingType = enumType.GetEnumUnderlyingType()!;
2606TypeSymbol operandType = (operandSpecialType == underlyingType.SpecialType) ?
2642TypeSymbol resultType = kind == BinaryOperatorKind.EnumSubtraction ? underlyingType : enumType;
2657TypeSymbol resultTypeSymbol,
3166var operandType = operand.Type;
3316var operandType = operand.Type;
3404var operandType = operand.Type;
3527TypeSymbol getResultType(ExpressionSyntax node, TypeSymbol operandType, InstanceUserDefinedIncrementUsageMode mode, BindingDiagnosticBag diagnostics)
3638private ArrayBuilder<MethodSymbol>? LookupUserDefinedInstanceOperators(TypeSymbol lookupInType, string? checkedName, string ordinaryName, int parameterCount, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
3835private bool CheckConstraintLanguageVersionAndRuntimeSupportForOperator(SyntaxNode node, MethodSymbol? methodOpt, bool isUnsignedRightShift, TypeSymbol? constrainedToTypeOpt, BindingDiagnosticBag diagnostics)
3926TypeSymbol pointedAtType;
3933private static void BindPointerIndirectionExpressionInternal(CSharpSyntaxNode node, BoundExpression operand, BindingDiagnosticBag diagnostics, out TypeSymbol pointedAtType, out bool hasErrors)
3990TypeSymbol operandType = operand.Type;
4012TypeSymbol pointerType = new PointerTypeSymbol(TypeWithAnnotations.Create(operandType));
4248var resultType = signature.ReturnType;
4305TypeSymbol resultTypeSymbol,
4649private bool IsOperatorErrors(CSharpSyntaxNode node, TypeSymbol operandType, BoundTypeExpression typeExpression, BindingDiagnosticBag diagnostics)
4651var targetType = typeExpression.Type;
4678var resultType = (TypeSymbol)GetSpecialType(SpecialType.System_Boolean, diagnostics, node);
4720var targetType = typeExpression.Type;
4779var operandType = operand.Type;
4800TypeSymbol targetType = targetTypeWithAnnotations.Type;
4810TypeSymbol operandType,
4811TypeSymbol targetType,
4845TypeSymbol operandType,
4846TypeSymbol targetType,
5152TypeSymbol targetType = targetTypeWithAnnotations.Type;
5155var resultType = targetType;
5256var operandType = operand.Type;
5307TypeSymbol operandType,
5308TypeSymbol targetType,
5369TypeSymbol operandType,
5370TypeSymbol targetType,
5400internal static ConstantValue GetAsOperatorConstantResult(TypeSymbol operandType, TypeSymbol targetType, ConversionKind conversionKind, ConstantValue operandConstantValue)
5468TypeSymbol optLeftType = leftOperand.Type; // "A"
5469TypeSymbol optRightType = rightOperand.Type; // "B"
5471TypeSymbol optLeftType0 = isLeftNullable ? // "A0"
5644TypeSymbol leftType = leftOperand.Type;
5660var underlyingLeftType = leftType.GetNullableUnderlyingType();
5763TypeSymbol? bestType = BestTypeInferrer.InferBestTypeForConditionalOperator(trueExpr, falseExpr, this.Conversions, out bool hadMultipleCandidates, ref useSiteInfo);
5803TypeSymbol trueType = trueExpr.Type;
5804TypeSymbol falseType = falseExpr.Type;
5806TypeSymbol type;
Binder\Binder_Patterns.cs (70)
25TypeSymbol? expressionType = expression.Type;
50TypeSymbol boolType,
166TypeSymbol inputType,
192TypeSymbol inputType,
204TypeSymbol inputType,
228TypeSymbol sliceType;
261TypeSymbol inputType,
262TypeSymbol elementType,
291TypeSymbol inputType,
298TypeSymbol elementType;
301TypeSymbol narrowedType = inputType.StrippedType();
347private bool IsCountableAndIndexable(SyntaxNode node, TypeSymbol inputType, out PropertySymbol? lengthProperty)
355private bool BindLengthAndIndexerForListPattern(SyntaxNode node, TypeSymbol inputType, BindingDiagnosticBag diagnostics,
402private static BoundPattern BindDiscardPattern(DiscardPatternSyntax node, TypeSymbol inputType, BindingDiagnosticBag diagnostics)
410TypeSymbol inputType,
420TypeSymbol inputType,
428var convertedType = convertedExpression.Type ?? inputType;
454private bool ShouldBlockINumberBaseConversion(Conversion patternConversion, TypeSymbol inputType)
499TypeSymbol inputType,
527TypeSymbol inputType,
545TypeSymbol inputType,
561var strippedInputType = inputType.StrippedType();
589TypeSymbol inputType,
724TypeSymbol inputType,
725TypeSymbol patternType,
805TypeSymbol expressionType,
806TypeSymbol patternType,
839TypeSymbol inputType,
854TypeSymbol inputType,
929TypeSymbol inputType,
950internal static bool IsZeroElementTupleType(TypeSymbol type)
959TypeSymbol inputType,
975TypeSymbol declType = declTypeWithAnnotations.Type;
1068TypeSymbol elementType = isError ? CreateErrorType() : outPlaceholders[i].Type;
1156TypeSymbol declType,
1173TypeSymbol elementType = isError ? CreateErrorType() : elementTypesWithAnnotations[i].Type;
1198TypeSymbol declType,
1236TypeSymbol declType,
1285bool hasBaseInterface(TypeSymbol type, NamedTypeSymbol possibleBaseInterface)
1319TypeSymbol inputType,
1345TypeSymbol inputType,
1378var strippedInputType = inputType.StrippedType();
1423TypeSymbol elementType = isError ? CreateErrorType() : outPlaceholders[i].Type;
1446TypeSymbol elementType = isError ? CreateErrorType() : elementTypes[i].Type;
1461TypeSymbol inputType,
1475TypeSymbol memberType;
1494TypeSymbol receiverType = member.Receiver?.Type ?? inputType;
1511TypeSymbol inputType, ExpressionSyntax expr, BindingDiagnosticBag diagnostics, ref bool hasErrors)
1530TypeSymbol memberType = symbol switch
1541TypeSymbol inputType,
1613TypeSymbol inputType,
1626TypeSymbol inputType,
1634var type = value.Type ?? inputType;
1696internal static BinaryOperatorKind RelationalOperatorType(TypeSymbol type) => type.SpecialType switch
1719TypeSymbol inputType,
1733TypeSymbol inputType,
1754var narrowedTypeCandidates = ArrayBuilder<TypeSymbol>.GetInstance(2);
1779TypeSymbol inputType,
1780ArrayBuilder<TypeSymbol> narrowedTypeCandidates,
1794var narrowedType = leastSpecificType(node, narrowedTypeCandidates, diagnostics) ?? inputType;
1798TypeSymbol? leastSpecificType(SyntaxNode node, ArrayBuilder<TypeSymbol> candidates, BindingDiagnosticBag diagnostics)
1802TypeSymbol? bestSoFar = candidates[0];
1806TypeSymbol candidate = candidates[i];
1812TypeSymbol candidate = candidates[i];
1813TypeSymbol? spoiler = lessSpecificCandidate(candidate, bestSoFar, ref useSiteInfo);
1829TypeSymbol? lessSpecificCandidate(TypeSymbol bestSoFar, TypeSymbol possiblyLessSpecificCandidate, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
1864static void collectCandidates(BoundPattern pat, ArrayBuilder<TypeSymbol> candidates)
Binder\Binder_QueryErrors.cs (16)
80private bool ImplementsStandardQueryInterface(TypeSymbol instanceType, string name, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
88var originalType = instanceType.OriginalDefinition;
91bool isIenumerable = TypeSymbol.Equals(originalType, ienumerable_t, TypeCompareKind.ConsiderEverything2) || HasUniqueInterface(instanceType, ienumerable_t, ref nonUnique, ref useSiteInfo);
92bool isQueryable = TypeSymbol.Equals(originalType, iqueryable_t, TypeCompareKind.ConsiderEverything2) || HasUniqueInterface(instanceType, iqueryable_t, ref nonUnique, ref useSiteInfo);
96private static bool HasUniqueInterface(TypeSymbol instanceType, NamedTypeSymbol interfaceType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
102private static bool HasUniqueInterface(TypeSymbol instanceType, NamedTypeSymbol interfaceType, ref bool nonUnique, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
104TypeSymbol candidate = null;
107if (TypeSymbol.Equals(i.OriginalDefinition, interfaceType, TypeCompareKind.ConsiderEverything2))
113else if (!TypeSymbol.Equals(candidate, i, TypeCompareKind.ConsiderEverything2))
124private bool HasCastToQueryProvider(TypeSymbol instanceType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
126var originalType = instanceType.OriginalDefinition;
129bool isIenumerable = TypeSymbol.Equals(originalType, ienumerable, TypeCompareKind.ConsiderEverything2) || HasUniqueInterface(instanceType, ienumerable, ref useSiteInfo);
130bool isQueryable = TypeSymbol.Equals(originalType, iqueryable, TypeCompareKind.ConsiderEverything2) || HasUniqueInterface(instanceType, iqueryable, ref useSiteInfo);
219TypeSymbol type = null;
223foreach (var t in unbound.Data.InferredReturnTypes())
238TypeSymbol receiverType = receiver?.Type;
Binder\Binder_Statements.cs (37)
237TypeSymbol elementType = GetIteratorElementType().Type;
407var type = boundExpr.Type;
1022TypeSymbol initializerType = initializerOpt?.Type;
1222private bool IsValidFixedVariableInitializer(TypeSymbol declType, ref BoundExpression initializerOpt, BindingDiagnosticBag diagnostics)
1232TypeSymbol initializerType = initializerOpt.Type;
1241TypeSymbol elementType;
1355TypeSymbol elementType,
1356TypeSymbol declType,
1365TypeSymbol pointerType = new PointerTypeSymbol(TypeWithAnnotations.Create(elementType));
1459var inferredType = op2.Type;
1524TypeSymbol type;
1808TypeSymbol.Equals(sourceProperty.ContainingType, fromMember.ContainingType, TypeCompareKind.AllIgnoreOptions) &&
1839private TypeSymbol GetAccessThroughType(BoundExpression receiver)
1860TypeSymbol destinationType,
1955internal BoundExpression GenerateConversionForAssignment(TypeSymbol targetType, BoundExpression expression, BindingDiagnosticBag diagnostics, ConversionForAssignmentFlags flags = ConversionForAssignmentFlags.None)
1958internal BoundExpression GenerateConversionForAssignment(TypeSymbol targetType, BoundExpression expression, BindingDiagnosticBag diagnostics, out Conversion conversion, ConversionForAssignmentFlags flags = ConversionForAssignmentFlags.None)
2038UnboundLambda anonymousFunction, TypeSymbol targetType)
2230var lambdaParameterType = anonymousFunction.ParameterType(i);
2237var delegateParameterType = delegateParameters[i].Type;
2271Conversion conversion, TypeSymbol sourceType, TypeSymbol targetType, ConstantValue sourceConstantValueOpt = null)
2322else if (TypeSymbol.Equals(sourceType, targetType, TypeCompareKind.ConsiderEverything2))
2343TypeSymbol targetType)
2472var sourceType = operand.Type;
2561var targetElementType = targetElementTypes[i].Type;
3003protected virtual TypeSymbol GetCurrentReturnType(out RefKind refKind)
3010TypeSymbol returnType = symbol.ReturnType;
3045TypeSymbol retType = GetCurrentReturnType(out sigRefKind);
3137var requiredType = IsEffectivelyGenericTaskReturningAsyncMethod()
3168TypeSymbol returnType)
3217&& TypeSymbol.Equals(argument.Type, this.GetCurrentReturnType(out unusedRefKind), TypeCompareKind.ConsiderEverything2))
3277TypeSymbol type = null;
3296TypeSymbol effectiveType = type.EffectiveType(ref useSiteInfo);
3326var previousType = previousBlock.ExceptionTypeOpt;
3350else if (TypeSymbol.Equals(previousType, Compilation.GetWellKnownType(WellKnownType.System_Exception), TypeCompareKind.ConsiderEverything2) &&
3373Debug.Assert(local.Type.IsErrorType() || (TypeSymbol.Equals(local.Type, type, TypeCompareKind.ConsiderEverything2)));
3488var returnType = GetCurrentReturnType(out returnRefKind);
Binder\Binder_Symbols.cs (33)
185/// Otherwise, call <see cref="Binder.BindTypeOrAlias(ExpressionSyntax, BindingDiagnosticBag, ConsList{TypeSymbol}, bool)"/> instead.
260var type = UnwrapAlias(symbol, diagnostics, syntax) as TypeSymbol;
302internal TypeWithAnnotations BindType(ExpressionSyntax syntax, BindingDiagnosticBag diagnostics, ConsList<TypeSymbol> basesBeingResolved = null, bool suppressUseSiteDiagnostics = false)
311internal TypeWithAnnotations BindType(ExpressionSyntax syntax, BindingDiagnosticBag diagnostics, out AliasSymbol alias, ConsList<TypeSymbol> basesBeingResolved = null)
320internal NamespaceOrTypeOrAliasSymbolWithAnnotations BindTypeOrAlias(ExpressionSyntax syntax, BindingDiagnosticBag diagnostics, ConsList<TypeSymbol> basesBeingResolved = null, bool suppressUseSiteDiagnostics = false)
328(symbol.IsAlias && UnwrapAliasNoDiagnostics(symbol.Symbol, basesBeingResolved) is TypeSymbol))
383internal NamespaceOrTypeOrAliasSymbolWithAnnotations BindNamespaceOrTypeSymbol(ExpressionSyntax syntax, BindingDiagnosticBag diagnostics, ConsList<TypeSymbol> basesBeingResolved = null)
393internal NamespaceOrTypeOrAliasSymbolWithAnnotations BindNamespaceOrTypeSymbol(ExpressionSyntax syntax, BindingDiagnosticBag diagnostics, ConsList<TypeSymbol> basesBeingResolved, bool suppressUseSiteDiagnostics)
407/// <see cref="BindQualifiedName(ExpressionSyntax, SimpleNameSyntax, BindingDiagnosticBag, ConsList{TypeSymbol}, bool)"/>
416internal NamespaceOrTypeOrAliasSymbolWithAnnotations BindNamespaceOrTypeOrAliasSymbol(ExpressionSyntax syntax, BindingDiagnosticBag diagnostics, ConsList<TypeSymbol> basesBeingResolved, bool suppressUseSiteDiagnostics)
639ConsList<TypeSymbol> basesBeingResolved,
684private TypeSymbol BindTupleType(TupleTypeSyntax syntax, BindingDiagnosticBag diagnostics, ConsList<TypeSymbol> basesBeingResolved)
828ConsList<TypeSymbol> basesBeingResolved,
855ConsList<TypeSymbol> basesBeingResolved,
919if (aliasTarget is TypeSymbol type)
1092private static Symbol UnwrapAliasNoDiagnostics(Symbol symbol, ConsList<TypeSymbol> basesBeingResolved = null)
1102private NamespaceOrTypeOrAliasSymbolWithAnnotations UnwrapAlias(in NamespaceOrTypeOrAliasSymbolWithAnnotations symbol, BindingDiagnosticBag diagnostics, SyntaxNode syntax, ConsList<TypeSymbol> basesBeingResolved = null)
1113private NamespaceOrTypeOrAliasSymbolWithAnnotations UnwrapAlias(in NamespaceOrTypeOrAliasSymbolWithAnnotations symbol, out AliasSymbol alias, BindingDiagnosticBag diagnostics, SyntaxNode syntax, ConsList<TypeSymbol> basesBeingResolved = null)
1124private Symbol UnwrapAlias(Symbol symbol, BindingDiagnosticBag diagnostics, SyntaxNode syntax, ConsList<TypeSymbol> basesBeingResolved = null)
1130private Symbol UnwrapAlias(Symbol symbol, out AliasSymbol alias, BindingDiagnosticBag diagnostics, SyntaxNode syntax, ConsList<TypeSymbol> basesBeingResolved = null)
1139var type = result as TypeSymbol;
1161ConsList<TypeSymbol> basesBeingResolved,
1269ConsList<TypeSymbol> basesBeingResolved,
1345private ImmutableArray<TypeWithAnnotations> BindTypeArguments(SeparatedSyntaxList<TypeSyntax> typeArguments, BindingDiagnosticBag diagnostics, ConsList<TypeSymbol> basesBeingResolved = null)
1357private TypeWithAnnotations BindTypeArgument(TypeSyntax typeArgument, BindingDiagnosticBag diagnostics, ConsList<TypeSymbol> basesBeingResolved = null)
1542ArrayBuilder<Symbol> members, TypeSymbol receiverType,
1621ConsList<TypeSymbol> basesBeingResolved,
1653ConsList<TypeSymbol> basesBeingResolved,
2297var 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\ForEachLoopBinder.cs (28)
539TypeSymbol getEnumeratorType = getEnumeratorMethod.ReturnType;
613var awaitableType = builder.PatternDisposeInfo is null
641TypeSymbol collectionType,
718TypeSymbol collectionExprType = collectionExpr.Type;
795TypeSymbol collectionExprType = collectionExpr.Type;
863if (!TypeSymbol.IsInlineArrayElementFieldSupported(elementField))
937TypeSymbol collectionExprType = collectionExpr.Type;
977var unwrappedCollectionExprType = unwrappedCollectionExpr.Type;
1074private EnumeratorResult SatisfiesIEnumerableInterfaces(SyntaxNode collectionSyntax, ref ForEachEnumeratorInfo.Builder builder, BoundExpression collectionExpr, bool isAsync, BindingDiagnosticBag diagnostics, TypeSymbol unwrappedCollectionExprType)
1139TypeSymbol enumeratorType = specificGetEnumeratorMethod.ReturnType;
1224TypeSymbol enumeratorType = builder.GetEnumeratorInfo.Method.ReturnType;
1289bool implementsInterface(TypeSymbol collectionType, TypeSymbol enumeratorType, bool isAsync, BindingDiagnosticBag diagnostics)
1313private ForEachEnumeratorInfo.Builder GetDefaultEnumeratorInfo(SyntaxNode syntax, ForEachEnumeratorInfo.Builder builder, BindingDiagnosticBag diagnostics, TypeSymbol collectionExprType)
1322(TypeSymbol)DynamicTypeSymbol.Instance :
1340TypeSymbol.Equals(builder.GetEnumeratorInfo.Method.ReturnType, this.Compilation.GetSpecialType(SpecialType.System_Collections_IEnumerator), TypeCompareKind.ConsiderEverything2));
1387private MethodArgumentInfo FindForEachPatternMethod(SyntaxNode syntax, SyntaxNode collectionSyntax, TypeSymbol patternType, string methodName, LookupResult lookupResult, bool warningsOnly, BindingDiagnosticBag diagnostics, bool isAsync)
1454private MethodArgumentInfo PerformForEachPatternOverloadResolution(SyntaxNode syntax, SyntaxNode collectionSyntax, TypeSymbol patternType, ArrayBuilder<MethodSymbol> candidateMethods, bool warningsOnly, BindingDiagnosticBag diagnostics, bool isAsync)
1659TypeSymbol enumeratorType = getEnumeratorMethod.ReturnType;
1772private void ReportEnumerableWarning(SyntaxNode collectionSyntax, BindingDiagnosticBag diagnostics, TypeSymbol enumeratorType, Symbol patternMemberCandidate)
1783internal static bool IsIEnumerable(TypeSymbol type)
1785switch (((TypeSymbol)type.OriginalDefinition).SpecialType)
1795private bool IsIAsyncEnumerable(TypeSymbol type)
1814TypeSymbol type,
1851TypeSymbol type, bool isAsync, CSharpCompilation compilation, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo,
1888TypeSymbol.Equals(@interface, result, TypeCompareKind.IgnoreTupleNames))
1901internal static bool IsIEnumerableT(TypeSymbol type, bool isAsync, CSharpCompilation compilation)
1921private void ReportPatternMemberLookupDiagnostics(SyntaxNode collectionSyntax, LookupResult lookupResult, TypeSymbol patternType, string memberName, bool warningsOnly, BindingDiagnosticBag diagnostics)
Binder\InContainerBinder.cs (3)
57internal override bool IsAccessibleHelper(Symbol symbol, TypeSymbol accessThroughType, out bool failedThroughTypeCheck, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, ConsList<TypeSymbol> basesBeingResolved)
114LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\InMethodBinder.cs (10)
129TypeSymbol returnType = _methodSymbol.ReturnType;
147RefKind refKind, TypeSymbol returnType, Location errorLocation, BindingDiagnosticBag diagnostics)
151TypeSymbol originalDefinition = returnType.OriginalDefinition;
168if (TypeSymbol.Equals(originalDefinition, compilation.GetWellKnownType(WellKnownType.System_Collections_Generic_IAsyncEnumerable_T), TypeCompareKind.ConsiderEverything) ||
169TypeSymbol.Equals(originalDefinition, compilation.GetWellKnownType(WellKnownType.System_Collections_Generic_IAsyncEnumerator_T), TypeCompareKind.ConsiderEverything))
178internal static bool IsAsyncStreamInterface(CSharpCompilation compilation, RefKind refKind, TypeSymbol returnType)
182TypeSymbol originalDefinition = returnType.OriginalDefinition;
184if (TypeSymbol.Equals(originalDefinition, compilation.GetWellKnownType(WellKnownType.System_Collections_Generic_IAsyncEnumerable_T), TypeCompareKind.ConsiderEverything) ||
185TypeSymbol.Equals(originalDefinition, compilation.GetWellKnownType(WellKnownType.System_Collections_Generic_IAsyncEnumerator_T), TypeCompareKind.ConsiderEverything))
195LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\Semantics\AccessCheck.cs (21)
41TypeSymbol throughTypeOpt = null)
55TypeSymbol throughTypeOpt,
58ConsList<TypeSymbol> basesBeingResolved = null)
136TypeSymbol throughTypeOpt,
140ConsList<TypeSymbol> basesBeingResolved = null)
223private static bool IsNamedTypeAccessible(NamedTypeSymbol type, Symbol within, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, ConsList<TypeSymbol> basesBeingResolved = null)
301TypeSymbol throughTypeOpt,
305ConsList<TypeSymbol> basesBeingResolved = null)
346TypeSymbol throughTypeOpt,
350ConsList<TypeSymbol> basesBeingResolved = null)
418TypeSymbol throughTypeOpt,
423ConsList<TypeSymbol> basesBeingResolved = null)
461var originalThroughTypeOpt = (object)throughTypeOpt == null ? null : throughTypeOpt.OriginalDefinition as TypeSymbol;
545this TypeSymbol type,
549ConsList<TypeSymbol> basesBeingResolved = null)
565var current = type;
586var next = current.GetNextBaseTypeNoUseSiteDiagnostics(basesBeingResolved, compilation, ref visited);
593current = (TypeSymbol)next.OriginalDefinition;
636static void getBaseInterfaces(TypeSymbol derived, ArrayBuilder<NamedTypeSymbol> baseInterfaces, PooledHashSet<NamedTypeSymbol> interfacesLookedAt, ConsList<TypeSymbol> basesBeingResolved)
Binder\Semantics\BestTypeInferrer.cs (22)
51public static TypeSymbol? InferBestType(
68IEqualityComparer<TypeSymbol> comparer = conversions.IncludeNullability ? Symbols.SymbolEqualityComparer.ConsiderEverything : Symbols.SymbolEqualityComparer.IgnoringNullable;
69HashSet<TypeSymbol> candidateTypes = new HashSet<TypeSymbol>(comparer);
73TypeSymbol? type = expr.GetTypeOrFunctionType();
96var builder = ArrayBuilder<TypeSymbol>.GetInstance(candidateTypes.Count);
98var result = GetBestType(builder, conversions, ref useSiteInfo);
116public static TypeSymbol? InferBestTypeForConditionalOperator(
132ArrayBuilder<TypeSymbol> candidateTypes = ArrayBuilder<TypeSymbol>.GetInstance();
177internal static TypeSymbol? GetBestType(
178ArrayBuilder<TypeSymbol> types,
197TypeSymbol? best = null;
201TypeSymbol? type = checkType(types[i]);
213var better = Better(best, type, conversions, ref useSiteInfo);
236TypeSymbol? type = checkType(types[i]);
241TypeSymbol? better = Better(best, type, conversions, ref useSiteInfo);
250static TypeSymbol? checkType(TypeSymbol type) =>
259private static TypeSymbol? Better(
260TypeSymbol type1,
261TypeSymbol? type2,
Binder\Semantics\Conversions\Conversions.cs (11)
44public override Conversion GetMethodGroupDelegateConversion(BoundMethodGroup source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
131protected override Conversion GetInterpolatedStringConversion(BoundExpression source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
153return (TypeSymbol.Equals(destination, Compilation.GetWellKnownType(WellKnownType.System_IFormattable), TypeCompareKind.ConsiderEverything) ||
154TypeSymbol.Equals(destination, Compilation.GetWellKnownType(WellKnownType.System_FormattableString), TypeCompareKind.ConsiderEverything))
161TypeSymbol targetType,
166var elementType = elementTypeWithAnnotations.Type;
220Conversion convertElement(BoundNode element, TypeSymbol elementType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
232TypeSymbol targetType,
278private static (MethodSymbol, bool isFunctionPointer, CallingConventionInfo callingConventionInfo) GetDelegateInvokeOrFunctionPointerMethodIfAvailable(TypeSymbol type)
300public static bool ReportDelegateOrFunctionPointerMethodGroupDiagnostics(Binder binder, BoundMethodGroup expr, TypeSymbol targetType, BindingDiagnosticBag diagnostics)
507public override Conversion GetStackAllocConversion(BoundStackAllocArrayCreation sourceExpression, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\Semantics\Conversions\ConversionsBase.cs (211)
67public abstract Conversion GetMethodGroupDelegateConversion(BoundMethodGroup source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo);
71public abstract Conversion GetStackAllocConversion(BoundStackAllocArrayCreation sourceExpression, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo);
75protected abstract Conversion GetInterpolatedStringConversion(BoundExpression source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo);
78protected abstract Conversion GetCollectionExpressionConversion(BoundUnconvertedCollectionExpression source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo);
98public Conversion ClassifyImplicitConversionFromExpression(BoundExpression sourceExpression, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
104var sourceType = sourceExpression.Type;
169public Conversion ClassifyImplicitConversionFromType(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
204public Conversion ClassifyImplicitConversionFromTypeWhenNeitherOrBothFunctionTypes(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
234public Conversion ClassifyConversionFromExpressionType(TypeSymbol source, TypeSymbol destination, bool isChecked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
248private static bool TryGetVoidConversion(TypeSymbol source, TypeSymbol destination, out Conversion conversion)
283public Conversion ClassifyConversionFromExpression(BoundExpression sourceExpression, TypeSymbol destination, bool isChecked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, bool forCast = false)
317public Conversion ClassifyConversionFromType(TypeSymbol source, TypeSymbol destination, bool isChecked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, bool forCast = false)
375private Conversion ClassifyConversionFromExpressionForCast(BoundExpression source, TypeSymbol destination, bool isChecked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
429private Conversion ClassifyConversionFromTypeForCast(TypeSymbol source, TypeSymbol destination, bool isChecked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
488public static Conversion FastClassifyConversion(TypeSymbol source, TypeSymbol target)
499public Conversion ClassifyBuiltInConversion(TypeSymbol source, TypeSymbol destination, bool isChecked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
529public Conversion ClassifyStandardConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
541public Conversion ClassifyStandardConversion(BoundExpression sourceExpression, TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
605private Conversion ClassifyStandardImplicitConversion(BoundExpression sourceExpression, TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
695private Conversion ClassifyStandardImplicitConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
701Conversion classifyConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
763private Conversion ClassifyImplicitBuiltInConversionSlow(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
782private Conversion GetImplicitUserDefinedConversion(BoundExpression sourceExpression, TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
788private Conversion GetImplicitUserDefinedConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
793private Conversion ClassifyExplicitBuiltInOnlyConversion(TypeSymbol source, TypeSymbol destination, bool isChecked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, bool forCast)
872private Conversion GetExplicitUserDefinedConversion(BoundExpression sourceExpression, TypeSymbol source, TypeSymbol destination, bool isChecked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
878private Conversion GetExplicitUserDefinedConversion(TypeSymbol source, TypeSymbol destination, bool isChecked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
883private Conversion DeriveStandardExplicitFromOppositeStandardImplicitConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
916var strippedSource = source.StrippedType();
917var strippedDestination = destination.StrippedType();
950public bool IsBaseInterface(TypeSymbol baseType, TypeSymbol derivedType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
985public bool IsBaseClass(TypeSymbol derivedType, TypeSymbol baseType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
996for (TypeSymbol b = derivedType.BaseTypeWithDefinitionUseSiteDiagnostics(ref useSiteInfo); (object)b != null; b = b.BaseTypeWithDefinitionUseSiteDiagnostics(ref useSiteInfo))
1029private Conversion ClassifyImplicitBuiltInConversionFromExpression(BoundExpression sourceExpression, TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
1159private Conversion GetImplicitCollectionExpressionConversion(BoundUnconvertedCollectionExpression collectionExpression, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
1171if (destination.IsNullableType(out var underlyingDestination))
1184private Conversion GetSwitchExpressionConversion(BoundExpression source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
1213private Conversion GetConditionalExpressionConversion(BoundExpression source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
1231private static Conversion ClassifyNullLiteralConversion(BoundExpression source, TypeSymbol destination)
1270private static Conversion ClassifyImplicitConstantExpressionConversion(BoundExpression source, TypeSymbol destination)
1283if (destination.IsNullableType(out var underlyingDestination) &&
1293private Conversion ClassifyImplicitTupleLiteralConversion(BoundTupleLiteral source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
1307if (destination.IsNullableType(out var underlyingDestination))
1319private Conversion ClassifyExplicitTupleLiteralConversion(BoundTupleLiteral source, TypeSymbol destination, bool isChecked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, bool forCast)
1335if (destination.IsNullableType(out var underlyingDestination))
1349internal static bool HasImplicitConstantExpressionConversion(BoundExpression source, TypeSymbol destination)
1401private Conversion ClassifyExplicitOnlyConversionFromExpression(BoundExpression sourceExpression, TypeSymbol destination, bool isChecked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, bool forCast)
1419var sourceType = sourceExpression.Type;
1441private static bool HasImplicitEnumerationConversion(BoundExpression source, TypeSymbol destination)
1467private static LambdaConversionResult IsAnonymousFunctionCompatibleWithDelegate(UnboundLambda anonymousFunction, TypeSymbol type, CSharpCompilation compilation, bool isTargetExpressionTree)
1603var delegateType = type.TypeArgumentsWithAnnotationsNoUseSiteDiagnostics[0].Type;
1617internal bool IsAssignableFromMulticastDelegate(TypeSymbol type, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
1624public static LambdaConversionResult IsAnonymousFunctionCompatibleWithType(UnboundLambda anonymousFunction, TypeSymbol type, CSharpCompilation compilation)
1641private static bool HasAnonymousFunctionConversion(BoundExpression source, TypeSymbol destination, CSharpCompilation compilation)
1654internal static CollectionExpressionTypeKind GetCollectionExpressionTypeKind(CSharpCompilation compilation, TypeSymbol destination, out TypeWithAnnotations elementType)
1698static bool implementsSpecialInterface(CSharpCompilation compilation, TypeSymbol targetType, SpecialType specialInterface)
1706internal static bool IsSpanOrListType(CSharpCompilation compilation, TypeSymbol targetType, WellKnownType spanType, [NotNullWhen(true)] out TypeWithAnnotations elementType)
1719internal Conversion ClassifyImplicitUserDefinedConversionForV6SwitchGoverningType(TypeSymbol sourceType, out TypeSymbol switchGoverningType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
1751internal Conversion GetCallerLineNumberConversion(TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
1756TypeSymbol expectedAttributeType = corLibrary.GetSpecialType(SpecialType.System_Int32);
1776internal bool HasCallerLineNumberConversion(TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
1781internal bool HasCallerInfoStringConversion(TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
1783TypeSymbol expectedAttributeType = corLibrary.GetSpecialType(SpecialType.System_String);
1788public static bool HasIdentityConversion(TypeSymbol type1, TypeSymbol type2)
1793private static bool HasIdentityConversionInternal(TypeSymbol type1, TypeSymbol type2, bool includeNullability)
1815private bool HasIdentityConversionInternal(TypeSymbol type1, TypeSymbol type2)
1880var type = typeWithAnnotations.Type;
1910public Conversion ConvertExtensionMethodThisArg(TypeSymbol parameterType, TypeSymbol thisType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, bool isMethodGroupConversion)
1920public Conversion ClassifyImplicitExtensionMethodThisArgConversion(BoundExpression sourceExpressionOpt, TypeSymbol sourceType, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, bool isMethodGroupConversion)
2032private static ConversionKind GetNumericConversion(TypeSymbol source, TypeSymbol destination)
2054private static bool HasImplicitNumericConversion(TypeSymbol source, TypeSymbol destination)
2059private static bool HasExplicitNumericConversion(TypeSymbol source, TypeSymbol destination)
2097private static bool IsNumericType(TypeSymbol type)
2121private static bool HasSpecialIntPtrConversion(TypeSymbol source, TypeSymbol target)
2157var s0 = source.StrippedType();
2158var t0 = target.StrippedType();
2160TypeSymbol otherType;
2203static bool isIntPtrOrUIntPtr(TypeSymbol type) =>
2207private static bool HasExplicitEnumerationConversion(TypeSymbol source, TypeSymbol destination)
2236private Conversion ClassifyImplicitNullableConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
2252TypeSymbol unwrappedDestination = destination.GetNullableUnderlyingType();
2253TypeSymbol unwrappedSource = source.StrippedType();
2282private Conversion GetImplicitTupleLiteralConversion(BoundTupleLiteral source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
2300private Conversion GetExplicitTupleLiteralConversion(BoundTupleLiteral source, TypeSymbol destination, bool isChecked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, bool forCast)
2320TypeSymbol destination,
2358private Conversion ClassifyImplicitTupleConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
2377private Conversion ClassifyExplicitTupleConversion(TypeSymbol source, TypeSymbol destination, bool isChecked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, bool forCast)
2397TypeSymbol source,
2398TypeSymbol destination,
2431private Conversion ClassifyExplicitNullableConversion(TypeSymbol source, TypeSymbol destination, bool isChecked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, bool forCast)
2449TypeSymbol unwrappedSource = source.StrippedType();
2450TypeSymbol unwrappedDestination = destination.StrippedType();
2486private bool HasCovariantArrayConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
2508public bool HasIdentityOrImplicitReferenceConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
2521private static bool HasImplicitDynamicConversionFromExpression(TypeSymbol expressionType, TypeSymbol destination)
2530private static bool HasExplicitDynamicConversion(TypeSymbol source, TypeSymbol destination)
2540private bool HasArrayConversionToInterface(ArrayTypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
2621internal bool HasImplicitReferenceConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
2684private bool HasImplicitConversionToInterface(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
2718private bool HasImplicitConversionFromArray(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
2759private bool HasImplicitConversionFromDelegate(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
2795private bool HasImplicitFunctionTypeConversion(FunctionTypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
2806internal bool IsValidFunctionTypeConversionTarget(TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
2849public bool HasImplicitTypeParameterConversion(TypeParameterSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
2871private bool HasImplicitReferenceTypeParameterConversion(TypeParameterSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
2914private bool HasImplicitEffectiveBaseConversion(TypeParameterSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
2938private bool HasImplicitEffectiveInterfaceSetConversion(TypeParameterSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
2943private bool HasVarianceCompatibleInterfaceInEffectiveInterfaceSet(TypeParameterSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
2963private bool HasAnyBaseInterfaceConversion(TypeSymbol derivedType, TypeSymbol baseType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
2968private bool ImplementsVarianceCompatibleInterface(TypeSymbol derivedType, TypeSymbol baseType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
2994internal bool ImplementsVarianceCompatibleInterface(NamedTypeSymbol derivedType, TypeSymbol baseType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
2996return ImplementsVarianceCompatibleInterface((TypeSymbol)derivedType, baseType, ref useSiteInfo);
2999internal bool HasImplicitConversionToOrImplementsVarianceCompatibleInterface(TypeSymbol typeToCheck, NamedTypeSymbol targetInterfaceType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, out bool needSupportForRefStructInterfaces)
3019private bool IsRefLikeOrAllowsRefLikeTypeImplementingVarianceCompatibleInterface(TypeSymbol typeToCheck, NamedTypeSymbol targetInterfaceType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
3043if (expressionToCheck.Type is TypeSymbol typeToCheck && IsRefLikeOrAllowsRefLikeTypeImplementingVarianceCompatibleInterface(typeToCheck, targetInterfaceType, ref useSiteInfo))
3067private bool HasInterfaceVarianceConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
3086private bool HasDelegateVarianceConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
3147if (!TypeSymbol.Equals(typeSymbol, destination.OriginalDefinition, TypeCompareKind.ConsiderEverything2))
3170Debug.Assert(TypeSymbol.Equals(source.OriginalDefinition, destination.OriginalDefinition, TypeCompareKind.AllIgnoreOptions));
3199TypeSymbol.Equals(destinationTypeArgument.Type, sourceTypeArgument.Type, TypeCompareKind.AllNullableIgnoreOptions) &&
3248private bool HasImplicitBoxingTypeParameterConversion(TypeParameterSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
3302public bool HasBoxingConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
3363internal static bool HasImplicitPointerToVoidConversion(TypeSymbol source, TypeSymbol destination)
3374internal bool HasImplicitPointerConversion(TypeSymbol? source, TypeSymbol? destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
3431private bool HasIdentityOrReferenceConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
3454private bool HasExplicitReferenceConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
3528private bool HasExplicitReferenceTypeParameterConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
3580private bool HasUnboxingTypeParameterConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
3603if (TypeSymbol.Equals(type, source, TypeCompareKind.ConsiderEverything2))
3631private bool HasExplicitDelegateConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
3662if (!TypeSymbol.Equals(source.OriginalDefinition, destination.OriginalDefinition, TypeCompareKind.ConsiderEverything2))
3686var sourceArg = sourceTypeArguments[i].Type;
3687var destinationArg = destinationTypeArguments[i].Type;
3720private bool HasExplicitArrayConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
3781var specialDefinition = ((TypeSymbol)source.OriginalDefinition).SpecialType;
3789var sourceElement = ((NamedTypeSymbol)source).TypeArgumentWithDefinitionUseSiteDiagnostics(0, ref useSiteInfo).Type;
3790var destinationElement = destinationArray.ElementType;
3812private bool HasUnboxingConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
3880private static bool HasPointerToPointerConversion(TypeSymbol source, TypeSymbol destination)
3888private static bool HasPointerToIntegerConversion(TypeSymbol source, TypeSymbol destination)
3906private static bool HasIntegerToPointerConversion(TypeSymbol source, TypeSymbol destination)
3920private static bool IsIntegerTypeSupportingPointerConversions(TypeSymbol type)
3951private bool HasImplicitSpanConversion(TypeSymbol? source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
4014private bool HasExplicitSpanConversion(TypeSymbol? source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
4035private bool IgnoreUserDefinedSpanConversions(TypeSymbol? source, TypeSymbol? target)
Binder\Semantics\Conversions\UserDefinedExplicitConversions.cs (28)
22TypeSymbol source,
23TypeSymbol target,
52TypeSymbol sx = MostSpecificSourceTypeForExplicitUserDefinedConversion(u, sourceExpression, source, ref useSiteInfo);
59TypeSymbol tx = MostSpecificTargetTypeForExplicitUserDefinedConversion(u, target, ref useSiteInfo);
74private static void ComputeUserDefinedExplicitConversionTypeSet(TypeSymbol source, TypeSymbol target, ArrayBuilder<(NamedTypeSymbol ParticipatingType, TypeParameterSymbol ConstrainedToTypeOpt)> d, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
87TypeSymbol source,
88TypeSymbol target,
130TypeSymbol source,
131TypeSymbol target,
143TypeSymbol source,
144TypeSymbol target,
271TypeSymbol convertsFrom = op.GetParameterType(0);
272TypeSymbol convertsTo = op.ReturnType;
323TypeSymbol nullableFrom = MakeNullableType(convertsFrom);
324TypeSymbol nullableTo = convertsTo.IsValidNullableTypeArgument() ? MakeNullableType(convertsTo) : convertsTo;
369private TypeSymbol MostSpecificSourceTypeForExplicitUserDefinedConversion(
372TypeSymbol source,
407if (u.Any(static (conv, source) => TypeSymbol.Equals(conv.FromType, source, TypeCompareKind.ConsiderEverything2), source))
416var result = MostEncompassedType(u, isValid, conv => conv.FromType, ref inLambdaUseSiteInfo);
427private TypeSymbol MostSpecificTargetTypeForExplicitUserDefinedConversion(
429TypeSymbol target,
461if (u.Any(static (conv, target) => TypeSymbol.Equals(conv.ToType, target, TypeCompareKind.ConsiderEverything2), target))
470var result = MostEncompassingType(u, isValid, conv => conv.ToType, ref inLambdaUseSiteInfo);
479private Conversion EncompassingExplicitConversion(BoundExpression expr, TypeSymbol a, TypeSymbol b, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
502private Conversion EncompassingExplicitConversion(TypeSymbol a, TypeSymbol b, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\Semantics\Conversions\UserDefinedImplicitConversions.cs (50)
27TypeSymbol source,
28TypeSymbol target,
96TypeSymbol sx = MostSpecificSourceTypeForImplicitUserDefinedConversion(u, source, ref useSiteInfo);
103TypeSymbol tx = MostSpecificTargetTypeForImplicitUserDefinedConversion(u, target, ref useSiteInfo);
118private static void ComputeUserDefinedImplicitConversionTypeSet(TypeSymbol s, TypeSymbol t, ArrayBuilder<(NamedTypeSymbol ParticipatingType, TypeParameterSymbol ConstrainedToTypeOpt)> d, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
144TypeSymbol source,
145TypeSymbol target,
283TypeSymbol source,
284TypeSymbol target,
300TypeSymbol convertsFrom = op.GetParameterType(0);
301TypeSymbol convertsTo = op.ReturnType;
348TypeSymbol nullableFrom = MakeNullableType(convertsFrom);
349TypeSymbol nullableTo = convertsTo.IsValidNullableTypeArgument() ? MakeNullableType(convertsTo) : convertsTo;
365private TypeSymbol MostSpecificSourceTypeForImplicitUserDefinedConversion(ImmutableArray<UserDefinedConversionAnalysis> u, TypeSymbol source, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
370if (u.Any(static (conv, source) => TypeSymbol.Equals(conv.FromType, source, TypeCompareKind.ConsiderEverything2), source))
381private TypeSymbol MostSpecificTargetTypeForImplicitUserDefinedConversion(ImmutableArray<UserDefinedConversionAnalysis> u, TypeSymbol target, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
404if (u.Any(static (conv, target) => TypeSymbol.Equals(conv.ToType, target, TypeCompareKind.ConsiderEverything2), target))
415if (!TypeSymbol.Equals(conv.FromType, conv.Operator.GetParameterType(0), TypeCompareKind.ConsiderEverything2))
420if (!TypeSymbol.Equals(conv.ToType, conv.Operator.ReturnType, TypeCompareKind.ConsiderEverything2))
428private static int? MostSpecificConversionOperator(TypeSymbol sx, TypeSymbol tx, ImmutableArray<UserDefinedConversionAnalysis> u)
430return MostSpecificConversionOperator(conv => TypeSymbol.Equals(conv.FromType, sx, TypeCompareKind.ConsiderEverything2) && TypeSymbol.Equals(conv.ToType, tx, TypeCompareKind.ConsiderEverything2), u);
575private bool IsEncompassedBy(BoundExpression aExpr, TypeSymbol a, TypeSymbol b, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
589private bool IsEncompassedBy(TypeSymbol a, TypeSymbol b, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
594private Conversion EncompassingImplicitConversion(BoundExpression aExpr, TypeSymbol a, TypeSymbol b, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
609private Conversion EncompassingImplicitConversion(TypeSymbol a, TypeSymbol b, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
689private TypeSymbol MostEncompassedType<T>(
691Func<T, TypeSymbol> extract,
697private TypeSymbol MostEncompassedType<T>(
700Func<T, TypeSymbol> extract,
731TypeSymbol leftType = extract(left);
732TypeSymbol rightType = extract(right);
733if (TypeSymbol.Equals(leftType, rightType, TypeCompareKind.ConsiderEverything2))
751private TypeSymbol MostEncompassingType<T>(
753Func<T, TypeSymbol> extract,
759private TypeSymbol MostEncompassingType<T>(
762Func<T, TypeSymbol> extract,
770TypeSymbol leftType = extract(left);
771TypeSymbol rightType = extract(right);
772if (TypeSymbol.Equals(leftType, rightType, TypeCompareKind.ConsiderEverything2))
885private NamedTypeSymbol MakeNullableType(TypeSymbol type)
894protected UserDefinedConversionResult AnalyzeImplicitUserDefinedConversionForV6SwitchGoverningType(TypeSymbol source, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\Semantics\Operators\BinaryOperatorOverloadResolution.cs (43)
78TypeSymbol leftOperatorSourceOpt = left.Type?.StrippedType();
79TypeSymbol rightOperatorSourceOpt = right.Type?.StrippedType();
138var lookedInInterfaces = PooledDictionary<TypeSymbol, bool>.GetInstance();
140TypeSymbol firstOperatorSourceOpt;
141TypeSymbol secondOperatorSourceOpt;
223TypeSymbol operatorSourceOpt, bool sourceIsInterface,
225Dictionary<TypeSymbol, bool> lookedInInterfaces, ArrayBuilder<BinaryOperatorAnalysisResult> candidates)
236TypeSymbol constrainedToTypeOpt = null;
318private void AddDelegateOperation(BinaryOperatorKind kind, TypeSymbol delegateType,
373var leftType = left.Type;
375var rightType = right.Type;
393TypeSymbol systemDelegateType = _binder.Compilation.GetSpecialType(SpecialType.System_Delegate);
465TypeSymbol delegateType = leftDelegate ? leftType : rightType;
477private void GetEnumOperation(BinaryOperatorKind kind, TypeSymbol enumType, BoundExpression right, ArrayBuilder<BinaryOperatorSignature> operators)
517bool isExactSubtraction = TypeSymbol.Equals(right.Type?.StrippedType(), underlying, TypeCompareKind.ConsiderEverything2);
621var leftType = left.Type;
627var rightType = right.Type;
790Conversion getOperandConversionForAllowByRefLikeNullCheck(bool isChecked, BoundExpression operand, TypeSymbol objectType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
860static bool equalsIgnoringNullable(TypeSymbol a, TypeSymbol b) => a.Equals(b, TypeCompareKind.AllNullableIgnoreOptions);
861static bool equalsIgnoringNullableAndDynamic(TypeSymbol a, TypeSymbol b) => a.Equals(b, TypeCompareKind.AllNullableIgnoreOptions | TypeCompareKind.IgnoreDynamic);
869TypeSymbol type0,
948TypeSymbol constrainedToTypeOpt,
989private static void GetDeclaredUserDefinedBinaryOperators(TypeSymbol? constrainedToTypeOpt, NamedTypeSymbol type, BinaryOperatorKind kind, string name, ArrayBuilder<BinaryOperatorSignature> operators)
997private static void GetDeclaredUserDefinedBinaryOperators(TypeSymbol? constrainedToTypeOpt, ArrayBuilder<MethodSymbol> typeOperators, BinaryOperatorKind kind, string name, ArrayBuilder<BinaryOperatorSignature> operators)
1012TypeSymbol leftOperandType = op.GetParameterType(0);
1013TypeSymbol rightOperandType = op.GetParameterType(1);
1014TypeSymbol resultType = op.ReturnType;
1020void AddLiftedUserDefinedBinaryOperators(TypeSymbol? constrainedToTypeOpt, BinaryOperatorKind kind, ArrayBuilder<BinaryOperatorSignature> operators)
1025TypeSymbol leftOperandType = op.GetParameterType(0);
1026TypeSymbol rightOperandType = op.GetParameterType(1);
1027TypeSymbol resultType = op.ReturnType;
1055private static LiftingResult UserDefinedBinaryOperatorCanBeLifted(TypeSymbol left, TypeSymbol right, TypeSymbol result, BinaryOperatorKind kind)
1084if (!TypeSymbol.Equals(left, right, TypeCompareKind.ConsiderEverything2)) return LiftingResult.NotLifted;
1374TypeSymbol op1Left, op1Right, op2Left, op2Right;
1409using var uninst1 = TemporaryArray<TypeSymbol>.Empty;
1410using var uninst2 = TemporaryArray<TypeSymbol>.Empty;
1548TypeSymbol leftOperandType = method.GetParameterType(0);
1549TypeSymbol rightOperandType = method.GetParameterType(1);
1550TypeSymbol resultType = method.ReturnType;
Binder\Semantics\Operators\BinaryOperatorSignature.cs (14)
18public readonly TypeSymbol LeftType;
19public readonly TypeSymbol RightType;
20public readonly TypeSymbol ReturnType;
22public readonly TypeSymbol ConstrainedToTypeOpt;
32public BinaryOperatorSignature(BinaryOperatorKind kind, TypeSymbol leftType, TypeSymbol rightType, TypeSymbol returnType)
43public BinaryOperatorSignature(BinaryOperatorKind kind, TypeSymbol leftType, TypeSymbol rightType, TypeSymbol returnType, MethodSymbol method, TypeSymbol constrainedToTypeOpt)
63TypeSymbol.Equals(this.LeftType, other.LeftType, TypeCompareKind.ConsiderEverything2) &&
64TypeSymbol.Equals(this.RightType, other.RightType, TypeCompareKind.ConsiderEverything2) &&
65TypeSymbol.Equals(this.ReturnType, other.ReturnType, TypeCompareKind.ConsiderEverything2) &&
Binder\Semantics\Operators\UnaryOperatorOverloadResolution.cs (14)
19private NamedTypeSymbol MakeNullable(TypeSymbol type)
189TypeSymbol operandType = method.GetParameterType(0);
190TypeSymbol resultType = method.ReturnType;
553var enumType = operand.Type;
643TypeSymbol type0 = operand.Type.StrippedType();
644TypeSymbol constrainedToTypeOpt = type0 as TypeParameterSymbol;
753TypeSymbol constrainedToTypeOpt,
794private static void GetDeclaredUserDefinedUnaryOperators(TypeSymbol? constrainedToTypeOpt, NamedTypeSymbol type, UnaryOperatorKind kind, string name, ArrayBuilder<UnaryOperatorSignature> operators)
802private static void GetDeclaredUserDefinedUnaryOperators(TypeSymbol? constrainedToTypeOpt, IEnumerable<MethodSymbol> typeOperators, UnaryOperatorKind kind, string name, ArrayBuilder<UnaryOperatorSignature> operators)
817TypeSymbol operandType = op.GetParameterType(0);
818TypeSymbol resultType = op.ReturnType;
824private void AddLiftedUserDefinedUnaryOperators(TypeSymbol? constrainedToTypeOpt, UnaryOperatorKind kind, ArrayBuilder<UnaryOperatorSignature> operators)
844TypeSymbol operandType = op.GetParameterType(0);
845TypeSymbol resultType = op.ReturnType;
Binder\Semantics\OverloadResolution\MethodTypeInference.cs (50)
509TypeSymbol.Equals(typeParameter, _methodTypeParameters[ordinal], TypeCompareKind.ConsiderEverything2) &&
558private TypeSymbol GetFixedDelegateOrFunctionPointer(TypeSymbol delegateOrFunctionPointerType)
668TypeSymbol targetType = target.Type;
1008private static bool DoesInputTypeContain(BoundExpression argument, TypeSymbol formalParameterType, TypeParameterSymbol typeParameter)
1014var delegateOrFunctionPointerType = formalParameterType.GetDelegateOrFunctionPointerType();
1044private bool HasUnfixedParamInInputType(BoundExpression pSource, TypeSymbol pDest)
1063private static bool DoesOutputTypeContain(BoundExpression argument, TypeSymbol formalParameterType,
1070var delegateOrFunctionPointerType = formalParameterType.GetDelegateOrFunctionPointerType();
1095var returnType = method.ReturnType;
1104private bool HasUnfixedParamInOutputType(BoundExpression argument, TypeSymbol formalParameterType)
1144var formalParameterType = _formalParameterTypes[iArg].Type;
1436private bool MethodGroupReturnTypeInference(Binder binder, BoundExpression source, TypeSymbol target, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
1451var delegateOrFunctionPointerType = target.GetDelegateOrFunctionPointerType();
1737private bool ExactSpanInference(TypeSymbol source, TypeSymbol target, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
1764private static TypeWithAnnotations GetSpanElementType(TypeSymbol type)
1770private static TypeWithAnnotations GetSpanOrSZArrayElementType(TypeSymbol type)
1877if (!TypeSymbol.Equals(namedSource.OriginalDefinition, namedTarget.OriginalDefinition, TypeCompareKind.ConsiderEverything2))
1944Debug.Assert(TypeSymbol.Equals(source.OriginalDefinition, target.OriginalDefinition, TypeCompareKind.ConsiderEverything2));
2076private static TypeWithAnnotations GetMatchingElementType(ArrayTypeSymbol source, TypeSymbol target, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
2111private bool LowerBoundArrayInference(TypeSymbol source, TypeSymbol target, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
2149private bool LowerBoundSpanInference(TypeSymbol source, TypeSymbol target, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
2192private bool LowerBoundConstructedInference(TypeSymbol source, TypeSymbol target, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
2219TypeSymbol.Equals(constructedSource.OriginalDefinition, constructedTarget.OriginalDefinition, TypeCompareKind.ConsiderEverything2))
2256private bool LowerBoundClassInference(TypeSymbol source, NamedTypeSymbol target, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
2291if (TypeSymbol.Equals(sourceBase.OriginalDefinition, target.OriginalDefinition, TypeCompareKind.ConsiderEverything2))
2301private bool LowerBoundInterfaceInference(TypeSymbol source, NamedTypeSymbol target, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
2386Debug.Assert(TypeSymbol.Equals(source.OriginalDefinition, target.OriginalDefinition, TypeCompareKind.ConsiderEverything2));
2425private bool LowerBoundFunctionPointerTypeInference(TypeSymbol source, TypeSymbol target, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
2597var source = sourceWithAnnotations.Type;
2598var target = targetWithAnnotations.Type;
2619TypeSymbol.Equals(constructedSource.OriginalDefinition, target.OriginalDefinition, TypeCompareKind.ConsiderEverything2))
2653private bool UpperBoundClassInference(NamedTypeSymbol source, TypeSymbol target, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
2670if (TypeSymbol.Equals(targetBase.OriginalDefinition, source.OriginalDefinition, TypeCompareKind.ConsiderEverything2))
2682private bool UpperBoundInterfaceInference(NamedTypeSymbol source, TypeSymbol target, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
2736Debug.Assert(TypeSymbol.Equals(source.OriginalDefinition, target.OriginalDefinition, TypeCompareKind.ConsiderEverything2));
2775private bool UpperBoundFunctionPointerTypeInference(TypeSymbol source, TypeSymbol target, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
3023static bool isExpressionType(TypeSymbol? type)
3039var source = sourceWithAnnotations.Type;
3040var destination = destinationWithAnnotations.Type;
3161if (TypeSymbol.Equals(currentInterface.OriginalDefinition, target.OriginalDefinition, TypeCompareKind.ConsiderEverything))
3167else if (!TypeSymbol.Equals(matchingInterface, currentInterface, TypeCompareKind.ConsiderEverything))
3306TypeSymbol source = argument.Type;
3351private static bool IsReallyAType(TypeSymbol? type)
Binder\Semantics\OverloadResolution\OverloadResolution.cs (76)
146TypeSymbol returnType = null,
194TypeSymbol returnType = null,
435TypeSymbol returnType,
851TypeSymbol returnType,
1324public static bool TryInferParamsCollectionIterationType(Binder binder, TypeSymbol type, out TypeWithAnnotations elementType)
1486bool typeArgumentsAccessible(ImmutableArray<TypeSymbol> typeArguments, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
1488foreach (TypeSymbol arg in typeArguments)
1619private static bool IsLessDerivedThanAny<TMember>(int index, TypeSymbol type, ArrayBuilder<MemberResolutionResult<TMember>> results, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
2177var type1 = getParameterTypeAndRefKind(i, m1.Result, m1LeastOverriddenParameters, m1.Result.ParamsElementTypeOpt, m1.LeastOverriddenMember, out RefKind parameter1RefKind);
2179var type2 = getParameterTypeAndRefKind(i, m2.Result, m2LeastOverriddenParameters, m2.Result.ParamsElementTypeOpt, m2.LeastOverriddenMember, out RefKind parameter2RefKind);
2195var type1Normalized = type1;
2196var type2Normalized = type2;
2319var type1 = getParameterTypeAndRefKind(i, m1.Result, m1LeastOverriddenParameters, m1.Result.ParamsElementTypeOpt, m1.LeastOverriddenMember, out _);
2321var type2 = getParameterTypeAndRefKind(i, m2.Result, m2LeastOverriddenParameters, m2.Result.ParamsElementTypeOpt, m2.LeastOverriddenMember, out _);
2323var type1Normalized = type1;
2324var type2Normalized = type2;
2463using (var uninst1 = TemporaryArray<TypeSymbol>.Empty)
2464using (var uninst2 = TemporaryArray<TypeSymbol>.Empty)
2551TypeSymbol t1 = m1LeastOverriddenParameters[^1].Type;
2552TypeSymbol t2 = m2LeastOverriddenParameters[^1].Type;
2568static TypeSymbol getParameterTypeAndRefKind(int i, MemberAnalysisResult memberResolutionResult, ImmutableArray<ParameterSymbol> parameters,
2575var type = parameter.Type;
2743private static BetterResult MoreSpecificType(ref TemporaryArray<TypeSymbol> t1, ref TemporaryArray<TypeSymbol> t2, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
2775private static BetterResult MoreSpecificType(TypeSymbol t1, TypeSymbol t2, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
2852using var allTypeArgs1 = TemporaryArray<TypeSymbol>.Empty;
2853using var allTypeArgs2 = TemporaryArray<TypeSymbol>.Empty;
2863private BetterResult BetterConversionFromExpression(BoundExpression node, TypeSymbol t1, TypeSymbol t2, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
2879TypeSymbol t1,
2882TypeSymbol t2,
2933private BetterResult BetterConversionFromExpression(BoundExpression node, TypeSymbol t1, Conversion conv1, TypeSymbol t2, Conversion conv2, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, out bool okToDowngradeToNeither)
3042TypeSymbol t1, Conversion conv1,
3043TypeSymbol t2, Conversion conv2,
3046var kind1 = conv1.GetCollectionExpressionTypeKind(out TypeSymbol elementType1, out _, out _);
3047var kind2 = conv2.GetCollectionExpressionTypeKind(out TypeSymbol elementType2, out _, out _);
3076TypeSymbol t1, CollectionExpressionTypeKind kind1, TypeSymbol elementType1, ImmutableArray<Conversion> underlyingElementConversions1,
3077TypeSymbol t2, CollectionExpressionTypeKind kind2, TypeSymbol elementType2, ImmutableArray<Conversion> underlyingElementConversions2,
3183TypeSymbol t1, CollectionExpressionTypeKind kind1, TypeSymbol elementType1,
3184TypeSymbol t2, CollectionExpressionTypeKind kind2, TypeSymbol elementType2,
3214bool hasImplicitConversion(TypeSymbol source, TypeSymbol destination, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) =>
3218private BetterResult BetterParamsCollectionType(TypeSymbol t1, TypeSymbol t2, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
3240private static bool IsSZArrayOrArrayInterface(TypeSymbol type, out TypeSymbol elementType)
3258private bool ExpressionMatchExactly(BoundExpression node, TypeSymbol t, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
3282TypeSymbol y;
3374private bool ExpressionMatchExactly(BoundTupleLiteral tupleSource, TypeSymbol targetType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
3445TypeSymbol type1,
3446TypeSymbol type2,
3461TypeSymbol type1,
3463TypeSymbol type2,
3473TypeSymbol type1,
3475TypeSymbol type2,
3573TypeSymbol r1 = invoke1.ReturnType;
3574TypeSymbol r2 = invoke2.ReturnType;
3649static bool isBetterSpanConversionTarget(TypeSymbol type1, TypeSymbol type2)
3654var type1Element = ((NamedTypeSymbol)type1).TypeArgumentsWithAnnotationsNoUseSiteDiagnostics[0].Type;
3655var type2Element = ((NamedTypeSymbol)type2).TypeArgumentsWithAnnotationsNoUseSiteDiagnostics[0].Type;
3677private bool CanDowngradeConversionFromLambdaToNeither(BetterResult currentResult, UnboundLambda lambda, TypeSymbol type1, TypeSymbol type2, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, bool fromTypeAnalysis)
3706TypeSymbol r1 = invoke1.ReturnType;
3707TypeSymbol r2 = invoke2.ReturnType;
3801private static bool IsSignedIntegralType(TypeSymbol type)
3822private static bool IsUnsignedIntegralType(TypeSymbol type)
4691TypeSymbol parameterType,
4724var argType = argument.Type;
4764private static bool TypeContainsTypeParameterFromContainer(Symbol container, TypeSymbol parameterType)
Binder\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)
BoundTree\Constructors.cs (32)
30TypeSymbol type,
43TypeSymbol type,
54TypeSymbol typeSymbol)
100TypeSymbol type,
118TypeSymbol type)
309TypeSymbol type,
324TypeSymbol type)
335public static BoundConversion SynthesizedNonUserDefined(SyntaxNode syntax, BoundExpression operand, Conversion conversion, TypeSymbol type, ConstantValue? constantValueOpt = null)
363TypeSymbol type,
389TypeSymbol type,
414TypeSymbol? constrainedToTypeOpt,
417TypeSymbol type,
435TypeSymbol? constrainedToTypeOpt,
439TypeSymbol type,
448TypeSymbol? constrainedToTypeOpt,
452TypeSymbol type)
495public BoundTypeExpression(SyntaxNode syntax, AliasSymbol? aliasOpt, TypeSymbol type, bool hasErrors = false)
527TypeSymbol type, bool isRef = false, bool hasErrors = false)
535public BoundBadExpression(SyntaxNode syntax, LookupResultKind resultKind, ImmutableArray<Symbol?> symbols, ImmutableArray<BoundExpression> childBoundNodes, TypeSymbol type)
615public BoundDefaultExpression(SyntaxNode syntax, TypeSymbol type, bool hasErrors = false)
631public BoundAddressOfOperator(SyntaxNode syntax, BoundExpression operand, TypeSymbol type, bool hasErrors = false)
639public BoundDagTemp(SyntaxNode syntax, TypeSymbol type, BoundDagEvaluation? source)
658TypeSymbol type,
672TypeSymbol type)
684TypeSymbol? constrainedToTypeOpt,
686TypeSymbol type,
696TypeSymbol? constrainedToTypeOpt,
698TypeSymbol type)
709TypeSymbol? constrainedToTypeOpt,
715TypeSymbol type,
721public BoundIncrementOperator Update(UnaryOperatorKind operatorKind, BoundExpression operand, MethodSymbol? methodOpt, TypeSymbol? constrainedToTypeOpt, BoundValuePlaceholder? operandPlaceholder, BoundExpression? operandConversion, BoundValuePlaceholder? resultPlaceholder, BoundExpression? resultConversion, LookupResultKind resultKind, TypeSymbol type)
BoundTree\UnboundLambda.cs (16)
82public BoundLambda(SyntaxNode syntax, UnboundLambda unboundLambda, BoundBlock body, ReadOnlyBindingDiagnostic<AssemblySymbol> diagnostics, Binder binder, TypeSymbol? delegateType, InferredLambdaReturnType inferredReturnType)
190internal static readonly TypeSymbol NoReturnExpression = new UnsupportedMetadataTypeSymbol();
193BoundLambda node, Binder binder, TypeSymbol? delegateType, bool isAsync, ConversionsBase conversions)
200UnboundLambda node, Binder binder, TypeSymbol? delegateType, bool isAsync, ConversionsBase conversions)
210BoundNode node, Binder binder, TypeSymbol? delegateType, bool isAsync, ConversionsBase conversions, bool withDependencies)
252TypeSymbol? delegateType,
275var bestType = returns[0].expr.GetTypeOrFunctionType();
296var bestType = BestTypeInferrer.InferBestType(returns.SelectAsArray(pair => pair.expr), conversions, ref useSiteInfo, out inferredFromFunctionType);
384var type = (expression is null) ?
498public void GenerateAnonymousFunctionConversionError(BindingDiagnosticBag diagnostics, TypeSymbol targetType) { Data.GenerateAnonymousFunctionConversionError(diagnostics, targetType); }
504public TypeSymbol ParameterType(int index) { return ParameterTypeWithAnnotations(index).Type; }
621public virtual void GenerateAnonymousFunctionConversionError(BindingDiagnosticBag diagnostics, TypeSymbol targetType)
640internal IEnumerable<TypeSymbol> InferredReturnTypes()
1064Debug.Assert(taskLikeReturnTypeOpt is null || ((object)taskLikeReturnTypeOpt == taskLikeReturnTypeOpt.ConstructedFrom && taskLikeReturnTypeOpt.IsCustomTaskType(out var builderArgument)));
1081!TypeSymbol.Equals(other.TaskLikeReturnTypeOpt, this.TaskLikeReturnTypeOpt, TypeCompareKind.ConsiderEverything2))
1154if (delegateReturnType.IsCustomTaskType(out var builderType))
CodeGen\CodeGenerator_RefSafety.cs (4)
12/// <inheritdoc cref="MightEscapeTemporaryRefs(bool, TypeSymbol, RefKind, ParameterSymbol?, ImmutableArray{ParameterSymbol})"/>
23/// <inheritdoc cref="MightEscapeTemporaryRefs(bool, TypeSymbol, RefKind, ParameterSymbol?, ImmutableArray{ParameterSymbol})"/>
34/// <inheritdoc cref="MightEscapeTemporaryRefs(bool, TypeSymbol, RefKind, ParameterSymbol?, ImmutableArray{ParameterSymbol})"/>
63TypeSymbol returnType,
CodeGen\EmitArrayInitializer.cs (5)
225TypeSymbol type = init.Type.EnumUnderlyingTypeOrSelf();
246private ArrayInitializerStyle ShouldEmitBlockInitializer(TypeSymbol elementType, ImmutableArray<BoundExpression> inits)
470TypeSymbol? elementType = null;
630bool tryEmitAsCachedArrayFromBlob(NamedTypeSymbol spanType, BoundExpression wrappedExpression, int elementCount, ImmutableArray<byte> data, ref ArrayTypeSymbol arrayType, TypeSymbol elementType)
680bool tryEmitAsCachedArrayOfConstants(BoundArrayCreation arrayCreation, ArrayTypeSymbol arrayType, TypeSymbol elementType, NamedTypeSymbol spanType, bool used, BoundExpression? inPlaceTarget, out bool avoidInPlace)
CodeGen\EmitExpression.cs (41)
382var receiverType = expression.Type;
409var receiverType = receiver.Type;
819var thisType = thisRef.Type;
1027var elementType = arrayAccess.Type;
1181TypeSymbol fieldType = field.Type;
1330var type = expr.Type;
1437var parameterType = parameter.ParameterSymbol.Type;
1442private void EmitLoadIndirect(TypeSymbol type, SyntaxNode syntaxNode)
1656Debug.Assert(TypeSymbol.Equals(method.ContainingType, receiver.Type, TypeCompareKind.ConsiderEverything2));
1733var parentCallReceiverType = call.Type;
1858var receiverType = receiver.Type;
1894Debug.Assert(TypeSymbol.Equals(receiverType, methodContainingType, TypeCompareKind.ObliviousNullableModifierMatchesAny));
1944var receiverType = receiver.Type;
2050var receiverType = receiver.Type;
2113var receiverType = receiver.Type;
2630var rightType = right.Type;
3251var elementType = arrayType.ElementType;
3349private void EmitIndirectStore(TypeSymbol type, SyntaxNode syntaxNode)
3451var operandType = operand.Type;
3452var targetType = asOp.Type;
3470private void EmitDefaultValue(TypeSymbol type, bool used, SyntaxNode syntaxNode)
3514private void EmitConstantExpression(TypeSymbol type, ConstantValue constantValue, bool used, SyntaxNode syntaxNode)
3533private void EmitInitObj(TypeSymbol type, bool used, SyntaxNode syntaxNode)
3556TypeSymbol type = boundTypeOfOperator.SourceType.Type;
3564TypeSymbol type = boundSizeOfOperator.SourceType.Type;
3731if (!TypeSymbol.Equals(node.Type, getMethod.ReturnType, TypeCompareKind.ConsiderEverything2))
3758if (!TypeSymbol.Equals(node.Type, getField.ReturnType, TypeCompareKind.ConsiderEverything2))
3823var mergeTypeOfAlternative = StackMergeType(expr.Alternative);
3831else if (expr.Type.IsInterfaceType() && !TypeSymbol.Equals(expr.Type, mergeTypeOfAlternative, TypeCompareKind.ConsiderEverything2))
3849var mergeTypeOfConsequence = StackMergeType(expr.Consequence);
3855else if (expr.Type.IsInterfaceType() && !TypeSymbol.Equals(expr.Type, mergeTypeOfConsequence, TypeCompareKind.ConsiderEverything2))
3884var mergeTypeOfLeftValue = StackMergeType(expr.LeftOperand);
3892else if (expr.Type.IsInterfaceType() && !TypeSymbol.Equals(expr.Type, mergeTypeOfLeftValue, TypeCompareKind.ConsiderEverything2))
3916var mergeTypeOfRightValue = StackMergeType(expr.RightOperand);
3942private TypeSymbol StackMergeType(BoundExpression expr)
4000private static bool IsVarianceCast(TypeSymbol to, TypeSymbol from)
4002if (TypeSymbol.Equals(to, from, TypeCompareKind.ConsiderEverything2))
4020return (to.IsDelegateType() && !TypeSymbol.Equals(to, from, TypeCompareKind.ConsiderEverything2)) ||
4024private void EmitStaticCast(TypeSymbol to, SyntaxNode syntax)
4044private void EmitBox(TypeSymbol type, SyntaxNode syntaxNode)
CodeGen\EmitStackAllocInitializer.cs (7)
16private void EmitStackAlloc(TypeSymbol type, BoundArrayInitialization? inits, BoundExpression count)
27var elementType = (type.TypeKind == TypeKind.Pointer
75Debug.Assert(TypeSymbol.Equals(readOnlySpan.OriginalDefinition, _module.Compilation.GetWellKnownType(WellKnownType.System_ReadOnlySpan_T), TypeCompareKind.ConsiderEverything));
129private ArrayInitializerStyle ShouldEmitBlockInitializerForStackAlloc(TypeSymbol elementType, ImmutableArray<BoundExpression> inits)
181private void EmitElementStackAllocInitializers(TypeSymbol elementType, ImmutableArray<BoundExpression> inits, bool includeConstants)
199private void EmitPointerElementAccess(BoundExpression init, TypeSymbol elementType, int elementTypeSizeInBytes, int index)
226private void EmitIntConstantOrSizeOf(BoundExpression init, TypeSymbol elementType, int elementTypeSizeInBytes)
CodeGen\EmitStatement.cs (12)
178var exprType = thrown.Type;
200private static bool CanPassToBrfalse(TypeSymbol ts)
252var nonConstType = nonConstOp.Type;
530var receiverType = receiver.Type;
610var conditionType = condition.Type;
1372TypeSymbol keyType)
1487void emitFinalDispatches(LengthBasedStringSwitchData lengthBasedSwitchInfo, LocalOrParameter keyTemp, TypeSymbol keyType, LabelSymbol fallThroughLabel, SyntaxNode syntaxNode)
1517TypeSymbol keyType)
1658private Cci.IMethodReference? GetLengthMethodRef(SyntaxNode syntaxNode, TypeSymbol keyType, bool isReadOnlySpan, bool isSpanOrReadOnlySpan)
1682private Microsoft.Cci.IMethodReference? GetIndexerRef(SyntaxNode syntaxNode, TypeSymbol keyType, bool isReadOnlySpan, bool isSpanOrReadOnlySpan)
1828TypeSymbol pointedAtType = pointerType.PointedAtType;
1934private LocalDefinition AllocateTemp(TypeSymbol type, SyntaxNode syntaxNode, LocalSlotConstraints slotConstraints = LocalSlotConstraints.None)
Compilation\CSharpCompilation.cs (44)
62private TypeSymbol? _lazyHostObjectTypeSymbol;
150private ConcurrentCache<TypeSymbol, NamedTypeSymbol>? _lazyTypeToNullableVersion;
333var methodReturn = method.ReturnType.OriginalDefinition;
1719private ConcurrentCache<TypeSymbol, NamedTypeSymbol> TypeToNullableVersion
1723return InterlockedOperations.Initialize(ref _lazyTypeToNullableVersion, static () => new ConcurrentCache<TypeSymbol, NamedTypeSymbol>(size: 100));
1734internal NamedTypeSymbol GetOrCreateNullableType(TypeSymbol typeArgument)
1751static bool isSupportedType(TypeSymbol typeArgument)
1795internal TypeSymbol GetTypeByReflectionType(Type type, BindingDiagnosticBag diagnostics)
1797var result = Assembly.GetTypeByReflectionType(type);
1822internal TypeSymbol? GetHostObjectTypeSymbol()
1826TypeSymbol? symbol = Assembly.GetTypeByReflectionType(HostObjectType);
1868internal new TypeSymbol DynamicType
2234if (!(TypeSymbol.Equals(namedType.ConstructedFrom, GetWellKnownType(WellKnownType.System_Threading_Tasks_Task), TypeCompareKind.ConsiderEverything2) ||
2235TypeSymbol.Equals(namedType.ConstructedFrom, GetWellKnownType(WellKnownType.System_Threading_Tasks_Task_T), TypeCompareKind.ConsiderEverything2)))
2252var returnType = result?.Type ?? runtimeAwaitCall!.Type;
2270TypeSymbol returnType = method.ReturnType;
2365TypeSymbol? cssource = source.EnsureCSharpSymbolOrNull(nameof(source));
2366TypeSymbol? csdest = destination.EnsureCSharpSymbolOrNull(nameof(destination));
2424internal ArrayTypeSymbol CreateArrayTypeSymbol(TypeSymbol elementType, int rank = 1, NullableAnnotation elementNullableAnnotation = NullableAnnotation.Oblivious)
2442internal PointerTypeSymbol CreatePointerTypeSymbol(TypeSymbol elementType, NullableAnnotation elementNullableAnnotation = NullableAnnotation.Oblivious)
2459TypeSymbol? throughType0 = throughType.EnsureCSharpSymbolOrNull(nameof(throughType));
4237var elementType = typeSymbol.EnsureCSharpSymbolOrNull($"{nameof(elementTypes)}[{i}]");
4303var type = memberTypes[i].GetSymbol();
4321var csharpReturnType = returnType.EnsureCSharpSymbolOrNull(nameof(returnType));
4322var csharpLeftType = leftType.EnsureCSharpSymbolOrNull(nameof(leftType));
4323var csharpRightType = rightType.EnsureCSharpSymbolOrNull(nameof(rightType));
4391TypeSymbol.Equals(csharpLeftType, csharpRightType, TypeCompareKind.ConsiderEverything))
4404TypeSymbol.Equals(csharpLeftType, csharpReturnType, TypeCompareKind.ConsiderEverything))
4425TypeSymbol.Equals(csharpLeftType, csharpRightType, TypeCompareKind.ConsiderEverything))
4436TypeSymbol.Equals(csharpLeftType, csharpRightType, TypeCompareKind.ConsiderEverything) &&
4437TypeSymbol.Equals(csharpReturnType, csharpRightType, TypeCompareKind.ConsiderEverything))
4450TypeSymbol.Equals(csharpLeftType, csharpReturnType, TypeCompareKind.ConsiderEverything))
4457TypeSymbol.Equals(csharpRightType, csharpReturnType, TypeCompareKind.ConsiderEverything))
4466TypeSymbol.Equals(csharpLeftType, csharpRightType, TypeCompareKind.ConsiderEverything))
4490TypeSymbol.Equals(csharpLeftType, csharpReturnType, TypeCompareKind.ConsiderEverything))
4499TypeSymbol.Equals(csharpRightType, csharpReturnType, TypeCompareKind.ConsiderEverything))
4508TypeSymbol.Equals(csharpLeftType, csharpReturnType, TypeCompareKind.ConsiderEverything))
4517TypeSymbol.Equals(csharpLeftType, csharpRightType, TypeCompareKind.ConsiderEverything))
4534bool isAllowedPointerArithmeticIntegralType(TypeSymbol type)
4537bool isReadOnlySpanOfByteType(TypeSymbol type)
4546var csharpReturnType = returnType.EnsureCSharpSymbolOrNull(nameof(returnType));
4547var csharpOperandType = operandType.EnsureCSharpSymbolOrNull(nameof(operandType));
4600TypeSymbol.Equals(csharpOperandType, csharpReturnType, TypeCompareKind.ConsiderEverything))
4608TypeSymbol.Equals(csharpOperandType, csharpReturnType, TypeCompareKind.ConsiderEverything))
Compilation\CSharpSemanticModel.cs (25)
967var declarationTypeSymbol = declarationType.GetSymbol();
1594TypeSymbol containingType = binder.ContainingType;
1595TypeSymbol baseType = null;
1658if ((options & LookupOptions.IncludeExtensionMembers) != 0 && container is TypeSymbol receiverType)
2060TypeSymbol type = null;
2100TypeSymbol convertedType;
2279static (TypeSymbol, NullabilityInfo) getTypeAndNullability(BoundExpression expr) => (expr.Type, expr.TopLevelNullability);
2330TypeSymbol type = unwrapped as TypeSymbol;
2367TypeSymbol type = UnwrapAlias(symbol) as TypeSymbol;
2847TypeSymbol cdestination = destination.EnsureCSharpSymbolOrNull(nameof(destination));
2893internal abstract Conversion ClassifyConversionForCast(ExpressionSyntax expression, TypeSymbol destination);
2909internal Conversion ClassifyConversionForCast(int position, ExpressionSyntax expression, TypeSymbol destination)
3745private static ParameterSymbol GetThisParameter(TypeSymbol typeOfThis, NamedTypeSymbol containingType, Symbol containingMember, out LookupResultKind resultKind)
3852TypeSymbol opType = increment.Operand.Type.StrippedType();
3904private static Symbol GetIntrinsicOperatorSymbol(BinaryOperatorKind op, bool isDynamic, TypeSymbol leftType, TypeSymbol rightType, TypeSymbol returnType, bool isChecked)
4008TypeSymbol.Equals((TypeSymbol)unwrappedSymbols[0], boundAttribute.Type.GetNonErrorGuess(), TypeCompareKind.ConsiderEverything2));
4105TypeSymbol type = boundNode.Type;
4694TypeSymbol receiverType,
4720TypeSymbol receiverType,
4763TypeSymbol receiverType = null;
Emitter\Model\PEModuleBuilder.cs (9)
28internal abstract class PEModuleBuilder : PEModuleBuilder<CSharpCompilation, SourceModuleSymbol, AssemblySymbol, TypeSymbol, NamedTypeSymbol, MethodSymbol, SyntaxNode, NoPia.EmbeddedTypesManager, ModuleCompilationState>
35private readonly ConcurrentSet<TypeSymbol> _reportedErrorTypesMap = new ConcurrentSet<TypeSymbol>();
1286TypeSymbol typeSymbol,
1798internal SynthesizedAttributeData SynthesizeNativeIntegerAttribute(Symbol symbol, TypeSymbol type)
1999TypeSymbol returnType = factory.SpecialType(SpecialType.System_Void);
2000TypeSymbol unmatchedValueType = factory.SpecialType(SpecialType.System_Object);
2046TypeSymbol returnType = factory.SpecialType(SpecialType.System_Void);
2066TypeSymbol returnType = factory.SpecialType(SpecialType.System_Void);
FlowAnalysis\NullableWalker.cs (172)
145public VisitResult(TypeSymbol? type, NullableAnnotation annotation, NullableFlowState state)
149Debug.Assert(TypeSymbol.Equals(RValueType.Type, LValueType.Type, TypeCompareKind.ConsiderEverything));
241private readonly ImmutableDictionary<BoundExpression, (NullabilityInfo Info, TypeSymbol? Type)>.Builder? _analyzedNullabilityMapOpt;
492ImmutableDictionary<BoundExpression, (NullabilityInfo, TypeSymbol?)>.Builder? analyzedNullabilityMapOpt,
980static ImmutableArray<Symbol> getAllTypeAndRequiredMembers(TypeSymbol containingType)
1608ImmutableDictionary<BoundExpression, (NullabilityInfo, TypeSymbol?)> analyzedNullabilitiesMap;
1613private static (SnapshotManager?, ImmutableDictionary<BoundExpression, (NullabilityInfo, TypeSymbol?)>) AnalyzeWithSemanticInfo(
1623var analyzedNullabilities = ImmutableDictionary.CreateBuilder<BoundExpression, (NullabilityInfo, TypeSymbol?)>(EqualityComparer<BoundExpression>.Default, NullabilityInfoTypeComparer.Instance);
1681var analyzedNullabilities = ImmutableDictionary.CreateBuilder<BoundExpression, (NullabilityInfo, TypeSymbol?)>(EqualityComparer<BoundExpression>.Default, NullabilityInfoTypeComparer.Instance);
1721private static BoundNode Rewrite(ImmutableDictionary<BoundExpression, (NullabilityInfo, TypeSymbol?)> updatedNullabilities, SnapshotManager? snapshotManager, BoundNode node, ref ImmutableDictionary<Symbol, Symbol>? remappedSymbols)
1848ImmutableDictionary<BoundExpression, (NullabilityInfo, TypeSymbol?)>.Builder? analyzedNullabilityMapOpt,
2126TypeSymbol slotType = NominalSlotType(result);
2127TypeSymbol? nodeType = node.Type;
2163var operandType = operand.Type;
2164var convertedType = conv.Type;
2181TypeSymbol.Equals(conv.Type, conv.Operand.Type, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes):
2350private static object GetTypeAsDiagnosticArgument(TypeSymbol? typeOpt)
2708private void InheritNullableStateOfTrackableStruct(TypeSymbol targetType, int targetSlot, int valueSlot, bool isDefaultValue, int skipSlot = -1)
2733TypeSymbol possibleBase = possibleMember.ContainingType;
2734TypeSymbol possibleDerived = NominalSlotType(slot);
2817private TypeSymbol NominalSlotType(int slot)
2849private void InheritDefaultState(TypeSymbol targetType, int targetSlot)
2854var actualType = GetTypeOrReturnType(_variables[targetSlot].Symbol);
2879private static TypeSymbol GetTypeOrReturnType(Symbol symbol) => symbol.GetTypeOrReturnType().Type;
3742private static bool AreCloseEnough(TypeSymbol? typeA, TypeSymbol? typeB)
3758static bool canIgnoreAnyType(TypeSymbol type)
3762static bool canIgnoreType(TypeSymbol type)
3808private static bool TypeAllowsConditionalState(TypeSymbol? type)
3814private void UnsplitIfNeeded(TypeSymbol? type)
3875var elementConversionCompletions = ArrayBuilder<Func<TypeWithAnnotations /*targetElementType*/, TypeSymbol /*targetCollectionType*/, TypeWithState>>.GetInstance();
3903void visitElement(BoundNode element, BoundCollectionExpression node, TypeWithAnnotations targetElementType, ArrayBuilder<Func<TypeWithAnnotations, TypeSymbol, TypeWithState>> elementConversionCompletions)
3995TypeWithState convertCollection(BoundCollectionExpression node, TypeWithAnnotations targetCollectionType, ArrayBuilder<Func<TypeWithAnnotations, TypeSymbol, TypeWithState>> completions)
3997var strippedTargetCollectionType = targetCollectionType.Type.StrippedType();
3998Debug.Assert(TypeSymbol.Equals(strippedTargetCollectionType, node.Type, TypeCompareKind.AllIgnoreOptions));
4037(CollectionExpressionTypeKind, TypeWithAnnotations) getCollectionDetails(BoundCollectionExpression node, TypeSymbol collectionType)
4100var type = node.Type;
4102(int slot, NullableFlowState resultState, Func<TypeSymbol, MethodSymbol?, int>? initialStateInferenceCompletion) =
4105Action<int, TypeSymbol>? initializerCompletion = null;
4117TypeSymbol? type,
4120Func<TypeSymbol, MethodSymbol?, int>? initialStateInferenceCompletion,
4121Action<int, TypeSymbol>? initializerCompletion,
4149Func<TypeSymbol, MethodSymbol?, int> initialStateInferenceCompletion,
4150Action<int, TypeSymbol>? initializerCompletion,
4158Debug.Assert(TypeSymbol.Equals(resultTypeWithAnnotations.Type, node.Type, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes));
4160var type = resultTypeWithAnnotations.Type;
4173static MethodSymbol? getConstructor(BoundObjectCreationExpressionBase node, TypeSymbol type)
4185(int slot, NullableFlowState resultState, Func<TypeSymbol, MethodSymbol?, int>? completion) inferInitialObjectState(
4186BoundExpression node, TypeSymbol type, MethodSymbol? constructor,
4256Func<TypeSymbol, MethodSymbol?, int> inferInitialObjectStateAsContinuation(
4262return (TypeSymbol type, MethodSymbol? constructor) =>
4276private Action<int, TypeSymbol>? VisitObjectCreationInitializer(int containingSlot, TypeSymbol containingType, BoundObjectInitializerExpressionBase node, bool delayCompletionForType)
4279Action<int, TypeSymbol>? completion = null;
4326private Action<int, TypeSymbol>? VisitObjectElementInitializer(int containingSlot, TypeSymbol containingType, BoundAssignmentOperator node, bool delayCompletionForType)
4345Action<int, TypeSymbol>? visitMemberInitializer(int containingSlot, TypeSymbol containingType, BoundAssignmentOperator node, bool delayCompletionForType)
4384Action<int, TypeSymbol>? setAnalyzedNullability(
4406Action<int, TypeSymbol>? setAnalyzedNullabilityAsContinuation(
4412return (int containingSlot, TypeSymbol containingType) =>
4426Symbol? getTargetMember(TypeSymbol containingType, BoundObjectInitializerMember objectInitializer)
4434Debug.Assert(TypeSymbol.Equals(objectInitializer.Type, GetTypeOrReturnType(symbol), TypeCompareKind.IgnoreNullableModifiersForReferenceTypes));
4482Action<int, Symbol>? visitNestedInitializer(int containingSlot, TypeSymbol containingType, Symbol symbol, BoundObjectInitializerExpressionBase initializer, bool delayCompletionForType)
4487Action<int, TypeSymbol>? nestedCompletion = VisitObjectCreationInitializer(slot, GetTypeOrReturnType(symbol), initializer, delayCompletionForType);
4493Symbol symbol, BoundObjectInitializerExpressionBase initializer, int slot, Action<int, TypeSymbol>? nestedCompletion,
4514Action<int, Symbol>? completeNestedInitializerAnalysisAsContinuation(BoundObjectInitializerExpressionBase initializer, Action<int, TypeSymbol>? nestedCompletion)
4575private Action<int, TypeSymbol>? VisitCollectionElementInitializer(BoundCollectionElementInitializer node, TypeSymbol containingType, bool delayCompletionForType)
4601Debug.Assert(TypeSymbol.Equals(containingType, receiverResult.RValueType.Type, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes));
4602Debug.Assert(TypeSymbol.Equals(containingType, receiverResult.LValueType.Type, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes));
4608Action<int, TypeSymbol>? setUpdatedSymbol(
4610TypeSymbol containingType,
4635Action<int, TypeSymbol>? setUpdatedSymbolAsContinuation(
4640return (int containingSlot, TypeSymbol containingType) =>
4650static MethodSymbol addMethodAsMemberOfContainingType(BoundCollectionElementInitializer node, TypeSymbol containingType, ref ImmutableArray<VisitResult> argumentResults)
4659Debug.Assert(TypeSymbol.Equals(containingType, receiverResult.RValueType.Type, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes));
4660Debug.Assert(TypeSymbol.Equals(containingType, receiverResult.LValueType.Type, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes));
4698protected override bool IsEmptyStructType(TypeSymbol type)
4834var arrayType = VisitArrayInitialization(node.Type, initialization, node.HasErrors);
4839private TypeSymbol VisitArrayInitialization(TypeSymbol type, BoundArrayInitialization initialization, bool hasErrors)
4856var resultType = type;
4889TypeSymbol? bestType = null;
4944static TypeSymbol setSpanElementType(NamedTypeSymbol namedType, TypeWithAnnotations elementType)
5008TypeSymbol? bestType = BestTypeInferrer.InferBestType(placeholders, walker._conversions, ref discardedUseSiteInfo, out inferredFromFunctionType);
5075TypeSymbol.Equals(node.Indices[0].Type, compilation.GetWellKnownType(WellKnownType.System_Range), TypeCompareKind.ConsiderEverything2))
5092var expressionType = VisitRvalueWithState(node.Expression).Type;
5111private TypeWithState InferResultNullability(BinaryOperatorKind operatorKind, MethodSymbol? methodOpt, TypeSymbol resultType, TypeWithState leftType, TypeWithState rightType)
5351TypeSymbol returnType,
5438TypeSymbol methodContainer = method.ContainingType;
5443TypeSymbol asMemberOfType = getTypeIfContainingType(methodContainer, leftUnderlyingType.Type, leftOperand) ??
5484TypeSymbol? getTypeIfContainingType(TypeSymbol baseType, TypeSymbol? derivedType, BoundExpression operand)
5681var receiverType = conditional.Receiver.Type!;
5727private static bool PossiblyNullableType([NotNullWhen(true)] TypeSymbol? operandType) => operandType?.CanContainNull() == true;
5783private void LearnFromNullTest(int slot, TypeSymbol? expressionType, ref LocalState state, bool markDependentSlotsNotNull)
5803private void MarkDependentSlotsNotNull(int slot, TypeSymbol expressionType, ref LocalState state, int depth = 2)
5825static IEnumerable<Symbol> getMembers(TypeSymbol type)
5843static NamedTypeSymbol effectiveBase(TypeSymbol type) => type switch
5849static ImmutableArray<NamedTypeSymbol> inheritedInterfaces(TypeSymbol type) => type switch
5895TypeSymbol.Equals(targetType.Type.GetNullableUnderlyingType(), node.Type, TypeCompareKind.AllIgnoreOptions));
5905Debug.Assert(TypeSymbol.Equals(targetType.Type, rightResult.Type, TypeCompareKind.AllIgnoreOptions));
5948var leftResultType = leftResult.Type;
5949var rightResultType = rightResult.Type;
5965(TypeSymbol ResultType, NullableFlowState LeftState) getLeftResultType(TypeSymbol leftType, TypeSymbol rightType)
5983(TypeSymbol ResultType, NullableFlowState LeftState) getResultStateWithRightType(TypeSymbol leftType, TypeSymbol rightType)
6170TypeSymbol accessType = accessTypeWithAnnotations.Type;
6171var oldType = node.Type;
6172var resultType =
6236TypeSymbol? refResultType = node.Type?.SetUnknownNullabilityForReferenceTypes();
6272TypeSymbol? resultType;
6497var rvalueType = _currentConditionalReceiverVisitResult.RValueType.Type;
6872static bool isWellKnownEqualityMethodOrImplementation(CSharpCompilation compilation, MethodSymbol method, TypeSymbol? receiverType, WellKnownMember wellKnownMember)
6892for (var baseType = receiverType; baseType is object && method is object; baseType = baseType.BaseTypeNoUseSiteDiagnostics)
7070var type = receiverType.Type;
7722void applyMemberPostConditions(int receiverSlot, TypeSymbol type, ImmutableArray<string> members, ref LocalState state)
7735void markMembersAsNotNull(int receiverSlot, TypeSymbol type, string memberName, ref LocalState state)
7919var argumentResultType = resultType.Type;
8007static bool hasNoNonNullableCounterpart(TypeSymbol? type)
8715private Conversion GenerateConversionForConditionalOperator(BoundExpression sourceExpression, TypeSymbol? sourceType, TypeSymbol destinationType, bool reportMismatch, bool isChecked)
8726private Conversion GenerateConversion(Conversions conversions, BoundExpression? sourceExpression, TypeSymbol? sourceType, TypeSymbol destinationType, bool fromExplicitCast, bool extensionMethodThisArgument, bool isChecked)
8804private static Symbol AsMemberOfType(TypeSymbol? type, Symbol symbol)
9019private static bool AreNullableAndUnderlyingTypes([NotNullWhen(true)] TypeSymbol? nullableTypeOpt, [NotNullWhen(true)] TypeSymbol? underlyingTypeOpt, out TypeWithAnnotations underlyingTypeWithAnnotations)
9145private void TrackNullableStateOfNullableValue(int containingSlot, TypeSymbol containingType, BoundExpression? value, TypeWithState valueType, int valueSlot)
9162TypeSymbol targetType,
9163TypeSymbol operandType,
9271private void ReportNullabilityMismatchWithTargetDelegate(Location location, TypeSymbol targetType, MethodSymbol targetInvokeMethod, MethodSymbol sourceInvokeMethod, bool invokedAsExtensionMethod)
9289void reportBadDelegateReturn(BindingDiagnosticBag bag, MethodSymbol targetInvokeMethod, MethodSymbol sourceInvokeMethod, bool topLevel, (TypeSymbol targetType, Location location) arg)
9296void reportBadDelegateParameter(BindingDiagnosticBag bag, MethodSymbol sourceInvokeMethod, MethodSymbol targetInvokeMethod, ParameterSymbol parameter, bool topLevel, (TypeSymbol targetType, Location location) arg)
9474TypeSymbol targetType = targetTypeWithNullability.Type;
9498static (MethodSymbol invokeSignature, ImmutableArray<ParameterSymbol>) getDelegateOrFunctionPointerInfo(TypeSymbol targetType)
9768static TypeWithState calculateResultType(TypeWithAnnotations targetTypeWithNullability, bool fromExplicitCast, NullableFlowState resultState, bool isSuppressed, TypeSymbol targetType)
9792var type = operandType.Type;
9823var type = operandType.Type;
9992TypeSymbol targetType = targetTypeWithNullability.Type;
10163TypeSymbol type = typeNeedsLifting ? MakeNullableOf(returnType) : returnType.Type;
10172var type = typeWithState.Type;
10188private TypeSymbol MakeNullableOf(TypeWithAnnotations underlying)
10297Debug.Assert(TypeSymbol.Equals(resultTypeWithAnnotations.Type, node.Type, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes));
10375TypeSymbol argType = arg.Type;
10394TypeSymbol argType = arg.Type;
11417private void ReportNullabilityMismatchInRefArgument(BoundExpression argument, TypeSymbol argumentType, ParameterSymbol parameter, TypeSymbol parameterType)
11429private void ReportNullabilityMismatchInArgument(SyntaxNode argument, TypeSymbol argumentType, ParameterSymbol parameter, TypeSymbol parameterType, bool forOutput)
11434private void ReportNullabilityMismatchInArgument(Location argumentLocation, TypeSymbol argumentType, ParameterSymbol? parameterOpt, TypeSymbol parameterType, bool forOutput)
11531var receiverType = VisitRvalueWithState(receiverOpt).Type;
11668private int GetNullableOfTValueSlot(TypeSymbol containingType, int containingSlot, out Symbol? valueProperty, bool forceSlotEvenIfEmpty = false)
11671Debug.Assert(TypeSymbol.Equals(NominalSlotType(containingSlot), containingType, TypeCompareKind.IgnoreNullableModifiersForReferenceTypes));
11732var resultType = resultTypeWithState.Type;
11843TypeSymbol? getEnumeratorType;
12445TypeSymbol type = node.Type;
12498var type = node.Type;
12755var resultTypeSymbol = resultType.Type;
12775private bool ReportPossibleNullReceiverIfNeeded(TypeSymbol type, NullableFlowState state, bool checkNullableValueType, SyntaxNode syntax, out bool reportedDiagnostic)
12816private static bool IsNullabilityMismatch(TypeSymbol type1, TypeSymbol type2)
12903var type = VisitArrayInitialization(node.Type, initialization, node.HasErrors);
13610private sealed class NullabilityInfoTypeComparer : IEqualityComparer<(NullabilityInfo info, TypeSymbol? type)>
13614public bool Equals((NullabilityInfo info, TypeSymbol? type) x, (NullabilityInfo info, TypeSymbol? type) y)
13620public int GetHashCode((NullabilityInfo info, TypeSymbol? type) obj)
FlowAnalysis\NullableWalker_Patterns.cs (12)
154TypeSymbol inputType,
279var originalInputType = node.Expression.Type;
409var tempMap = PooledDictionary<BoundDagTemp, (int slot, TypeSymbol type)>.GetInstance();
437(int inputSlot, TypeSymbol inputType) = tempMap.TryGetValue(evaluation.Input, out var slotAndType) ? slotAndType : throw ExceptionUtilities.Unreachable();
596(int inputSlot, TypeSymbol inputType) = slotAndType;
742void addToTempMap(BoundDagTemp output, int slot, TypeSymbol type)
759bool isDerivedType(TypeSymbol derivedType, TypeSymbol baseType)
839void addTemp(BoundDagEvaluation e, TypeSymbol t, int index = 0)
848static TypeWithAnnotations getIndexerOutputType(TypeSymbol inputType, BoundExpression e, bool isSlice)
885var originalInputType = node.Expression.Type;
953TypeSymbol inferredType =
Generated\BoundNodes.xml.Generated.cs (1096)
408protected BoundExpression(BoundKind kind, SyntaxNode syntax, TypeSymbol? type, bool hasErrors)
414protected BoundExpression(BoundKind kind, SyntaxNode syntax, TypeSymbol? type)
420public TypeSymbol? Type { get; }
425protected BoundValuePlaceholderBase(BoundKind kind, SyntaxNode syntax, TypeSymbol? type, bool hasErrors)
430protected BoundValuePlaceholderBase(BoundKind kind, SyntaxNode syntax, TypeSymbol? type)
439protected BoundEarlyValuePlaceholderBase(BoundKind kind, SyntaxNode syntax, TypeSymbol? type, bool hasErrors)
444protected BoundEarlyValuePlaceholderBase(BoundKind kind, SyntaxNode syntax, TypeSymbol? type)
453public BoundValuePlaceholder(SyntaxNode syntax, TypeSymbol? type, bool hasErrors)
458public BoundValuePlaceholder(SyntaxNode syntax, TypeSymbol? type)
467public BoundValuePlaceholder Update(TypeSymbol? type)
469if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
481public BoundCapturedReceiverPlaceholder(SyntaxNode syntax, BoundExpression receiver, SafeContext localScopeDepth, TypeSymbol? type, bool hasErrors = false)
497public BoundCapturedReceiverPlaceholder Update(BoundExpression receiver, SafeContext localScopeDepth, TypeSymbol? type)
499if (receiver != this.Receiver || localScopeDepth != this.LocalScopeDepth || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
511public BoundDeconstructValuePlaceholder(SyntaxNode syntax, Symbol? variableSymbol, bool isDiscardExpression, TypeSymbol type, bool hasErrors)
521public BoundDeconstructValuePlaceholder(SyntaxNode syntax, Symbol? variableSymbol, bool isDiscardExpression, TypeSymbol type)
531public new TypeSymbol Type => base.Type!;
538public BoundDeconstructValuePlaceholder Update(Symbol? variableSymbol, bool isDiscardExpression, TypeSymbol type)
540if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(variableSymbol, this.VariableSymbol) || isDiscardExpression != this.IsDiscardExpression || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
552public BoundTupleOperandPlaceholder(SyntaxNode syntax, TypeSymbol type, bool hasErrors)
560public BoundTupleOperandPlaceholder(SyntaxNode syntax, TypeSymbol type)
568public new TypeSymbol Type => base.Type!;
573public BoundTupleOperandPlaceholder Update(TypeSymbol type)
575if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
587public BoundAwaitableValuePlaceholder(SyntaxNode syntax, TypeSymbol? type, bool hasErrors)
592public BoundAwaitableValuePlaceholder(SyntaxNode syntax, TypeSymbol? type)
597public new TypeSymbol? Type => base.Type;
602public BoundAwaitableValuePlaceholder Update(TypeSymbol? type)
604if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
616public BoundDisposableValuePlaceholder(SyntaxNode syntax, TypeSymbol type, bool hasErrors)
624public BoundDisposableValuePlaceholder(SyntaxNode syntax, TypeSymbol type)
632public new TypeSymbol Type => base.Type!;
637public BoundDisposableValuePlaceholder Update(TypeSymbol type)
639if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
651public BoundObjectOrCollectionValuePlaceholder(SyntaxNode syntax, bool isNewInstance, TypeSymbol type, bool hasErrors)
660public BoundObjectOrCollectionValuePlaceholder(SyntaxNode syntax, bool isNewInstance, TypeSymbol type)
669public new TypeSymbol Type => base.Type!;
675public BoundObjectOrCollectionValuePlaceholder Update(bool isNewInstance, TypeSymbol type)
677if (isNewInstance != this.IsNewInstance || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
689public BoundImplicitIndexerValuePlaceholder(SyntaxNode syntax, TypeSymbol type, bool hasErrors)
697public BoundImplicitIndexerValuePlaceholder(SyntaxNode syntax, TypeSymbol type)
705public new TypeSymbol Type => base.Type!;
710public BoundImplicitIndexerValuePlaceholder Update(TypeSymbol type)
712if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
724public BoundImplicitIndexerReceiverPlaceholder(SyntaxNode syntax, bool isEquivalentToThisReference, TypeSymbol type, bool hasErrors)
733public BoundImplicitIndexerReceiverPlaceholder(SyntaxNode syntax, bool isEquivalentToThisReference, TypeSymbol type)
742public new TypeSymbol Type => base.Type!;
748public BoundImplicitIndexerReceiverPlaceholder Update(bool isEquivalentToThisReference, TypeSymbol type)
750if (isEquivalentToThisReference != this.IsEquivalentToThisReference || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
762public BoundListPatternReceiverPlaceholder(SyntaxNode syntax, TypeSymbol type, bool hasErrors)
770public BoundListPatternReceiverPlaceholder(SyntaxNode syntax, TypeSymbol type)
778public new TypeSymbol Type => base.Type!;
783public BoundListPatternReceiverPlaceholder Update(TypeSymbol type)
785if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
797public BoundListPatternIndexPlaceholder(SyntaxNode syntax, TypeSymbol type, bool hasErrors)
805public BoundListPatternIndexPlaceholder(SyntaxNode syntax, TypeSymbol type)
813public new TypeSymbol Type => base.Type!;
818public BoundListPatternIndexPlaceholder Update(TypeSymbol type)
820if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
832public BoundSlicePatternReceiverPlaceholder(SyntaxNode syntax, TypeSymbol type, bool hasErrors)
840public BoundSlicePatternReceiverPlaceholder(SyntaxNode syntax, TypeSymbol type)
848public new TypeSymbol Type => base.Type!;
853public BoundSlicePatternReceiverPlaceholder Update(TypeSymbol type)
855if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
867public BoundSlicePatternRangePlaceholder(SyntaxNode syntax, TypeSymbol type, bool hasErrors)
875public BoundSlicePatternRangePlaceholder(SyntaxNode syntax, TypeSymbol type)
883public new TypeSymbol Type => base.Type!;
888public BoundSlicePatternRangePlaceholder Update(TypeSymbol type)
890if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
902public BoundDup(SyntaxNode syntax, RefKind refKind, TypeSymbol? type, bool hasErrors)
908public BoundDup(SyntaxNode syntax, RefKind refKind, TypeSymbol? type)
919public BoundDup Update(RefKind refKind, TypeSymbol? type)
921if (refKind != this.RefKind || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
933public BoundPassByCopy(SyntaxNode syntax, BoundExpression expression, TypeSymbol? type, bool hasErrors = false)
947public BoundPassByCopy Update(BoundExpression expression, TypeSymbol? type)
949if (expression != this.Expression || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
961public BoundBadExpression(SyntaxNode syntax, LookupResultKind resultKind, ImmutableArray<Symbol?> symbols, ImmutableArray<BoundExpression> childBoundNodes, TypeSymbol? type, bool hasErrors = false)
980public BoundBadExpression Update(LookupResultKind resultKind, ImmutableArray<Symbol?> symbols, ImmutableArray<BoundExpression> childBoundNodes, TypeSymbol? type)
982if (resultKind != this.ResultKind || symbols != this.Symbols || childBoundNodes != this.ChildBoundNodes || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
1050public BoundTypeExpression(SyntaxNode syntax, AliasSymbol? aliasOpt, BoundTypeExpression? boundContainingTypeOpt, ImmutableArray<BoundExpression> boundDimensionsOpt, TypeWithAnnotations typeWithAnnotations, TypeSymbol type, bool hasErrors = false)
1065public new TypeSymbol Type => base.Type!;
1071public BoundTypeExpression Update(AliasSymbol? aliasOpt, BoundTypeExpression? boundContainingTypeOpt, ImmutableArray<BoundExpression> boundDimensionsOpt, TypeWithAnnotations typeWithAnnotations, TypeSymbol type)
1073if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(aliasOpt, this.AliasOpt) || boundContainingTypeOpt != this.BoundContainingTypeOpt || boundDimensionsOpt != this.BoundDimensionsOpt || typeWithAnnotations != this.TypeWithAnnotations || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
1085public BoundTypeOrValueExpression(SyntaxNode syntax, BoundTypeOrValueData data, TypeSymbol type, bool hasErrors)
1094public BoundTypeOrValueExpression(SyntaxNode syntax, BoundTypeOrValueData data, TypeSymbol type)
1103public new TypeSymbol Type => base.Type!;
1109public BoundTypeOrValueExpression Update(BoundTypeOrValueData data, TypeSymbol type)
1111if (data != this.Data || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
1143public new TypeSymbol? Type => base.Type;
1164public BoundUnaryOperator(SyntaxNode syntax, UnaryOperatorKind operatorKind, BoundExpression operand, ConstantValue? constantValueOpt, MethodSymbol? methodOpt, TypeSymbol? constrainedToTypeOpt, LookupResultKind resultKind, ImmutableArray<MethodSymbol> originalUserDefinedOperatorsOpt, TypeSymbol type, bool hasErrors = false)
1180public new TypeSymbol Type => base.Type!;
1185public TypeSymbol? ConstrainedToTypeOpt { get; }
1192public BoundUnaryOperator Update(UnaryOperatorKind operatorKind, BoundExpression operand, ConstantValue? constantValueOpt, MethodSymbol? methodOpt, TypeSymbol? constrainedToTypeOpt, LookupResultKind resultKind, ImmutableArray<MethodSymbol> originalUserDefinedOperatorsOpt, TypeSymbol type)
1194if (operatorKind != this.OperatorKind || operand != this.Operand || constantValueOpt != this.ConstantValueOpt || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(methodOpt, this.MethodOpt) || !TypeSymbol.Equals(constrainedToTypeOpt, this.ConstrainedToTypeOpt, TypeCompareKind.ConsiderEverything) || resultKind != this.ResultKind || originalUserDefinedOperatorsOpt != this.OriginalUserDefinedOperatorsOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
1206public BoundIncrementOperator(SyntaxNode syntax, UnaryOperatorKind operatorKind, BoundExpression operand, MethodSymbol? methodOpt, TypeSymbol? constrainedToTypeOpt, BoundValuePlaceholder? operandPlaceholder, BoundExpression? operandConversion, BoundValuePlaceholder? resultPlaceholder, BoundExpression? resultConversion, LookupResultKind resultKind, ImmutableArray<MethodSymbol> originalUserDefinedOperatorsOpt, TypeSymbol type, bool hasErrors = false)
1225public new TypeSymbol Type => base.Type!;
1229public TypeSymbol? ConstrainedToTypeOpt { get; }
1240public BoundIncrementOperator Update(UnaryOperatorKind operatorKind, BoundExpression operand, MethodSymbol? methodOpt, TypeSymbol? constrainedToTypeOpt, BoundValuePlaceholder? operandPlaceholder, BoundExpression? operandConversion, BoundValuePlaceholder? resultPlaceholder, BoundExpression? resultConversion, LookupResultKind resultKind, ImmutableArray<MethodSymbol> originalUserDefinedOperatorsOpt, TypeSymbol type)
1242if (operatorKind != this.OperatorKind || operand != this.Operand || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(methodOpt, this.MethodOpt) || !TypeSymbol.Equals(constrainedToTypeOpt, this.ConstrainedToTypeOpt, TypeCompareKind.ConsiderEverything) || operandPlaceholder != this.OperandPlaceholder || operandConversion != this.OperandConversion || resultPlaceholder != this.ResultPlaceholder || resultConversion != this.ResultConversion || resultKind != this.ResultKind || originalUserDefinedOperatorsOpt != this.OriginalUserDefinedOperatorsOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
1254public BoundAddressOfOperator(SyntaxNode syntax, BoundExpression operand, bool isManaged, TypeSymbol type, bool hasErrors = false)
1265public new TypeSymbol Type => base.Type!;
1272public BoundAddressOfOperator Update(BoundExpression operand, bool isManaged, TypeSymbol type)
1274if (operand != this.Operand || isManaged != this.IsManaged || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
1296public new TypeSymbol? Type => base.Type;
1315public BoundFunctionPointerLoad(SyntaxNode syntax, MethodSymbol targetMethod, TypeSymbol? constrainedToTypeOpt, TypeSymbol type, bool hasErrors)
1326public BoundFunctionPointerLoad(SyntaxNode syntax, MethodSymbol targetMethod, TypeSymbol? constrainedToTypeOpt, TypeSymbol type)
1338public TypeSymbol? ConstrainedToTypeOpt { get; }
1339public new TypeSymbol Type => base.Type!;
1344public BoundFunctionPointerLoad Update(MethodSymbol targetMethod, TypeSymbol? constrainedToTypeOpt, TypeSymbol type)
1346if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(targetMethod, this.TargetMethod) || !TypeSymbol.Equals(constrainedToTypeOpt, this.ConstrainedToTypeOpt, TypeCompareKind.ConsiderEverything) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
1358public BoundPointerIndirectionOperator(SyntaxNode syntax, BoundExpression operand, bool refersToLocation, TypeSymbol type, bool hasErrors = false)
1369public new TypeSymbol Type => base.Type!;
1376public BoundPointerIndirectionOperator Update(BoundExpression operand, bool refersToLocation, TypeSymbol type)
1378if (operand != this.Operand || refersToLocation != this.RefersToLocation || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
1390public BoundPointerElementAccess(SyntaxNode syntax, BoundExpression expression, BoundExpression index, bool @checked, bool refersToLocation, TypeSymbol type, bool hasErrors = false)
1404public new TypeSymbol Type => base.Type!;
1413public BoundPointerElementAccess Update(BoundExpression expression, BoundExpression index, bool @checked, bool refersToLocation, TypeSymbol type)
1415if (expression != this.Expression || index != this.Index || @checked != this.Checked || refersToLocation != this.RefersToLocation || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
1427public BoundFunctionPointerInvocation(SyntaxNode syntax, BoundExpression invokedExpression, ImmutableArray<BoundExpression> arguments, ImmutableArray<RefKind> argumentRefKindsOpt, LookupResultKind resultKind, TypeSymbol type, bool hasErrors = false)
1441public new TypeSymbol Type => base.Type!;
1450public BoundFunctionPointerInvocation Update(BoundExpression invokedExpression, ImmutableArray<BoundExpression> arguments, ImmutableArray<RefKind> argumentRefKindsOpt, LookupResultKind resultKind, TypeSymbol type)
1452if (invokedExpression != this.InvokedExpression || arguments != this.Arguments || argumentRefKindsOpt != this.ArgumentRefKindsOpt || resultKind != this.ResultKind || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
1464public BoundRefTypeOperator(SyntaxNode syntax, BoundExpression operand, MethodSymbol? getTypeFromHandle, TypeSymbol type, bool hasErrors = false)
1475public new TypeSymbol Type => base.Type!;
1482public BoundRefTypeOperator Update(BoundExpression operand, MethodSymbol? getTypeFromHandle, TypeSymbol type)
1484if (operand != this.Operand || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(getTypeFromHandle, this.GetTypeFromHandle) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
1496public BoundMakeRefOperator(SyntaxNode syntax, BoundExpression operand, TypeSymbol type, bool hasErrors = false)
1506public new TypeSymbol Type => base.Type!;
1512public BoundMakeRefOperator Update(BoundExpression operand, TypeSymbol type)
1514if (operand != this.Operand || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
1526public BoundRefValueOperator(SyntaxNode syntax, NullableAnnotation nullableAnnotation, BoundExpression operand, TypeSymbol type, bool hasErrors = false)
1537public new TypeSymbol Type => base.Type!;
1544public BoundRefValueOperator Update(NullableAnnotation nullableAnnotation, BoundExpression operand, TypeSymbol type)
1546if (nullableAnnotation != this.NullableAnnotation || operand != this.Operand || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
1558public BoundFromEndIndexExpression(SyntaxNode syntax, BoundExpression operand, MethodSymbol? methodOpt, TypeSymbol type, bool hasErrors = false)
1569public new TypeSymbol Type => base.Type!;
1576public BoundFromEndIndexExpression Update(BoundExpression operand, MethodSymbol? methodOpt, TypeSymbol type)
1578if (operand != this.Operand || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(methodOpt, this.MethodOpt) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
1590public BoundRangeExpression(SyntaxNode syntax, BoundExpression? leftOperandOpt, BoundExpression? rightOperandOpt, MethodSymbol? methodOpt, TypeSymbol type, bool hasErrors = false)
1601public new TypeSymbol Type => base.Type!;
1609public BoundRangeExpression Update(BoundExpression? leftOperandOpt, BoundExpression? rightOperandOpt, MethodSymbol? methodOpt, TypeSymbol type)
1611if (leftOperandOpt != this.LeftOperandOpt || rightOperandOpt != this.RightOperandOpt || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(methodOpt, this.MethodOpt) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
1623protected BoundBinaryOperatorBase(BoundKind kind, SyntaxNode syntax, BoundExpression left, BoundExpression right, TypeSymbol type, bool hasErrors = false)
1635public new TypeSymbol Type => base.Type!;
1642public BoundBinaryOperator(SyntaxNode syntax, BinaryOperatorKind operatorKind, BoundBinaryOperator.UncommonData? data, LookupResultKind resultKind, BoundExpression left, BoundExpression right, TypeSymbol type, bool hasErrors = false)
1662public BoundBinaryOperator Update(BinaryOperatorKind operatorKind, BoundBinaryOperator.UncommonData? data, LookupResultKind resultKind, BoundExpression left, BoundExpression right, TypeSymbol type)
1664if (operatorKind != this.OperatorKind || data != this.Data || resultKind != this.ResultKind || left != this.Left || right != this.Right || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
1676public BoundTupleBinaryOperator(SyntaxNode syntax, BoundExpression left, BoundExpression right, BinaryOperatorKind operatorKind, TupleBinaryOperatorInfo.Multiple operators, TypeSymbol type, bool hasErrors = false)
1691public new TypeSymbol Type => base.Type!;
1700public BoundTupleBinaryOperator Update(BoundExpression left, BoundExpression right, BinaryOperatorKind operatorKind, TupleBinaryOperatorInfo.Multiple operators, TypeSymbol type)
1702if (left != this.Left || right != this.Right || operatorKind != this.OperatorKind || operators != this.Operators || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
1714public BoundUserDefinedConditionalLogicalOperator(SyntaxNode syntax, BinaryOperatorKind operatorKind, MethodSymbol logicalOperator, MethodSymbol trueOperator, MethodSymbol falseOperator, BoundValuePlaceholder? trueFalseOperandPlaceholder, BoundExpression? trueFalseOperandConversion, TypeSymbol? constrainedToTypeOpt, LookupResultKind resultKind, ImmutableArray<MethodSymbol> originalUserDefinedOperatorsOpt, BoundExpression left, BoundExpression right, TypeSymbol type, bool hasErrors = false)
1746public TypeSymbol? ConstrainedToTypeOpt { get; }
1753public BoundUserDefinedConditionalLogicalOperator Update(BinaryOperatorKind operatorKind, MethodSymbol logicalOperator, MethodSymbol trueOperator, MethodSymbol falseOperator, BoundValuePlaceholder? trueFalseOperandPlaceholder, BoundExpression? trueFalseOperandConversion, TypeSymbol? constrainedToTypeOpt, LookupResultKind resultKind, ImmutableArray<MethodSymbol> originalUserDefinedOperatorsOpt, BoundExpression left, BoundExpression right, TypeSymbol type)
1755if (operatorKind != this.OperatorKind || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(logicalOperator, this.LogicalOperator) || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(trueOperator, this.TrueOperator) || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(falseOperator, this.FalseOperator) || trueFalseOperandPlaceholder != this.TrueFalseOperandPlaceholder || trueFalseOperandConversion != this.TrueFalseOperandConversion || !TypeSymbol.Equals(constrainedToTypeOpt, this.ConstrainedToTypeOpt, TypeCompareKind.ConsiderEverything) || resultKind != this.ResultKind || originalUserDefinedOperatorsOpt != this.OriginalUserDefinedOperatorsOpt || left != this.Left || right != this.Right || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
1767public 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)
1786public new TypeSymbol Type => base.Type!;
1800public BoundCompoundAssignmentOperator Update(BinaryOperatorSignature @operator, BoundExpression left, BoundExpression right, BoundValuePlaceholder? leftPlaceholder, BoundExpression? leftConversion, BoundValuePlaceholder? finalPlaceholder, BoundExpression? finalConversion, LookupResultKind resultKind, ImmutableArray<MethodSymbol> originalUserDefinedOperatorsOpt, TypeSymbol type)
1802if (@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))
1814public BoundAssignmentOperator(SyntaxNode syntax, BoundExpression left, BoundExpression right, bool isRef, TypeSymbol type, bool hasErrors = false)
1826public new TypeSymbol Type => base.Type!;
1834public BoundAssignmentOperator Update(BoundExpression left, BoundExpression right, bool isRef, TypeSymbol type)
1836if (left != this.Left || right != this.Right || isRef != this.IsRef || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
1848public BoundDeconstructionAssignmentOperator(SyntaxNode syntax, BoundTupleExpression left, BoundConversion right, bool isUsed, TypeSymbol type, bool hasErrors = false)
1861public new TypeSymbol Type => base.Type!;
1869public BoundDeconstructionAssignmentOperator Update(BoundTupleExpression left, BoundConversion right, bool isUsed, TypeSymbol type)
1871if (left != this.Left || right != this.Right || isUsed != this.IsUsed || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
1883public BoundNullCoalescingOperator(SyntaxNode syntax, BoundExpression leftOperand, BoundExpression rightOperand, BoundValuePlaceholder? leftPlaceholder, BoundExpression? leftConversion, BoundNullCoalescingOperatorResultKind operatorResultKind, bool @checked, TypeSymbol type, bool hasErrors = false)
1899public new TypeSymbol Type => base.Type!;
1910public BoundNullCoalescingOperator Update(BoundExpression leftOperand, BoundExpression rightOperand, BoundValuePlaceholder? leftPlaceholder, BoundExpression? leftConversion, BoundNullCoalescingOperatorResultKind operatorResultKind, bool @checked, TypeSymbol type)
1912if (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))
1924public BoundNullCoalescingAssignmentOperator(SyntaxNode syntax, BoundExpression leftOperand, BoundExpression rightOperand, TypeSymbol? type, bool hasErrors = false)
1941public BoundNullCoalescingAssignmentOperator Update(BoundExpression leftOperand, BoundExpression rightOperand, TypeSymbol? type)
1943if (leftOperand != this.LeftOperand || rightOperand != this.RightOperand || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
1970public new TypeSymbol? Type => base.Type;
1994public BoundConditionalOperator(SyntaxNode syntax, bool isRef, BoundExpression condition, BoundExpression consequence, BoundExpression alternative, ConstantValue? constantValueOpt, TypeSymbol? naturalTypeOpt, bool wasTargetTyped, TypeSymbol type, bool hasErrors = false)
2012public new TypeSymbol Type => base.Type!;
2018public TypeSymbol? NaturalTypeOpt { get; }
2024public BoundConditionalOperator Update(bool isRef, BoundExpression condition, BoundExpression consequence, BoundExpression alternative, ConstantValue? constantValueOpt, TypeSymbol? naturalTypeOpt, bool wasTargetTyped, TypeSymbol type)
2026if (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))
2038public BoundArrayAccess(SyntaxNode syntax, BoundExpression expression, ImmutableArray<BoundExpression> indices, TypeSymbol type, bool hasErrors = false)
2050public new TypeSymbol Type => base.Type!;
2057public BoundArrayAccess Update(BoundExpression expression, ImmutableArray<BoundExpression> indices, TypeSymbol type)
2059if (expression != this.Expression || indices != this.Indices || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
2080public new TypeSymbol? Type => base.Type;
2100public BoundArrayLength(SyntaxNode syntax, BoundExpression expression, TypeSymbol type, bool hasErrors = false)
2110public new TypeSymbol Type => base.Type!;
2116public BoundArrayLength Update(BoundExpression expression, TypeSymbol type)
2118if (expression != this.Expression || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
2171public BoundAwaitExpression(SyntaxNode syntax, BoundExpression expression, BoundAwaitableInfo awaitableInfo, BoundAwaitExpressionDebugInfo debugInfo, TypeSymbol type, bool hasErrors = false)
2184public new TypeSymbol Type => base.Type!;
2192public BoundAwaitExpression Update(BoundExpression expression, BoundAwaitableInfo awaitableInfo, BoundAwaitExpressionDebugInfo debugInfo, TypeSymbol type)
2194if (expression != this.Expression || awaitableInfo != this.AwaitableInfo || debugInfo != this.DebugInfo || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
2206protected BoundTypeOf(BoundKind kind, SyntaxNode syntax, MethodSymbol? getTypeFromHandle, TypeSymbol type, bool hasErrors)
2215protected BoundTypeOf(BoundKind kind, SyntaxNode syntax, MethodSymbol? getTypeFromHandle, TypeSymbol type)
2224public new TypeSymbol Type => base.Type!;
2230public BoundTypeOfOperator(SyntaxNode syntax, BoundTypeExpression sourceType, MethodSymbol? getTypeFromHandle, TypeSymbol type, bool hasErrors = false)
2245public BoundTypeOfOperator Update(BoundTypeExpression sourceType, MethodSymbol? getTypeFromHandle, TypeSymbol type)
2247if (sourceType != this.SourceType || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(getTypeFromHandle, this.GetTypeFromHandle) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
2291public BoundMethodDefIndex(SyntaxNode syntax, MethodSymbol method, TypeSymbol type, bool hasErrors)
2305public BoundMethodDefIndex(SyntaxNode syntax, MethodSymbol method, TypeSymbol type)
2315public new TypeSymbol Type => base.Type!;
2321public BoundMethodDefIndex Update(MethodSymbol method, TypeSymbol type)
2323if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(method, this.Method) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
2335public BoundLocalId(SyntaxNode syntax, LocalSymbol local, FieldSymbol? hoistedField, TypeSymbol type, bool hasErrors)
2346public BoundLocalId(SyntaxNode syntax, LocalSymbol local, FieldSymbol? hoistedField, TypeSymbol type)
2357public new TypeSymbol Type => base.Type!;
2364public BoundLocalId Update(LocalSymbol local, FieldSymbol? hoistedField, TypeSymbol type)
2366if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(local, this.Local) || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(hoistedField, this.HoistedField) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
2378public BoundParameterId(SyntaxNode syntax, ParameterSymbol parameter, FieldSymbol? hoistedField, TypeSymbol type, bool hasErrors)
2389public BoundParameterId(SyntaxNode syntax, ParameterSymbol parameter, FieldSymbol? hoistedField, TypeSymbol type)
2400public new TypeSymbol Type => base.Type!;
2407public BoundParameterId Update(ParameterSymbol parameter, FieldSymbol? hoistedField, TypeSymbol type)
2409if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(parameter, this.Parameter) || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(hoistedField, this.HoistedField) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
2421public BoundStateMachineInstanceId(SyntaxNode syntax, TypeSymbol type, bool hasErrors)
2429public BoundStateMachineInstanceId(SyntaxNode syntax, TypeSymbol type)
2437public new TypeSymbol Type => base.Type!;
2442public BoundStateMachineInstanceId Update(TypeSymbol type)
2444if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
2456public BoundMaximumMethodDefIndex(SyntaxNode syntax, TypeSymbol type, bool hasErrors)
2464public BoundMaximumMethodDefIndex(SyntaxNode syntax, TypeSymbol type)
2472public new TypeSymbol Type => base.Type!;
2477public BoundMaximumMethodDefIndex Update(TypeSymbol type)
2479if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
2491public BoundInstrumentationPayloadRoot(SyntaxNode syntax, int analysisKind, TypeSymbol type, bool hasErrors)
2500public BoundInstrumentationPayloadRoot(SyntaxNode syntax, int analysisKind, TypeSymbol type)
2510public new TypeSymbol Type => base.Type!;
2515public BoundInstrumentationPayloadRoot Update(int analysisKind, TypeSymbol type)
2517if (analysisKind != this.AnalysisKind || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
2529public BoundThrowIfModuleCancellationRequested(SyntaxNode syntax, TypeSymbol type, bool hasErrors)
2537public BoundThrowIfModuleCancellationRequested(SyntaxNode syntax, TypeSymbol type)
2545public new TypeSymbol Type => base.Type!;
2550public BoundThrowIfModuleCancellationRequested Update(TypeSymbol type)
2552if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
2564public ModuleCancellationTokenExpression(SyntaxNode syntax, TypeSymbol type, bool hasErrors)
2572public ModuleCancellationTokenExpression(SyntaxNode syntax, TypeSymbol type)
2580public new TypeSymbol Type => base.Type!;
2585public ModuleCancellationTokenExpression Update(TypeSymbol type)
2587if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
2599public BoundModuleVersionId(SyntaxNode syntax, TypeSymbol type, bool hasErrors)
2607public BoundModuleVersionId(SyntaxNode syntax, TypeSymbol type)
2615public new TypeSymbol Type => base.Type!;
2620public BoundModuleVersionId Update(TypeSymbol type)
2622if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
2634public BoundModuleVersionIdString(SyntaxNode syntax, TypeSymbol type, bool hasErrors)
2642public BoundModuleVersionIdString(SyntaxNode syntax, TypeSymbol type)
2650public new TypeSymbol Type => base.Type!;
2655public BoundModuleVersionIdString Update(TypeSymbol type)
2657if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
2669public BoundSourceDocumentIndex(SyntaxNode syntax, Cci.DebugSourceDocument document, TypeSymbol type, bool hasErrors)
2679public BoundSourceDocumentIndex(SyntaxNode syntax, Cci.DebugSourceDocument document, TypeSymbol type)
2689public new TypeSymbol Type => base.Type!;
2695public BoundSourceDocumentIndex Update(Cci.DebugSourceDocument document, TypeSymbol type)
2697if (document != this.Document || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
2709public BoundMethodInfo(SyntaxNode syntax, MethodSymbol method, MethodSymbol? getMethodFromHandle, TypeSymbol type, bool hasErrors)
2720public BoundMethodInfo(SyntaxNode syntax, MethodSymbol method, MethodSymbol? getMethodFromHandle, TypeSymbol type)
2731public new TypeSymbol Type => base.Type!;
2738public BoundMethodInfo Update(MethodSymbol method, MethodSymbol? getMethodFromHandle, TypeSymbol type)
2740if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(method, this.Method) || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(getMethodFromHandle, this.GetMethodFromHandle) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
2752public BoundFieldInfo(SyntaxNode syntax, FieldSymbol field, MethodSymbol? getFieldFromHandle, TypeSymbol type, bool hasErrors)
2763public BoundFieldInfo(SyntaxNode syntax, FieldSymbol field, MethodSymbol? getFieldFromHandle, TypeSymbol type)
2774public new TypeSymbol Type => base.Type!;
2781public BoundFieldInfo Update(FieldSymbol field, MethodSymbol? getFieldFromHandle, TypeSymbol type)
2783if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(field, this.Field) || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(getFieldFromHandle, this.GetFieldFromHandle) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
2805public new TypeSymbol? Type => base.Type;
2818public BoundDefaultExpression(SyntaxNode syntax, BoundTypeExpression? targetType, ConstantValue? constantValueOpt, TypeSymbol type, bool hasErrors = false)
2828public new TypeSymbol Type => base.Type!;
2835public BoundDefaultExpression Update(BoundTypeExpression? targetType, ConstantValue? constantValueOpt, TypeSymbol type)
2837if (targetType != this.TargetType || constantValueOpt != this.ConstantValueOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
2849public BoundIsOperator(SyntaxNode syntax, BoundExpression operand, BoundTypeExpression targetType, ConversionKind conversionKind, TypeSymbol type, bool hasErrors = false)
2862public new TypeSymbol Type => base.Type!;
2870public BoundIsOperator Update(BoundExpression operand, BoundTypeExpression targetType, ConversionKind conversionKind, TypeSymbol type)
2872if (operand != this.Operand || targetType != this.TargetType || conversionKind != this.ConversionKind || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
2884public BoundAsOperator(SyntaxNode syntax, BoundExpression operand, BoundTypeExpression targetType, BoundValuePlaceholder? operandPlaceholder, BoundExpression? operandConversion, TypeSymbol type, bool hasErrors = false)
2898public new TypeSymbol Type => base.Type!;
2907public BoundAsOperator Update(BoundExpression operand, BoundTypeExpression targetType, BoundValuePlaceholder? operandPlaceholder, BoundExpression? operandConversion, TypeSymbol type)
2909if (operand != this.Operand || targetType != this.TargetType || operandPlaceholder != this.OperandPlaceholder || operandConversion != this.OperandConversion || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
2921public BoundSizeOfOperator(SyntaxNode syntax, BoundTypeExpression sourceType, ConstantValue? constantValueOpt, TypeSymbol type, bool hasErrors = false)
2932public new TypeSymbol Type => base.Type!;
2939public BoundSizeOfOperator Update(BoundTypeExpression sourceType, ConstantValue? constantValueOpt, TypeSymbol type)
2941if (sourceType != this.SourceType || constantValueOpt != this.ConstantValueOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
2953public BoundConversion(SyntaxNode syntax, BoundExpression operand, Conversion conversion, bool isBaseConversion, bool @checked, bool explicitCastInCode, ConstantValue? constantValueOpt, ConversionGroup? conversionGroupOpt, TypeSymbol type, bool hasErrors = false)
2969public new TypeSymbol Type => base.Type!;
2981public BoundConversion Update(BoundExpression operand, Conversion conversion, bool isBaseConversion, bool @checked, bool explicitCastInCode, ConstantValue? constantValueOpt, ConversionGroup? conversionGroupOpt, TypeSymbol type)
2983if (operand != this.Operand || conversion != this.Conversion || isBaseConversion != this.IsBaseConversion || @checked != this.Checked || explicitCastInCode != this.ExplicitCastInCode || constantValueOpt != this.ConstantValueOpt || conversionGroupOpt != this.ConversionGroupOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
2995public BoundReadOnlySpanFromArray(SyntaxNode syntax, BoundExpression operand, MethodSymbol conversionMethod, TypeSymbol type, bool hasErrors = false)
3007public new TypeSymbol Type => base.Type!;
3014public BoundReadOnlySpanFromArray Update(BoundExpression operand, MethodSymbol conversionMethod, TypeSymbol type)
3016if (operand != this.Operand || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(conversionMethod, this.ConversionMethod) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
3028public BoundArgList(SyntaxNode syntax, TypeSymbol type, bool hasErrors)
3036public BoundArgList(SyntaxNode syntax, TypeSymbol type)
3044public new TypeSymbol Type => base.Type!;
3049public BoundArgList Update(TypeSymbol type)
3051if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
3063public BoundArgListOperator(SyntaxNode syntax, ImmutableArray<BoundExpression> arguments, ImmutableArray<RefKind> argumentRefKindsOpt, TypeSymbol? type, bool hasErrors = false)
3073public new TypeSymbol? Type => base.Type;
3080public BoundArgListOperator Update(ImmutableArray<BoundExpression> arguments, ImmutableArray<RefKind> argumentRefKindsOpt, TypeSymbol? type)
3082if (arguments != this.Arguments || argumentRefKindsOpt != this.ArgumentRefKindsOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
3094public BoundFixedLocalCollectionInitializer(SyntaxNode syntax, TypeSymbol elementPointerType, BoundValuePlaceholder? elementPointerPlaceholder, BoundExpression? elementPointerConversion, BoundExpression expression, MethodSymbol? getPinnableOpt, TypeSymbol type, bool hasErrors = false)
3109public new TypeSymbol Type => base.Type!;
3110public TypeSymbol ElementPointerType { get; }
3119public BoundFixedLocalCollectionInitializer Update(TypeSymbol elementPointerType, BoundValuePlaceholder? elementPointerPlaceholder, BoundExpression? elementPointerConversion, BoundExpression expression, MethodSymbol? getPinnableOpt, TypeSymbol type)
3121if (!TypeSymbol.Equals(elementPointerType, this.ElementPointerType, TypeCompareKind.ConsiderEverything) || elementPointerPlaceholder != this.ElementPointerPlaceholder || elementPointerConversion != this.ElementPointerConversion || expression != this.Expression || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(getPinnableOpt, this.GetPinnableOpt) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
4257public BoundCatchBlock(SyntaxNode syntax, ImmutableArray<LocalSymbol> locals, BoundExpression? exceptionSourceOpt, TypeSymbol? exceptionTypeOpt, BoundStatementList? exceptionFilterPrologueOpt, BoundExpression? exceptionFilterOpt, BoundBlock body, bool isSynthesizedAsyncCatchAll, bool hasErrors = false)
4275public TypeSymbol? ExceptionTypeOpt { get; }
4284public BoundCatchBlock Update(ImmutableArray<LocalSymbol> locals, BoundExpression? exceptionSourceOpt, TypeSymbol? exceptionTypeOpt, BoundStatementList? exceptionFilterPrologueOpt, BoundExpression? exceptionFilterOpt, BoundBlock body, bool isSynthesizedAsyncCatchAll)
4286if (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)
4298public BoundLiteral(SyntaxNode syntax, ConstantValue? constantValueOpt, TypeSymbol? type, bool hasErrors)
4304public BoundLiteral(SyntaxNode syntax, ConstantValue? constantValueOpt, TypeSymbol? type)
4315public BoundLiteral Update(ConstantValue? constantValueOpt, TypeSymbol? type)
4317if (constantValueOpt != this.ConstantValueOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
4329public BoundUtf8String(SyntaxNode syntax, string value, TypeSymbol type, bool hasErrors)
4339public BoundUtf8String(SyntaxNode syntax, string value, TypeSymbol type)
4349public new TypeSymbol Type => base.Type!;
4355public BoundUtf8String Update(string value, TypeSymbol type)
4357if (value != this.Value || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
4369public BoundThisReference(SyntaxNode syntax, TypeSymbol type, bool hasErrors)
4377public BoundThisReference(SyntaxNode syntax, TypeSymbol type)
4385public new TypeSymbol Type => base.Type!;
4390public BoundThisReference Update(TypeSymbol type)
4392if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
4404public BoundPreviousSubmissionReference(SyntaxNode syntax, TypeSymbol type, bool hasErrors)
4412public BoundPreviousSubmissionReference(SyntaxNode syntax, TypeSymbol type)
4420public new TypeSymbol Type => base.Type!;
4425public BoundPreviousSubmissionReference Update(TypeSymbol type)
4427if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
4439public BoundHostObjectMemberReference(SyntaxNode syntax, TypeSymbol type, bool hasErrors)
4447public BoundHostObjectMemberReference(SyntaxNode syntax, TypeSymbol type)
4455public new TypeSymbol Type => base.Type!;
4460public BoundHostObjectMemberReference Update(TypeSymbol type)
4462if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
4474public BoundBaseReference(SyntaxNode syntax, TypeSymbol? type, bool hasErrors)
4479public BoundBaseReference(SyntaxNode syntax, TypeSymbol? type)
4484public new TypeSymbol? Type => base.Type;
4489public BoundBaseReference Update(TypeSymbol? type)
4491if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
4503public BoundLocal(SyntaxNode syntax, LocalSymbol localSymbol, BoundLocalDeclarationKind declarationKind, ConstantValue? constantValueOpt, bool isNullableUnknown, TypeSymbol type, bool hasErrors)
4516public BoundLocal(SyntaxNode syntax, LocalSymbol localSymbol, BoundLocalDeclarationKind declarationKind, ConstantValue? constantValueOpt, bool isNullableUnknown, TypeSymbol type)
4529public new TypeSymbol Type => base.Type!;
4538public BoundLocal Update(LocalSymbol localSymbol, BoundLocalDeclarationKind declarationKind, ConstantValue? constantValueOpt, bool isNullableUnknown, TypeSymbol type)
4540if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(localSymbol, this.LocalSymbol) || declarationKind != this.DeclarationKind || constantValueOpt != this.ConstantValueOpt || isNullableUnknown != this.IsNullableUnknown || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
4552public BoundPseudoVariable(SyntaxNode syntax, LocalSymbol localSymbol, PseudoVariableExpressions emitExpressions, TypeSymbol type, bool hasErrors)
4564public BoundPseudoVariable(SyntaxNode syntax, LocalSymbol localSymbol, PseudoVariableExpressions emitExpressions, TypeSymbol type)
4576public new TypeSymbol Type => base.Type!;
4583public BoundPseudoVariable Update(LocalSymbol localSymbol, PseudoVariableExpressions emitExpressions, TypeSymbol type)
4585if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(localSymbol, this.LocalSymbol) || emitExpressions != this.EmitExpressions || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
4597public BoundRangeVariable(SyntaxNode syntax, RangeVariableSymbol rangeVariableSymbol, BoundExpression value, TypeSymbol type, bool hasErrors = false)
4609public new TypeSymbol Type => base.Type!;
4616public BoundRangeVariable Update(RangeVariableSymbol rangeVariableSymbol, BoundExpression value, TypeSymbol type)
4618if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(rangeVariableSymbol, this.RangeVariableSymbol) || value != this.Value || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
4630public BoundParameter(SyntaxNode syntax, ParameterSymbol parameterSymbol, TypeSymbol type, bool hasErrors)
4640public BoundParameter(SyntaxNode syntax, ParameterSymbol parameterSymbol, TypeSymbol type)
4650public new TypeSymbol Type => base.Type!;
4656public BoundParameter Update(ParameterSymbol parameterSymbol, TypeSymbol type)
4658if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(parameterSymbol, this.ParameterSymbol) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
4770public BoundLabel(SyntaxNode syntax, LabelSymbol label, TypeSymbol? type, bool hasErrors)
4779public BoundLabel(SyntaxNode syntax, LabelSymbol label, TypeSymbol? type)
4793public BoundLabel Update(LabelSymbol label, TypeSymbol? type)
4795if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(label, this.Label) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
4877protected BoundSwitchExpression(BoundKind kind, SyntaxNode syntax, BoundExpression expression, ImmutableArray<BoundSwitchExpressionArm> switchArms, BoundDecisionDag reachabilityDecisionDag, LabelSymbol? defaultLabel, bool reportedNotExhaustive, TypeSymbol? type, bool hasErrors = false)
4940public BoundUnconvertedSwitchExpression(SyntaxNode syntax, BoundExpression expression, ImmutableArray<BoundSwitchExpressionArm> switchArms, BoundDecisionDag reachabilityDecisionDag, LabelSymbol? defaultLabel, bool reportedNotExhaustive, TypeSymbol? type, bool hasErrors = false)
4954public BoundUnconvertedSwitchExpression Update(BoundExpression expression, ImmutableArray<BoundSwitchExpressionArm> switchArms, BoundDecisionDag reachabilityDecisionDag, LabelSymbol? defaultLabel, bool reportedNotExhaustive, TypeSymbol? type)
4956if (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))
4968public BoundConvertedSwitchExpression(SyntaxNode syntax, TypeSymbol? naturalTypeOpt, bool wasTargetTyped, BoundExpression expression, ImmutableArray<BoundSwitchExpressionArm> switchArms, BoundDecisionDag reachabilityDecisionDag, LabelSymbol? defaultLabel, bool reportedNotExhaustive, TypeSymbol type, bool hasErrors = false)
4981public new TypeSymbol Type => base.Type!;
4982public TypeSymbol? NaturalTypeOpt { get; }
4988public BoundConvertedSwitchExpression Update(TypeSymbol? naturalTypeOpt, bool wasTargetTyped, BoundExpression expression, ImmutableArray<BoundSwitchExpressionArm> switchArms, BoundDecisionDag reachabilityDecisionDag, LabelSymbol? defaultLabel, bool reportedNotExhaustive, TypeSymbol type)
4990if (!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))
5195public BoundDagTemp(SyntaxNode syntax, TypeSymbol type, BoundDagEvaluation? source, int index, bool hasErrors = false)
5206public TypeSymbol Type { get; }
5213public BoundDagTemp Update(TypeSymbol type, BoundDagEvaluation? source, int index)
5215if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything) || source != this.Source || index != this.Index)
5227public BoundDagTypeTest(SyntaxNode syntax, TypeSymbol type, BoundDagTemp input, bool hasErrors = false)
5237public TypeSymbol Type { get; }
5242public BoundDagTypeTest Update(TypeSymbol type, BoundDagTemp input)
5244if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything) || input != this.Input)
5411public BoundDagTypeEvaluation(SyntaxNode syntax, TypeSymbol type, BoundDagTemp input, bool hasErrors = false)
5421public TypeSymbol Type { get; }
5426public BoundDagTypeEvaluation Update(TypeSymbol type, BoundDagTemp input)
5428if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything) || input != this.Input)
5531public BoundDagIndexerEvaluation(SyntaxNode syntax, TypeSymbol indexerType, BoundDagTemp lengthTemp, int index, BoundExpression indexerAccess, BoundListPatternReceiverPlaceholder receiverPlaceholder, BoundListPatternIndexPlaceholder argumentPlaceholder, BoundDagTemp input, bool hasErrors = false)
5554public TypeSymbol IndexerType { get; }
5564public BoundDagIndexerEvaluation Update(TypeSymbol indexerType, BoundDagTemp lengthTemp, int index, BoundExpression indexerAccess, BoundListPatternReceiverPlaceholder receiverPlaceholder, BoundListPatternIndexPlaceholder argumentPlaceholder, BoundDagTemp input)
5566if (!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)
5578public BoundDagSliceEvaluation(SyntaxNode syntax, TypeSymbol sliceType, BoundDagTemp lengthTemp, int startIndex, int endIndex, BoundExpression indexerAccess, BoundSlicePatternReceiverPlaceholder receiverPlaceholder, BoundSlicePatternRangePlaceholder argumentPlaceholder, BoundDagTemp input, bool hasErrors = false)
5602public TypeSymbol SliceType { get; }
5613public BoundDagSliceEvaluation Update(TypeSymbol sliceType, BoundDagTemp lengthTemp, int startIndex, int endIndex, BoundExpression indexerAccess, BoundSlicePatternReceiverPlaceholder receiverPlaceholder, BoundSlicePatternRangePlaceholder argumentPlaceholder, BoundDagTemp input)
5615if (!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)
5728public new TypeSymbol? Type => base.Type;
5735public BoundSequencePointExpression(SyntaxNode syntax, BoundExpression expression, TypeSymbol? type, bool hasErrors = false)
5749public BoundSequencePointExpression Update(BoundExpression expression, TypeSymbol? type)
5751if (expression != this.Expression || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
5763public BoundSequence(SyntaxNode syntax, ImmutableArray<LocalSymbol> locals, ImmutableArray<BoundExpression> sideEffects, BoundExpression value, TypeSymbol type, bool hasErrors = false)
5777public new TypeSymbol Type => base.Type!;
5785public BoundSequence Update(ImmutableArray<LocalSymbol> locals, ImmutableArray<BoundExpression> sideEffects, BoundExpression value, TypeSymbol type)
5787if (locals != this.Locals || sideEffects != this.SideEffects || value != this.Value || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
5799public BoundSpillSequence(SyntaxNode syntax, ImmutableArray<LocalSymbol> locals, ImmutableArray<BoundStatement> sideEffects, BoundExpression value, TypeSymbol type, bool hasErrors = false)
5813public new TypeSymbol Type => base.Type!;
5821public BoundSpillSequence Update(ImmutableArray<LocalSymbol> locals, ImmutableArray<BoundStatement> sideEffects, BoundExpression value, TypeSymbol type)
5823if (locals != this.Locals || sideEffects != this.SideEffects || value != this.Value || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
5835public BoundDynamicMemberAccess(SyntaxNode syntax, BoundExpression receiver, ImmutableArray<TypeWithAnnotations> typeArgumentsOpt, string name, bool invoked, bool indexed, TypeSymbol type, bool hasErrors = false)
5850public new TypeSymbol Type => base.Type!;
5860public BoundDynamicMemberAccess Update(BoundExpression receiver, ImmutableArray<TypeWithAnnotations> typeArgumentsOpt, string name, bool invoked, bool indexed, TypeSymbol type)
5862if (receiver != this.Receiver || typeArgumentsOpt != this.TypeArgumentsOpt || name != this.Name || invoked != this.Invoked || indexed != this.Indexed || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
5874protected BoundDynamicInvocableBase(BoundKind kind, SyntaxNode syntax, BoundExpression expression, ImmutableArray<BoundExpression> arguments, TypeSymbol? type, bool hasErrors = false)
5891public BoundDynamicInvocation(SyntaxNode syntax, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, ImmutableArray<MethodSymbol> applicableMethods, BoundExpression expression, ImmutableArray<BoundExpression> arguments, TypeSymbol type, bool hasErrors = false)
5905public new TypeSymbol Type => base.Type!;
5913public BoundDynamicInvocation Update(ImmutableArray<string?> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, ImmutableArray<MethodSymbol> applicableMethods, BoundExpression expression, ImmutableArray<BoundExpression> arguments, TypeSymbol type)
5915if (argumentNamesOpt != this.ArgumentNamesOpt || argumentRefKindsOpt != this.ArgumentRefKindsOpt || applicableMethods != this.ApplicableMethods || expression != this.Expression || arguments != this.Arguments || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
5927public BoundConditionalAccess(SyntaxNode syntax, BoundExpression receiver, BoundExpression accessExpression, TypeSymbol type, bool hasErrors = false)
5939public new TypeSymbol Type => base.Type!;
5946public BoundConditionalAccess Update(BoundExpression receiver, BoundExpression accessExpression, TypeSymbol type)
5948if (receiver != this.Receiver || accessExpression != this.AccessExpression || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
5960public BoundLoweredConditionalAccess(SyntaxNode syntax, BoundExpression receiver, MethodSymbol? hasValueMethodOpt, BoundExpression whenNotNull, BoundExpression? whenNullOpt, int id, bool forceCopyOfNullableValueType, TypeSymbol type, bool hasErrors = false)
5976public new TypeSymbol Type => base.Type!;
5987public BoundLoweredConditionalAccess Update(BoundExpression receiver, MethodSymbol? hasValueMethodOpt, BoundExpression whenNotNull, BoundExpression? whenNullOpt, int id, bool forceCopyOfNullableValueType, TypeSymbol type)
5989if (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))
6001public BoundConditionalReceiver(SyntaxNode syntax, int id, TypeSymbol type, bool hasErrors)
6010public BoundConditionalReceiver(SyntaxNode syntax, int id, TypeSymbol type)
6019public new TypeSymbol Type => base.Type!;
6025public BoundConditionalReceiver Update(int id, TypeSymbol type)
6027if (id != this.Id || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
6039public BoundComplexConditionalReceiver(SyntaxNode syntax, BoundExpression valueTypeReceiver, BoundExpression referenceTypeReceiver, TypeSymbol type, bool hasErrors = false)
6051public new TypeSymbol Type => base.Type!;
6058public BoundComplexConditionalReceiver Update(BoundExpression valueTypeReceiver, BoundExpression referenceTypeReceiver, TypeSymbol type)
6060if (valueTypeReceiver != this.ValueTypeReceiver || referenceTypeReceiver != this.ReferenceTypeReceiver || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
6141public BoundCall(SyntaxNode syntax, BoundExpression? receiverOpt, ThreeState initialBindingReceiverIsSubjectToCloning, MethodSymbol method, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, bool isDelegateCall, bool expanded, bool invokedAsExtensionMethod, ImmutableArray<int> argsToParamsOpt, BitVector defaultArguments, LookupResultKind resultKind, ImmutableArray<MethodSymbol> originalMethodsOpt, TypeSymbol type, bool hasErrors = false)
6168public new TypeSymbol Type => base.Type!;
6186public BoundCall Update(BoundExpression? receiverOpt, ThreeState initialBindingReceiverIsSubjectToCloning, MethodSymbol method, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, bool isDelegateCall, bool expanded, bool invokedAsExtensionMethod, ImmutableArray<int> argsToParamsOpt, BitVector defaultArguments, LookupResultKind resultKind, ImmutableArray<MethodSymbol> originalMethodsOpt, TypeSymbol type)
6188if (receiverOpt != this.ReceiverOpt || initialBindingReceiverIsSubjectToCloning != this.InitialBindingReceiverIsSubjectToCloning || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(method, this.Method) || arguments != this.Arguments || argumentNamesOpt != this.ArgumentNamesOpt || argumentRefKindsOpt != this.ArgumentRefKindsOpt || isDelegateCall != this.IsDelegateCall || expanded != this.Expanded || invokedAsExtensionMethod != this.InvokedAsExtensionMethod || argsToParamsOpt != this.ArgsToParamsOpt || defaultArguments != this.DefaultArguments || resultKind != this.ResultKind || originalMethodsOpt != this.OriginalMethodsOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
6200public BoundEventAssignmentOperator(SyntaxNode syntax, EventSymbol @event, bool isAddition, bool isDynamic, BoundExpression? receiverOpt, BoundExpression argument, TypeSymbol type, bool hasErrors = false)
6215public new TypeSymbol Type => base.Type!;
6225public BoundEventAssignmentOperator Update(EventSymbol @event, bool isAddition, bool isDynamic, BoundExpression? receiverOpt, BoundExpression argument, TypeSymbol type)
6227if (!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))
6239public 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)
6257public new TypeSymbol Type => base.Type!;
6270public BoundAttribute Update(MethodSymbol? constructor, ImmutableArray<BoundExpression> constructorArguments, ImmutableArray<string?> constructorArgumentNamesOpt, ImmutableArray<int> constructorArgumentsToParamsOpt, bool constructorExpanded, BitVector constructorDefaultArguments, ImmutableArray<BoundAssignmentOperator> namedArguments, LookupResultKind resultKind, TypeSymbol type)
6272if (!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))
6298public new TypeSymbol? Type => base.Type;
6322protected BoundObjectCreationExpressionBase(BoundKind kind, SyntaxNode syntax, TypeSymbol type, bool hasErrors)
6330protected BoundObjectCreationExpressionBase(BoundKind kind, SyntaxNode syntax, TypeSymbol type)
6338public new TypeSymbol Type => base.Type!;
6343public 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)
6380public 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)
6382if (!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))
6394protected BoundCollectionExpressionBase(BoundKind kind, SyntaxNode syntax, ImmutableArray<BoundNode> elements, TypeSymbol? type, bool hasErrors = false)
6416public new TypeSymbol? Type => base.Type;
6435public BoundCollectionExpression(SyntaxNode syntax, CollectionExpressionTypeKind collectionTypeKind, BoundObjectOrCollectionValuePlaceholder? placeholder, BoundExpression? collectionCreation, MethodSymbol? collectionBuilderMethod, BoundValuePlaceholder? collectionBuilderInvocationPlaceholder, BoundExpression? collectionBuilderInvocationConversion, bool wasTargetTyped, BoundUnconvertedCollectionExpression unconvertedCollectionExpression, ImmutableArray<BoundNode> elements, TypeSymbol type, bool hasErrors = false)
6453public new TypeSymbol Type => base.Type!;
6466public BoundCollectionExpression Update(CollectionExpressionTypeKind collectionTypeKind, BoundObjectOrCollectionValuePlaceholder? placeholder, BoundExpression? collectionCreation, MethodSymbol? collectionBuilderMethod, BoundValuePlaceholder? collectionBuilderInvocationPlaceholder, BoundExpression? collectionBuilderInvocationConversion, bool wasTargetTyped, BoundUnconvertedCollectionExpression unconvertedCollectionExpression, ImmutableArray<BoundNode> elements, TypeSymbol type)
6468if (collectionTypeKind != this.CollectionTypeKind || placeholder != this.Placeholder || collectionCreation != this.CollectionCreation || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(collectionBuilderMethod, this.CollectionBuilderMethod) || collectionBuilderInvocationPlaceholder != this.CollectionBuilderInvocationPlaceholder || collectionBuilderInvocationConversion != this.CollectionBuilderInvocationConversion || wasTargetTyped != this.WasTargetTyped || unconvertedCollectionExpression != this.UnconvertedCollectionExpression || elements != this.Elements || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
6480public BoundCollectionExpressionSpreadExpressionPlaceholder(SyntaxNode syntax, TypeSymbol? type, bool hasErrors)
6485public BoundCollectionExpressionSpreadExpressionPlaceholder(SyntaxNode syntax, TypeSymbol? type)
6494public BoundCollectionExpressionSpreadExpressionPlaceholder Update(TypeSymbol? type)
6496if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
6548protected BoundTupleExpression(BoundKind kind, SyntaxNode syntax, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<bool> inferredNamesOpt, TypeSymbol? type, bool hasErrors = false)
6566public BoundTupleLiteral(SyntaxNode syntax, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<bool> inferredNamesOpt, TypeSymbol? type, bool hasErrors = false)
6574public new TypeSymbol? Type => base.Type;
6579public BoundTupleLiteral Update(ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<bool> inferredNamesOpt, TypeSymbol? type)
6581if (arguments != this.Arguments || argumentNamesOpt != this.ArgumentNamesOpt || inferredNamesOpt != this.InferredNamesOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
6593public BoundConvertedTupleLiteral(SyntaxNode syntax, BoundTupleLiteral? sourceTuple, bool wasTargetTyped, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<bool> inferredNamesOpt, TypeSymbol? type, bool hasErrors = false)
6609public BoundConvertedTupleLiteral Update(BoundTupleLiteral? sourceTuple, bool wasTargetTyped, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<bool> inferredNamesOpt, TypeSymbol? type)
6611if (sourceTuple != this.SourceTuple || wasTargetTyped != this.WasTargetTyped || arguments != this.Arguments || argumentNamesOpt != this.ArgumentNamesOpt || inferredNamesOpt != this.InferredNamesOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
6623public 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)
6652public BoundDynamicObjectCreationExpression Update(string name, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, BoundObjectInitializerExpressionBase? initializerExpressionOpt, ImmutableArray<MethodSymbol> applicableMethods, bool wasTargetTyped, TypeSymbol type)
6654if (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))
6666public BoundNoPiaObjectCreationExpression(SyntaxNode syntax, string? guidString, BoundObjectInitializerExpressionBase? initializerExpressionOpt, bool wasTargetTyped, TypeSymbol type, bool hasErrors = false)
6684public BoundNoPiaObjectCreationExpression Update(string? guidString, BoundObjectInitializerExpressionBase? initializerExpressionOpt, bool wasTargetTyped, TypeSymbol type)
6686if (guidString != this.GuidString || initializerExpressionOpt != this.InitializerExpressionOpt || wasTargetTyped != this.WasTargetTyped || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
6698protected BoundObjectInitializerExpressionBase(BoundKind kind, SyntaxNode syntax, BoundObjectOrCollectionValuePlaceholder placeholder, ImmutableArray<BoundExpression> initializers, TypeSymbol type, bool hasErrors = false)
6710public new TypeSymbol Type => base.Type!;
6717public BoundObjectInitializerExpression(SyntaxNode syntax, BoundObjectOrCollectionValuePlaceholder placeholder, ImmutableArray<BoundExpression> initializers, TypeSymbol type, bool hasErrors = false)
6731public BoundObjectInitializerExpression Update(BoundObjectOrCollectionValuePlaceholder placeholder, ImmutableArray<BoundExpression> initializers, TypeSymbol type)
6733if (placeholder != this.Placeholder || initializers != this.Initializers || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
6745public BoundObjectInitializerMember(SyntaxNode syntax, Symbol? memberSymbol, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, bool expanded, ImmutableArray<int> argsToParamsOpt, BitVector defaultArguments, LookupResultKind resultKind, AccessorKind accessorKind, TypeSymbol receiverType, TypeSymbol type, bool hasErrors = false)
6765public new TypeSymbol Type => base.Type!;
6775public TypeSymbol ReceiverType { get; }
6780public BoundObjectInitializerMember Update(Symbol? memberSymbol, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, bool expanded, ImmutableArray<int> argsToParamsOpt, BitVector defaultArguments, LookupResultKind resultKind, AccessorKind accessorKind, TypeSymbol receiverType, TypeSymbol type)
6782if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(memberSymbol, this.MemberSymbol) || arguments != this.Arguments || argumentNamesOpt != this.ArgumentNamesOpt || argumentRefKindsOpt != this.ArgumentRefKindsOpt || expanded != this.Expanded || argsToParamsOpt != this.ArgsToParamsOpt || defaultArguments != this.DefaultArguments || resultKind != this.ResultKind || accessorKind != this.AccessorKind || !TypeSymbol.Equals(receiverType, this.ReceiverType, TypeCompareKind.ConsiderEverything) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
6794public BoundDynamicObjectInitializerMember(SyntaxNode syntax, string memberName, TypeSymbol receiverType, TypeSymbol type, bool hasErrors)
6806public BoundDynamicObjectInitializerMember(SyntaxNode syntax, string memberName, TypeSymbol receiverType, TypeSymbol type)
6818public new TypeSymbol Type => base.Type!;
6820public TypeSymbol ReceiverType { get; }
6825public BoundDynamicObjectInitializerMember Update(string memberName, TypeSymbol receiverType, TypeSymbol type)
6827if (memberName != this.MemberName || !TypeSymbol.Equals(receiverType, this.ReceiverType, TypeCompareKind.ConsiderEverything) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
6839public BoundCollectionInitializerExpression(SyntaxNode syntax, BoundObjectOrCollectionValuePlaceholder placeholder, ImmutableArray<BoundExpression> initializers, TypeSymbol type, bool hasErrors = false)
6853public BoundCollectionInitializerExpression Update(BoundObjectOrCollectionValuePlaceholder placeholder, ImmutableArray<BoundExpression> initializers, TypeSymbol type)
6855if (placeholder != this.Placeholder || initializers != this.Initializers || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
6867public 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)
6885public new TypeSymbol Type => base.Type!;
6898public BoundCollectionElementInitializer Update(MethodSymbol addMethod, ImmutableArray<BoundExpression> arguments, BoundExpression? implicitReceiverOpt, bool expanded, ImmutableArray<int> argsToParamsOpt, BitVector defaultArguments, bool invokedAsExtensionMethod, LookupResultKind resultKind, TypeSymbol type)
6900if (!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))
6912public BoundDynamicCollectionElementInitializer(SyntaxNode syntax, ImmutableArray<MethodSymbol> applicableMethods, BoundExpression expression, ImmutableArray<BoundExpression> arguments, TypeSymbol type, bool hasErrors = false)
6924public new TypeSymbol Type => base.Type!;
6930public BoundDynamicCollectionElementInitializer Update(ImmutableArray<MethodSymbol> applicableMethods, BoundExpression expression, ImmutableArray<BoundExpression> arguments, TypeSymbol type)
6932if (applicableMethods != this.ApplicableMethods || expression != this.Expression || arguments != this.Arguments || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
6944public BoundImplicitReceiver(SyntaxNode syntax, TypeSymbol type, bool hasErrors)
6952public BoundImplicitReceiver(SyntaxNode syntax, TypeSymbol type)
6960public new TypeSymbol Type => base.Type!;
6965public BoundImplicitReceiver Update(TypeSymbol type)
6967if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
6979public BoundAnonymousObjectCreationExpression(SyntaxNode syntax, MethodSymbol constructor, ImmutableArray<BoundExpression> arguments, ImmutableArray<BoundAnonymousPropertyDeclaration> declarations, TypeSymbol type, bool hasErrors = false)
6993public new TypeSymbol Type => base.Type!;
7001public BoundAnonymousObjectCreationExpression Update(MethodSymbol constructor, ImmutableArray<BoundExpression> arguments, ImmutableArray<BoundAnonymousPropertyDeclaration> declarations, TypeSymbol type)
7003if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(constructor, this.Constructor) || arguments != this.Arguments || declarations != this.Declarations || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
7015public BoundAnonymousPropertyDeclaration(SyntaxNode syntax, PropertySymbol property, TypeSymbol type, bool hasErrors)
7025public BoundAnonymousPropertyDeclaration(SyntaxNode syntax, PropertySymbol property, TypeSymbol type)
7035public new TypeSymbol Type => base.Type!;
7041public BoundAnonymousPropertyDeclaration Update(PropertySymbol property, TypeSymbol type)
7043if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(property, this.Property) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
7055public BoundNewT(SyntaxNode syntax, BoundObjectInitializerExpressionBase? initializerExpressionOpt, bool wasTargetTyped, TypeSymbol type, bool hasErrors = false)
7071public BoundNewT Update(BoundObjectInitializerExpressionBase? initializerExpressionOpt, bool wasTargetTyped, TypeSymbol type)
7073if (initializerExpressionOpt != this.InitializerExpressionOpt || wasTargetTyped != this.WasTargetTyped || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
7085public BoundDelegateCreationExpression(SyntaxNode syntax, BoundExpression argument, MethodSymbol? methodOpt, bool isExtensionMethod, bool wasTargetTyped, TypeSymbol type, bool hasErrors = false)
7098public new TypeSymbol Type => base.Type!;
7107public BoundDelegateCreationExpression Update(BoundExpression argument, MethodSymbol? methodOpt, bool isExtensionMethod, bool wasTargetTyped, TypeSymbol type)
7109if (argument != this.Argument || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(methodOpt, this.MethodOpt) || isExtensionMethod != this.IsExtensionMethod || wasTargetTyped != this.WasTargetTyped || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
7121public BoundArrayCreation(SyntaxNode syntax, ImmutableArray<BoundExpression> bounds, BoundArrayInitialization? initializerOpt, TypeSymbol type, bool hasErrors = false)
7132public new TypeSymbol Type => base.Type!;
7139public BoundArrayCreation Update(ImmutableArray<BoundExpression> bounds, BoundArrayInitialization? initializerOpt, TypeSymbol type)
7141if (bounds != this.Bounds || initializerOpt != this.InitializerOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
7163public new TypeSymbol? Type => base.Type;
7184protected BoundStackAllocArrayCreationBase(BoundKind kind, SyntaxNode syntax, TypeSymbol elementType, BoundExpression count, BoundArrayInitialization? initializerOpt, TypeSymbol? type, bool hasErrors = false)
7196public TypeSymbol ElementType { get; }
7203public BoundStackAllocArrayCreation(SyntaxNode syntax, TypeSymbol elementType, BoundExpression count, BoundArrayInitialization? initializerOpt, TypeSymbol? type, bool hasErrors = false)
7216public BoundStackAllocArrayCreation Update(TypeSymbol elementType, BoundExpression count, BoundArrayInitialization? initializerOpt, TypeSymbol? type)
7218if (!TypeSymbol.Equals(elementType, this.ElementType, TypeCompareKind.ConsiderEverything) || count != this.Count || initializerOpt != this.InitializerOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
7230public BoundConvertedStackAllocExpression(SyntaxNode syntax, TypeSymbol elementType, BoundExpression count, BoundArrayInitialization? initializerOpt, TypeSymbol type, bool hasErrors = false)
7240public new TypeSymbol Type => base.Type!;
7245public BoundConvertedStackAllocExpression Update(TypeSymbol elementType, BoundExpression count, BoundArrayInitialization? initializerOpt, TypeSymbol type)
7247if (!TypeSymbol.Equals(elementType, this.ElementType, TypeCompareKind.ConsiderEverything) || count != this.Count || initializerOpt != this.InitializerOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
7259public BoundFieldAccess(SyntaxNode syntax, BoundExpression? receiverOpt, FieldSymbol fieldSymbol, ConstantValue? constantValueOpt, LookupResultKind resultKind, bool isByValue, bool isDeclaration, TypeSymbol type, bool hasErrors = false)
7274public new TypeSymbol Type => base.Type!;
7285public BoundFieldAccess Update(BoundExpression? receiverOpt, FieldSymbol fieldSymbol, ConstantValue? constantValueOpt, LookupResultKind resultKind, bool isByValue, bool isDeclaration, TypeSymbol type)
7287if (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))
7299public BoundHoistedFieldAccess(SyntaxNode syntax, FieldSymbol fieldSymbol, TypeSymbol type, bool hasErrors)
7309public BoundHoistedFieldAccess(SyntaxNode syntax, FieldSymbol fieldSymbol, TypeSymbol type)
7319public new TypeSymbol Type => base.Type!;
7325public BoundHoistedFieldAccess Update(FieldSymbol fieldSymbol, TypeSymbol type)
7327if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(fieldSymbol, this.FieldSymbol) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
7339public BoundPropertyAccess(SyntaxNode syntax, BoundExpression? receiverOpt, ThreeState initialBindingReceiverIsSubjectToCloning, PropertySymbol propertySymbol, AccessorKind autoPropertyAccessorKind, LookupResultKind resultKind, TypeSymbol type, bool hasErrors = false)
7353public new TypeSymbol Type => base.Type!;
7363public BoundPropertyAccess Update(BoundExpression? receiverOpt, ThreeState initialBindingReceiverIsSubjectToCloning, PropertySymbol propertySymbol, AccessorKind autoPropertyAccessorKind, LookupResultKind resultKind, TypeSymbol type)
7365if (receiverOpt != this.ReceiverOpt || initialBindingReceiverIsSubjectToCloning != this.InitialBindingReceiverIsSubjectToCloning || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(propertySymbol, this.PropertySymbol) || autoPropertyAccessorKind != this.AutoPropertyAccessorKind || resultKind != this.ResultKind || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
7377public BoundEventAccess(SyntaxNode syntax, BoundExpression? receiverOpt, EventSymbol eventSymbol, bool isUsableAsField, LookupResultKind resultKind, TypeSymbol type, bool hasErrors = false)
7390public new TypeSymbol Type => base.Type!;
7399public BoundEventAccess Update(BoundExpression? receiverOpt, EventSymbol eventSymbol, bool isUsableAsField, LookupResultKind resultKind, TypeSymbol type)
7401if (receiverOpt != this.ReceiverOpt || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(eventSymbol, this.EventSymbol) || isUsableAsField != this.IsUsableAsField || resultKind != this.ResultKind || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
7413public BoundIndexerAccess(SyntaxNode syntax, BoundExpression? receiverOpt, ThreeState initialBindingReceiverIsSubjectToCloning, PropertySymbol indexer, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, bool expanded, AccessorKind accessorKind, ImmutableArray<int> argsToParamsOpt, BitVector defaultArguments, ImmutableArray<PropertySymbol> originalIndexersOpt, TypeSymbol type, bool hasErrors = false)
7434public new TypeSymbol Type => base.Type!;
7450public BoundIndexerAccess Update(BoundExpression? receiverOpt, ThreeState initialBindingReceiverIsSubjectToCloning, PropertySymbol indexer, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, bool expanded, AccessorKind accessorKind, ImmutableArray<int> argsToParamsOpt, BitVector defaultArguments, ImmutableArray<PropertySymbol> originalIndexersOpt, TypeSymbol type)
7452if (receiverOpt != this.ReceiverOpt || initialBindingReceiverIsSubjectToCloning != this.InitialBindingReceiverIsSubjectToCloning || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(indexer, this.Indexer) || arguments != this.Arguments || argumentNamesOpt != this.ArgumentNamesOpt || argumentRefKindsOpt != this.ArgumentRefKindsOpt || expanded != this.Expanded || accessorKind != this.AccessorKind || argsToParamsOpt != this.ArgsToParamsOpt || defaultArguments != this.DefaultArguments || originalIndexersOpt != this.OriginalIndexersOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
7464public BoundImplicitIndexerAccess(SyntaxNode syntax, BoundExpression receiver, BoundExpression argument, BoundExpression lengthOrCountAccess, BoundImplicitIndexerReceiverPlaceholder receiverPlaceholder, BoundExpression indexerOrSliceAccess, ImmutableArray<BoundImplicitIndexerValuePlaceholder> argumentPlaceholders, TypeSymbol type, bool hasErrors = false)
7488public new TypeSymbol Type => base.Type!;
7499public BoundImplicitIndexerAccess Update(BoundExpression receiver, BoundExpression argument, BoundExpression lengthOrCountAccess, BoundImplicitIndexerReceiverPlaceholder receiverPlaceholder, BoundExpression indexerOrSliceAccess, ImmutableArray<BoundImplicitIndexerValuePlaceholder> argumentPlaceholders, TypeSymbol type)
7501if (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))
7513public BoundInlineArrayAccess(SyntaxNode syntax, BoundExpression expression, BoundExpression argument, bool isValue, WellKnownMember getItemOrSliceHelper, TypeSymbol type, bool hasErrors = false)
7531public new TypeSymbol Type => base.Type!;
7540public BoundInlineArrayAccess Update(BoundExpression expression, BoundExpression argument, bool isValue, WellKnownMember getItemOrSliceHelper, TypeSymbol type)
7542if (expression != this.Expression || argument != this.Argument || isValue != this.IsValue || getItemOrSliceHelper != this.GetItemOrSliceHelper || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
7554public BoundDynamicIndexerAccess(SyntaxNode syntax, BoundExpression receiver, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, ImmutableArray<PropertySymbol> applicableIndexers, TypeSymbol type, bool hasErrors = false)
7570public new TypeSymbol Type => base.Type!;
7580public BoundDynamicIndexerAccess Update(BoundExpression receiver, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, ImmutableArray<PropertySymbol> applicableIndexers, TypeSymbol type)
7582if (receiver != this.Receiver || arguments != this.Arguments || argumentNamesOpt != this.ArgumentNamesOpt || argumentRefKindsOpt != this.ArgumentRefKindsOpt || applicableIndexers != this.ApplicableIndexers || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
7594public BoundLambda(SyntaxNode syntax, UnboundLambda unboundLambda, MethodSymbol symbol, BoundBlock body, ReadOnlyBindingDiagnostic<AssemblySymbol> diagnostics, Binder binder, TypeSymbol? type, bool hasErrors = false)
7612public new TypeSymbol? Type => base.Type;
7620public BoundLambda Update(UnboundLambda unboundLambda, MethodSymbol symbol, BoundBlock body, ReadOnlyBindingDiagnostic<AssemblySymbol> diagnostics, Binder binder, TypeSymbol? type)
7622if (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))
7656public new TypeSymbol? Type => base.Type;
7678public BoundQueryClause(SyntaxNode syntax, BoundExpression value, RangeVariableSymbol? definedSymbol, BoundExpression? operation, BoundExpression? cast, Binder binder, BoundExpression? unoptimizedForm, TypeSymbol type, bool hasErrors = false)
7694public new TypeSymbol Type => base.Type!;
7705public BoundQueryClause Update(BoundExpression value, RangeVariableSymbol? definedSymbol, BoundExpression? operation, BoundExpression? cast, Binder binder, BoundExpression? unoptimizedForm, TypeSymbol type)
7707if (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))
7745public BoundNameOfOperator(SyntaxNode syntax, BoundExpression argument, ConstantValue constantValueOpt, TypeSymbol type, bool hasErrors = false)
7757public new TypeSymbol Type => base.Type!;
7764public BoundNameOfOperator Update(BoundExpression argument, ConstantValue constantValueOpt, TypeSymbol type)
7766if (argument != this.Argument || constantValueOpt != this.ConstantValueOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
7778protected BoundInterpolatedStringBase(BoundKind kind, SyntaxNode syntax, ImmutableArray<BoundExpression> parts, ConstantValue? constantValueOpt, TypeSymbol? type, bool hasErrors = false)
7794public BoundUnconvertedInterpolatedString(SyntaxNode syntax, ImmutableArray<BoundExpression> parts, ConstantValue? constantValueOpt, TypeSymbol? type, bool hasErrors = false)
7806public BoundUnconvertedInterpolatedString Update(ImmutableArray<BoundExpression> parts, ConstantValue? constantValueOpt, TypeSymbol? type)
7808if (parts != this.Parts || constantValueOpt != this.ConstantValueOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
7820public BoundInterpolatedString(SyntaxNode syntax, InterpolatedStringHandlerData? interpolationData, ImmutableArray<BoundExpression> parts, ConstantValue? constantValueOpt, TypeSymbol? type, bool hasErrors = false)
7834public BoundInterpolatedString Update(InterpolatedStringHandlerData? interpolationData, ImmutableArray<BoundExpression> parts, ConstantValue? constantValueOpt, TypeSymbol? type)
7836if (!interpolationData.Equals(this.InterpolationData) || parts != this.Parts || constantValueOpt != this.ConstantValueOpt || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
7848public BoundInterpolatedStringHandlerPlaceholder(SyntaxNode syntax, TypeSymbol? type, bool hasErrors)
7853public BoundInterpolatedStringHandlerPlaceholder(SyntaxNode syntax, TypeSymbol? type)
7862public BoundInterpolatedStringHandlerPlaceholder Update(TypeSymbol? type)
7864if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
7876public BoundInterpolatedStringArgumentPlaceholder(SyntaxNode syntax, int argumentIndex, TypeSymbol type, bool hasErrors)
7885public BoundInterpolatedStringArgumentPlaceholder(SyntaxNode syntax, int argumentIndex, TypeSymbol type)
7894public new TypeSymbol Type => base.Type!;
7900public BoundInterpolatedStringArgumentPlaceholder Update(int argumentIndex, TypeSymbol type)
7902if (argumentIndex != this.ArgumentIndex || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
7926public new TypeSymbol? Type => base.Type;
7949public BoundIsPatternExpression(SyntaxNode syntax, BoundExpression expression, BoundPattern pattern, bool isNegated, BoundDecisionDag reachabilityDecisionDag, LabelSymbol whenTrueLabel, LabelSymbol whenFalseLabel, TypeSymbol? type, bool hasErrors = false)
7977public BoundIsPatternExpression Update(BoundExpression expression, BoundPattern pattern, bool isNegated, BoundDecisionDag reachabilityDecisionDag, LabelSymbol whenTrueLabel, LabelSymbol whenFalseLabel, TypeSymbol? type)
7979if (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))
7991protected BoundPattern(BoundKind kind, SyntaxNode syntax, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors)
8002protected BoundPattern(BoundKind kind, SyntaxNode syntax, TypeSymbol inputType, TypeSymbol narrowedType)
8013public TypeSymbol InputType { get; }
8014public TypeSymbol NarrowedType { get; }
8019public BoundConstantPattern(SyntaxNode syntax, BoundExpression value, ConstantValue constantValue, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors = false)
8042public BoundConstantPattern Update(BoundExpression value, ConstantValue constantValue, TypeSymbol inputType, TypeSymbol narrowedType)
8044if (value != this.Value || constantValue != this.ConstantValue || !TypeSymbol.Equals(inputType, this.InputType, TypeCompareKind.ConsiderEverything) || !TypeSymbol.Equals(narrowedType, this.NarrowedType, TypeCompareKind.ConsiderEverything))
8056public BoundDiscardPattern(SyntaxNode syntax, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors)
8069public BoundDiscardPattern(SyntaxNode syntax, TypeSymbol inputType, TypeSymbol narrowedType)
8082public BoundDiscardPattern Update(TypeSymbol inputType, TypeSymbol narrowedType)
8084if (!TypeSymbol.Equals(inputType, this.InputType, TypeCompareKind.ConsiderEverything) || !TypeSymbol.Equals(narrowedType, this.NarrowedType, TypeCompareKind.ConsiderEverything))
8096protected BoundObjectPattern(BoundKind kind, SyntaxNode syntax, Symbol? variable, BoundExpression? variableAccess, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors = false)
8113public BoundDeclarationPattern(SyntaxNode syntax, BoundTypeExpression declaredType, bool isVar, Symbol? variable, BoundExpression? variableAccess, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors = false)
8135public BoundDeclarationPattern Update(BoundTypeExpression declaredType, bool isVar, Symbol? variable, BoundExpression? variableAccess, TypeSymbol inputType, TypeSymbol narrowedType)
8137if (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))
8149public 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)
8176public BoundRecursivePattern Update(BoundTypeExpression? declaredType, MethodSymbol? deconstructMethod, ImmutableArray<BoundPositionalSubpattern> deconstruction, ImmutableArray<BoundPropertySubpattern> properties, bool isExplicitNotNullTest, Symbol? variable, BoundExpression? variableAccess, TypeSymbol inputType, TypeSymbol narrowedType)
8178if (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))
8190public 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)
8220public BoundListPattern Update(ImmutableArray<BoundPattern> subpatterns, bool hasSlice, BoundExpression? lengthAccess, BoundExpression? indexerAccess, BoundListPatternReceiverPlaceholder? receiverPlaceholder, BoundListPatternIndexPlaceholder? argumentPlaceholder, Symbol? variable, BoundExpression? variableAccess, TypeSymbol inputType, TypeSymbol narrowedType)
8222if (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))
8234public BoundSlicePattern(SyntaxNode syntax, BoundPattern? pattern, BoundExpression? indexerAccess, BoundSlicePatternReceiverPlaceholder? receiverPlaceholder, BoundSlicePatternRangePlaceholder? argumentPlaceholder, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors = false)
8259public BoundSlicePattern Update(BoundPattern? pattern, BoundExpression? indexerAccess, BoundSlicePatternReceiverPlaceholder? receiverPlaceholder, BoundSlicePatternRangePlaceholder? argumentPlaceholder, TypeSymbol inputType, TypeSymbol narrowedType)
8261if (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))
8273public BoundITuplePattern(SyntaxNode syntax, MethodSymbol getLengthMethod, MethodSymbol getItemMethod, ImmutableArray<BoundPositionalSubpattern> subpatterns, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors = false)
8299public BoundITuplePattern Update(MethodSymbol getLengthMethod, MethodSymbol getItemMethod, ImmutableArray<BoundPositionalSubpattern> subpatterns, TypeSymbol inputType, TypeSymbol narrowedType)
8301if (!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))
8385public BoundPropertySubpatternMember(SyntaxNode syntax, BoundPropertySubpatternMember? receiver, Symbol? symbol, TypeSymbol type, bool hasErrors = false)
8398public TypeSymbol Type { get; }
8403public BoundPropertySubpatternMember Update(BoundPropertySubpatternMember? receiver, Symbol? symbol, TypeSymbol type)
8405if (receiver != this.Receiver || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(symbol, this.Symbol) || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
8417public BoundTypePattern(SyntaxNode syntax, BoundTypeExpression declaredType, bool isExplicitNotNullTest, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors = false)
8439public BoundTypePattern Update(BoundTypeExpression declaredType, bool isExplicitNotNullTest, TypeSymbol inputType, TypeSymbol narrowedType)
8441if (declaredType != this.DeclaredType || isExplicitNotNullTest != this.IsExplicitNotNullTest || !TypeSymbol.Equals(inputType, this.InputType, TypeCompareKind.ConsiderEverything) || !TypeSymbol.Equals(narrowedType, this.NarrowedType, TypeCompareKind.ConsiderEverything))
8453public BoundBinaryPattern(SyntaxNode syntax, bool disjunction, BoundPattern left, BoundPattern right, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors = false)
8478public BoundBinaryPattern Update(bool disjunction, BoundPattern left, BoundPattern right, TypeSymbol inputType, TypeSymbol narrowedType)
8480if (disjunction != this.Disjunction || left != this.Left || right != this.Right || !TypeSymbol.Equals(inputType, this.InputType, TypeCompareKind.ConsiderEverything) || !TypeSymbol.Equals(narrowedType, this.NarrowedType, TypeCompareKind.ConsiderEverything))
8492public BoundNegatedPattern(SyntaxNode syntax, BoundPattern negated, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors = false)
8512public BoundNegatedPattern Update(BoundPattern negated, TypeSymbol inputType, TypeSymbol narrowedType)
8514if (negated != this.Negated || !TypeSymbol.Equals(inputType, this.InputType, TypeCompareKind.ConsiderEverything) || !TypeSymbol.Equals(narrowedType, this.NarrowedType, TypeCompareKind.ConsiderEverything))
8526public BoundRelationalPattern(SyntaxNode syntax, BinaryOperatorKind relation, BoundExpression value, ConstantValue constantValue, TypeSymbol inputType, TypeSymbol narrowedType, bool hasErrors = false)
8551public BoundRelationalPattern Update(BinaryOperatorKind relation, BoundExpression value, ConstantValue constantValue, TypeSymbol inputType, TypeSymbol narrowedType)
8553if (relation != this.Relation || value != this.Value || constantValue != this.ConstantValue || !TypeSymbol.Equals(inputType, this.InputType, TypeCompareKind.ConsiderEverything) || !TypeSymbol.Equals(narrowedType, this.NarrowedType, TypeCompareKind.ConsiderEverything))
8565public BoundDiscardExpression(SyntaxNode syntax, NullableAnnotation nullableAnnotation, bool isInferred, TypeSymbol? type, bool hasErrors)
8572public BoundDiscardExpression(SyntaxNode syntax, NullableAnnotation nullableAnnotation, bool isInferred, TypeSymbol? type)
8579public new TypeSymbol? Type => base.Type;
8586public BoundDiscardExpression Update(NullableAnnotation nullableAnnotation, bool isInferred, TypeSymbol? type)
8588if (nullableAnnotation != this.NullableAnnotation || isInferred != this.IsInferred || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
8600public BoundThrowExpression(SyntaxNode syntax, BoundExpression expression, TypeSymbol? type, bool hasErrors = false)
8614public BoundThrowExpression Update(BoundExpression expression, TypeSymbol? type)
8616if (expression != this.Expression || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
8638public new TypeSymbol? Type => base.Type;
8711public new TypeSymbol? Type => base.Type;
8798public BoundExpressionWithNullability(SyntaxNode syntax, BoundExpression expression, NullableAnnotation nullableAnnotation, TypeSymbol? type, bool hasErrors = false)
8809public new TypeSymbol? Type => base.Type;
8815public BoundExpressionWithNullability Update(BoundExpression expression, NullableAnnotation nullableAnnotation, TypeSymbol? type)
8817if (expression != this.Expression || nullableAnnotation != this.NullableAnnotation || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
8829public BoundWithExpression(SyntaxNode syntax, BoundExpression receiver, MethodSymbol? cloneMethod, BoundObjectInitializerExpressionBase initializerExpression, TypeSymbol type, bool hasErrors = false)
8842public new TypeSymbol Type => base.Type!;
8850public BoundWithExpression Update(BoundExpression receiver, MethodSymbol? cloneMethod, BoundObjectInitializerExpressionBase initializerExpression, TypeSymbol type)
8852if (receiver != this.Receiver || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(cloneMethod, this.CloneMethod) || initializerExpression != this.InitializerExpression || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
10866TypeSymbol? type = this.VisitType(node.Type);
10872TypeSymbol? type = this.VisitType(node.Type);
10878TypeSymbol? type = this.VisitType(node.Type);
10883TypeSymbol? type = this.VisitType(node.Type);
10888TypeSymbol? type = this.VisitType(node.Type);
10893TypeSymbol? type = this.VisitType(node.Type);
10898TypeSymbol? type = this.VisitType(node.Type);
10903TypeSymbol? type = this.VisitType(node.Type);
10908TypeSymbol? type = this.VisitType(node.Type);
10913TypeSymbol? type = this.VisitType(node.Type);
10918TypeSymbol? type = this.VisitType(node.Type);
10923TypeSymbol? type = this.VisitType(node.Type);
10928TypeSymbol? type = this.VisitType(node.Type);
10933TypeSymbol? type = this.VisitType(node.Type);
10939TypeSymbol? type = this.VisitType(node.Type);
10946TypeSymbol? type = this.VisitType(node.Type);
10964TypeSymbol? type = this.VisitType(node.Type);
10969TypeSymbol? type = this.VisitType(node.Type);
10976TypeSymbol? type = this.VisitType(node.Type);
10984TypeSymbol? constrainedToTypeOpt = this.VisitType(node.ConstrainedToTypeOpt);
10985TypeSymbol? type = this.VisitType(node.Type);
10997TypeSymbol? constrainedToTypeOpt = this.VisitType(node.ConstrainedToTypeOpt);
10998TypeSymbol? type = this.VisitType(node.Type);
11004TypeSymbol? type = this.VisitType(node.Type);
11010TypeSymbol? type = this.VisitType(node.Type);
11016TypeSymbol? constrainedToTypeOpt = this.VisitType(node.ConstrainedToTypeOpt);
11017TypeSymbol? type = this.VisitType(node.Type);
11023TypeSymbol? type = this.VisitType(node.Type);
11030TypeSymbol? type = this.VisitType(node.Type);
11037TypeSymbol? type = this.VisitType(node.Type);
11044TypeSymbol? type = this.VisitType(node.Type);
11050TypeSymbol? type = this.VisitType(node.Type);
11056TypeSymbol? type = this.VisitType(node.Type);
11063TypeSymbol? type = this.VisitType(node.Type);
11071TypeSymbol? type = this.VisitType(node.Type);
11078TypeSymbol? type = this.VisitType(node.Type);
11085TypeSymbol? type = this.VisitType(node.Type);
11098TypeSymbol? constrainedToTypeOpt = this.VisitType(node.ConstrainedToTypeOpt);
11099TypeSymbol? type = this.VisitType(node.Type);
11111TypeSymbol? type = this.VisitType(node.Type);
11118TypeSymbol? type = this.VisitType(node.Type);
11125TypeSymbol? type = this.VisitType(node.Type);
11134TypeSymbol? type = this.VisitType(node.Type);
11141TypeSymbol? type = this.VisitType(node.Type);
11149TypeSymbol? type = this.VisitType(node.Type);
11157TypeSymbol? naturalTypeOpt = this.VisitType(node.NaturalTypeOpt);
11158TypeSymbol? type = this.VisitType(node.Type);
11165TypeSymbol? type = this.VisitType(node.Type);
11171TypeSymbol? type = this.VisitType(node.Type);
11177TypeSymbol? type = this.VisitType(node.Type);
11194TypeSymbol? type = this.VisitType(node.Type);
11201TypeSymbol? type = this.VisitType(node.Type);
11214TypeSymbol? type = this.VisitType(node.Type);
11221TypeSymbol? type = this.VisitType(node.Type);
11228TypeSymbol? type = this.VisitType(node.Type);
11233TypeSymbol? type = this.VisitType(node.Type);
11238TypeSymbol? type = this.VisitType(node.Type);
11243TypeSymbol? type = this.VisitType(node.Type);
11248TypeSymbol? type = this.VisitType(node.Type);
11253TypeSymbol? type = this.VisitType(node.Type);
11258TypeSymbol? type = this.VisitType(node.Type);
11263TypeSymbol? type = this.VisitType(node.Type);
11268TypeSymbol? type = this.VisitType(node.Type);
11275TypeSymbol? type = this.VisitType(node.Type);
11282TypeSymbol? type = this.VisitType(node.Type);
11287TypeSymbol? type = this.VisitType(node.Type);
11293TypeSymbol? type = this.VisitType(node.Type);
11300TypeSymbol? type = this.VisitType(node.Type);
11309TypeSymbol? type = this.VisitType(node.Type);
11315TypeSymbol? type = this.VisitType(node.Type);
11321TypeSymbol? type = this.VisitType(node.Type);
11328TypeSymbol? type = this.VisitType(node.Type);
11333TypeSymbol? type = this.VisitType(node.Type);
11339TypeSymbol? type = this.VisitType(node.Type);
11348TypeSymbol? elementPointerType = this.VisitType(node.ElementPointerType);
11349TypeSymbol? type = this.VisitType(node.Type);
11554TypeSymbol? exceptionTypeOpt = this.VisitType(node.ExceptionTypeOpt);
11559TypeSymbol? type = this.VisitType(node.Type);
11564TypeSymbol? type = this.VisitType(node.Type);
11569TypeSymbol? type = this.VisitType(node.Type);
11574TypeSymbol? type = this.VisitType(node.Type);
11579TypeSymbol? type = this.VisitType(node.Type);
11584TypeSymbol? type = this.VisitType(node.Type);
11590TypeSymbol? type = this.VisitType(node.Type);
11596TypeSymbol? type = this.VisitType(node.Type);
11603TypeSymbol? type = this.VisitType(node.Type);
11609TypeSymbol? type = this.VisitType(node.Type);
11633TypeSymbol? type = this.VisitType(node.Type);
11662TypeSymbol? type = this.VisitType(node.Type);
11671TypeSymbol? naturalTypeOpt = this.VisitType(node.NaturalTypeOpt);
11672TypeSymbol? type = this.VisitType(node.Type);
11708TypeSymbol? type = this.VisitType(node.Type);
11714TypeSymbol? type = this.VisitType(node.Type);
11746TypeSymbol? type = this.VisitType(node.Type);
11774TypeSymbol? indexerType = this.VisitType(node.IndexerType);
11784TypeSymbol? sliceType = this.VisitType(node.SliceType);
11810TypeSymbol? type = this.VisitType(node.Type);
11818TypeSymbol? type = this.VisitType(node.Type);
11826TypeSymbol? type = this.VisitType(node.Type);
11832TypeSymbol? type = this.VisitType(node.Type);
11840TypeSymbol? type = this.VisitType(node.Type);
11847TypeSymbol? type = this.VisitType(node.Type);
11856TypeSymbol? type = this.VisitType(node.Type);
11861TypeSymbol? type = this.VisitType(node.Type);
11868TypeSymbol? type = this.VisitType(node.Type);
11877TypeSymbol? type = this.VisitType(node.Type);
11884TypeSymbol? type = this.VisitType(node.Type);
11893TypeSymbol? type = this.VisitType(node.Type);
11901TypeSymbol? type = this.VisitType(node.Type);
11909TypeSymbol? type = this.VisitType(node.Type);
11915TypeSymbol? type = this.VisitType(node.Type);
11924TypeSymbol? type = this.VisitType(node.Type);
11930TypeSymbol? type = this.VisitType(node.Type);
11942TypeSymbol? type = this.VisitType(node.Type);
11947TypeSymbol? type = this.VisitType(node.Type);
11963TypeSymbol? type = this.VisitType(node.Type);
11970TypeSymbol? type = this.VisitType(node.Type);
11978TypeSymbol? type = this.VisitType(node.Type);
11984TypeSymbol? type = this.VisitType(node.Type);
11991TypeSymbol? type = this.VisitType(node.Type);
11998TypeSymbol? receiverType = this.VisitType(node.ReceiverType);
11999TypeSymbol? type = this.VisitType(node.Type);
12004TypeSymbol? receiverType = this.VisitType(node.ReceiverType);
12005TypeSymbol? type = this.VisitType(node.Type);
12012TypeSymbol? type = this.VisitType(node.Type);
12020TypeSymbol? type = this.VisitType(node.Type);
12028TypeSymbol? type = this.VisitType(node.Type);
12033TypeSymbol? type = this.VisitType(node.Type);
12041TypeSymbol? type = this.VisitType(node.Type);
12047TypeSymbol? type = this.VisitType(node.Type);
12053TypeSymbol? type = this.VisitType(node.Type);
12060TypeSymbol? type = this.VisitType(node.Type);
12067TypeSymbol? type = this.VisitType(node.Type);
12073TypeSymbol? type = this.VisitType(node.Type);
12080TypeSymbol? elementType = this.VisitType(node.ElementType);
12081TypeSymbol? type = this.VisitType(node.Type);
12088TypeSymbol? elementType = this.VisitType(node.ElementType);
12089TypeSymbol? type = this.VisitType(node.Type);
12096TypeSymbol? type = this.VisitType(node.Type);
12102TypeSymbol? type = this.VisitType(node.Type);
12109TypeSymbol? type = this.VisitType(node.Type);
12116TypeSymbol? type = this.VisitType(node.Type);
12125TypeSymbol? type = this.VisitType(node.Type);
12136TypeSymbol? type = this.VisitType(node.Type);
12143TypeSymbol? type = this.VisitType(node.Type);
12151TypeSymbol? type = this.VisitType(node.Type);
12159TypeSymbol? type = this.VisitType(node.Type);
12165TypeSymbol? type = this.VisitType(node.Type);
12175TypeSymbol? type = this.VisitType(node.Type);
12186TypeSymbol? type = this.VisitType(node.Type);
12192TypeSymbol? type = this.VisitType(node.Type);
12198TypeSymbol? type = this.VisitType(node.Type);
12203TypeSymbol? type = this.VisitType(node.Type);
12208TypeSymbol? type = this.VisitType(node.Type);
12216TypeSymbol? type = this.VisitType(node.Type);
12226TypeSymbol? type = this.VisitType(node.Type);
12232TypeSymbol? inputType = this.VisitType(node.InputType);
12233TypeSymbol? narrowedType = this.VisitType(node.NarrowedType);
12238TypeSymbol? inputType = this.VisitType(node.InputType);
12239TypeSymbol? narrowedType = this.VisitType(node.NarrowedType);
12247TypeSymbol? inputType = this.VisitType(node.InputType);
12248TypeSymbol? narrowedType = this.VisitType(node.NarrowedType);
12259TypeSymbol? inputType = this.VisitType(node.InputType);
12260TypeSymbol? narrowedType = this.VisitType(node.NarrowedType);
12272TypeSymbol? inputType = this.VisitType(node.InputType);
12273TypeSymbol? narrowedType = this.VisitType(node.NarrowedType);
12282TypeSymbol? inputType = this.VisitType(node.InputType);
12283TypeSymbol? narrowedType = this.VisitType(node.NarrowedType);
12291TypeSymbol? inputType = this.VisitType(node.InputType);
12292TypeSymbol? narrowedType = this.VisitType(node.NarrowedType);
12311TypeSymbol? type = this.VisitType(node.Type);
12317TypeSymbol? inputType = this.VisitType(node.InputType);
12318TypeSymbol? narrowedType = this.VisitType(node.NarrowedType);
12325TypeSymbol? inputType = this.VisitType(node.InputType);
12326TypeSymbol? narrowedType = this.VisitType(node.NarrowedType);
12332TypeSymbol? inputType = this.VisitType(node.InputType);
12333TypeSymbol? narrowedType = this.VisitType(node.NarrowedType);
12339TypeSymbol? inputType = this.VisitType(node.InputType);
12340TypeSymbol? narrowedType = this.VisitType(node.NarrowedType);
12345TypeSymbol? type = this.VisitType(node.Type);
12351TypeSymbol? type = this.VisitType(node.Type);
12358TypeSymbol? type = this.VisitType(node.Type);
12365TypeSymbol? type = this.VisitType(node.Type);
12371TypeSymbol? type = this.VisitType(node.Type);
12391TypeSymbol? type = this.VisitType(node.Type);
12399TypeSymbol? type = this.VisitType(node.Type);
12406private readonly ImmutableDictionary<BoundExpression, (NullabilityInfo Info, TypeSymbol? Type)> _updatedNullabilities;
12410public NullabilityRewriter(ImmutableDictionary<BoundExpression, (NullabilityInfo Info, TypeSymbol? Type)> updatedNullabilities, NullableWalker.SnapshotManager? snapshotManager, ImmutableDictionary<Symbol, Symbol>.Builder remappedSymbols)
12443if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
12458if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
12475if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
12489if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
12501if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
12513if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
12525if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
12537if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
12549if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
12561if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
12573if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
12585if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
12597if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
12609if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
12624if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
12642if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
12660if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
12674if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
12686if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
12699TypeSymbol? constrainedToTypeOpt = GetUpdatedSymbol(node, node.ConstrainedToTypeOpt);
12704if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
12719TypeSymbol? constrainedToTypeOpt = GetUpdatedSymbol(node, node.ConstrainedToTypeOpt);
12728if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
12745if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
12762if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
12777TypeSymbol? constrainedToTypeOpt = GetUpdatedSymbol(node, node.ConstrainedToTypeOpt);
12780if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
12797if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
12815if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
12833if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
12851if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
12868if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
12885if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
12903if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
12922if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
12940if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
12958if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
12976if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
12996if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
13014if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
13033if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
13047TypeSymbol? naturalTypeOpt = GetUpdatedSymbol(node, node.NaturalTypeOpt);
13053if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
13071if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
13088if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
13105if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
13134if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
13152if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
13177if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
13195if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
13213if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
13227if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
13239if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
13251if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
13263if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
13275if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
13287if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
13299if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
13311if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
13327if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
13345if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
13359if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
13374if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
13392if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
13412if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
13429if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
13446if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
13464if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
13478if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
13493if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
13507TypeSymbol elementPointerType = GetUpdatedSymbol(node, node.ElementPointerType);
13514if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
13638TypeSymbol? exceptionTypeOpt = GetUpdatedSymbol(node, node.ExceptionTypeOpt);
13648if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
13660if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
13672if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
13684if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
13696if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
13708if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
13723if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
13740if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
13758if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
13775if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
13789if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
13815if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
13829TypeSymbol? naturalTypeOpt = GetUpdatedSymbol(node, node.NaturalTypeOpt);
13835if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
13877TypeSymbol indexerType = GetUpdatedSymbol(node, node.IndexerType);
13888TypeSymbol sliceType = GetUpdatedSymbol(node, node.SliceType);
13910if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
13929if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
13948if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
13965if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
13984if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
14002if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
14022if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
14036if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
14052if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
14072if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
14090if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
14110if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
14129if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
14148if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
14165if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
14185if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
14202if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
14225if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
14239if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
14254if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
14272if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
14291if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
14308if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
14326if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
14341TypeSymbol receiverType = GetUpdatedSymbol(node, node.ReceiverType);
14345if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
14359TypeSymbol receiverType = GetUpdatedSymbol(node, node.ReceiverType);
14362if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
14380if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
14399if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
14418if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
14432if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
14449if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
14466if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
14483if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
14501if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
14519if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
14536if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
14550TypeSymbol elementType = GetUpdatedSymbol(node, node.ElementType);
14555if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
14569TypeSymbol elementType = GetUpdatedSymbol(node, node.ElementType);
14574if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
14592if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
14609if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
14627if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
14645if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
14665if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
14683if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
14702if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
14721if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
14738if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
14759if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
14776if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
14793if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
14810if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
14824if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
14836if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
14853if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
14872if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
14886TypeSymbol inputType = GetUpdatedSymbol(node, node.InputType);
14887TypeSymbol narrowedType = GetUpdatedSymbol(node, node.NarrowedType);
14894TypeSymbol inputType = GetUpdatedSymbol(node, node.InputType);
14895TypeSymbol narrowedType = GetUpdatedSymbol(node, node.NarrowedType);
14902TypeSymbol inputType = GetUpdatedSymbol(node, node.InputType);
14903TypeSymbol narrowedType = GetUpdatedSymbol(node, node.NarrowedType);
14913TypeSymbol inputType = GetUpdatedSymbol(node, node.InputType);
14914TypeSymbol narrowedType = GetUpdatedSymbol(node, node.NarrowedType);
14925TypeSymbol inputType = GetUpdatedSymbol(node, node.InputType);
14926TypeSymbol narrowedType = GetUpdatedSymbol(node, node.NarrowedType);
14938TypeSymbol inputType = GetUpdatedSymbol(node, node.InputType);
14939TypeSymbol narrowedType = GetUpdatedSymbol(node, node.NarrowedType);
14951TypeSymbol inputType = GetUpdatedSymbol(node, node.InputType);
14952TypeSymbol narrowedType = GetUpdatedSymbol(node, node.NarrowedType);
14973TypeSymbol inputType = GetUpdatedSymbol(node, node.InputType);
14974TypeSymbol narrowedType = GetUpdatedSymbol(node, node.NarrowedType);
14981TypeSymbol inputType = GetUpdatedSymbol(node, node.InputType);
14982TypeSymbol narrowedType = GetUpdatedSymbol(node, node.NarrowedType);
14990TypeSymbol inputType = GetUpdatedSymbol(node, node.InputType);
14991TypeSymbol narrowedType = GetUpdatedSymbol(node, node.NarrowedType);
14998TypeSymbol inputType = GetUpdatedSymbol(node, node.InputType);
14999TypeSymbol narrowedType = GetUpdatedSymbol(node, node.NarrowedType);
15006if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
15021if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
15039if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
15057if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
15074if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
15100if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
15119if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
Lowering\ClosureConversion\ClosureConversion.cs (14)
247Debug.Assert(thisParameter is null || TypeSymbol.Equals(thisParameter.Type, thisType, TypeCompareKind.ConsiderEverything2));
585Debug.Assert(TypeSymbol.Equals(result.Type, frameType, TypeCompareKind.ConsiderEverything2));
602if ((object)_currentFrameThis != null && TypeSymbol.Equals(_currentFrameThis.Type, frameClass, TypeCompareKind.ConsiderEverything2))
615if (TypeSymbol.Equals(potentialParameter.Type.OriginalDefinition, frameClass, TypeCompareKind.ConsiderEverything2))
682Debug.Assert(TypeSymbol.Equals(frameType, constructor.ContainingType, TypeCompareKind.ConsiderEverything2));
854return (!_currentMethod.IsStatic && TypeSymbol.Equals(_currentMethod.ContainingType, _topLevelMethod.ContainingType, TypeCompareKind.ConsiderEverything2))
861TypeSymbol type = VisitType(node.Type);
999while (!TypeSymbol.Equals(oldTypeArg.Type, newTypeArg.Type, TypeCompareKind.ConsiderEverything));
1080var type = VisitType(node.Type);
1150var newType = this.VisitType(node.Type);
1278var exceptionTypeOpt = this.VisitType(node.ExceptionTypeOpt);
1628var newType = VisitType(node.Type);
1658TypeSymbol type = this.VisitType(node.Type);
1697var cacheVariableType = containerAsFrame.TypeMap.SubstituteType(node.Type).Type;
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (32)
298if (!TypeSymbol.Equals(index.Type, _int32Type, TypeCompareKind.ConsiderEverything2))
316if (!TypeSymbol.Equals(index.Type, _int32Type, TypeCompareKind.ConsiderEverything2))
487private BoundExpression VisitBinaryOperator(BinaryOperatorKind opKind, MethodSymbol methodOpt, TypeSymbol type, BoundExpression left, BoundExpression right)
510var promotedType = PromotedType(enumOperand.Type.StrippedType().GetEnumUnderlyingType());
548private BoundExpression VisitAndPromoteEnumOperand(BoundExpression operand, TypeSymbol promotedType, bool isChecked)
567private BoundExpression MakeBinary(MethodSymbol methodOpt, TypeSymbol type, bool isLifted, bool requiresLifted, WellKnownMember opFactory, BoundExpression loweredLeft, BoundExpression loweredRight)
573_bound.Literal(isLifted && !TypeSymbol.Equals(methodOpt.ReturnType, type, TypeCompareKind.ConsiderEverything2)),
579private TypeSymbol PromotedType(TypeSymbol underlying)
598private BoundExpression Demote(BoundExpression node, TypeSymbol type, bool isChecked)
608var promotedType = e.IsNullableType() ? _nullableType.Construct(PromotedType(e.GetNullableUnderlyingType())) : PromotedType(e);
609if (!TypeSymbol.Equals(promotedType, type, TypeCompareKind.ConsiderEverything2))
618private BoundExpression ConvertIndex(BoundExpression expr, TypeSymbol oldType, TypeSymbol newType)
700var operandType = node.Operand.Type;
701var strippedOperandType = operandType.StrippedType();
702var conversionInputType = method.Parameters[0].Type;
703var isLifted = !TypeSymbol.Equals(operandType, conversionInputType, TypeCompareKind.ConsiderEverything2) && TypeSymbol.Equals(strippedOperandType, conversionInputType, TypeCompareKind.ConsiderEverything2);
705!TypeSymbol.Equals(strippedOperandType, ((node.ConversionKind == ConversionKind.ExplicitUserDefined) ? conversionInputType : conversionInputType.StrippedType()), TypeCompareKind.ConsiderEverything2);
706var resultType = (isLifted && method.ReturnType.IsNonNullableValueType() && node.Type.IsNullableType()) ?
733var intermediate = nullable.TypeArgumentsWithAnnotationsNoUseSiteDiagnostics[0].Type;
744private BoundExpression Convert(BoundExpression operand, TypeSymbol oldType, TypeSymbol newType, bool isChecked, bool isExplicit)
746return (TypeSymbol.Equals(oldType, newType, TypeCompareKind.ConsiderEverything2) && !isExplicit) ? operand : Convert(operand, newType, isChecked);
749private BoundExpression Convert(BoundExpression expr, TypeSymbol type, bool isChecked)
757private BoundExpression DelegateCreation(BoundExpression receiver, MethodSymbol method, TypeSymbol delegateType, bool requiresInstanceReceiver)
856ImmutableArray.Create<TypeSymbol>(underlyingDelegateType),
880TypeSymbol lambdaParamType = node.LeftPlaceholder.Type;
889private BoundExpression MakeConversionLambda(Conversion conversion, TypeSymbol fromType, TypeSymbol toType)
1188var promotedType = PromotedType(arg.Type.StrippedType().GetEnumUnderlyingType());
Lowering\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\Instrumentation\LocalStateTracingInstrumenter.cs (10)
128private readonly TypeSymbol _contextType;
132TypeSymbol contextType,
204private MethodSymbol? GetLocalOrParameterStoreLogger(TypeSymbol variableType, Symbol targetSymbol, bool? refAssignmentSourceIsLocal, SyntaxNode syntax)
249static bool hasOverriddenToString(TypeSymbol variableType)
392if (!TryGetLocalOrParameterInfo(original.Left, out var targetSymbol, out var targetType, out var targetIndex))
413private bool TryGetLocalOrParameterInfo(BoundNode node, [NotNullWhen(true)] out Symbol? symbol, [NotNullWhen(true)] out TypeSymbol? type, [NotNullWhen(true)] out BoundExpression? indexExpression)
442TypeSymbol targetType,
504ref TypeSymbol? rewrittenType,
527var targetType = targetSymbol.Type;
602if (!TryGetLocalOrParameterInfo(arguments[i], out var targetSymbol, out var targetType, out var targetIndex))
Lowering\LocalRewriter\DelegateCacheContainer.cs (13)
19private readonly Dictionary<(TypeSymbol?, TypeSymbol, MethodSymbol), FieldSymbol> _delegateFields = new(CLRSignatureComparer.Instance);
63var delegateType = boundDelegateCreation.Type;
68var constrainedToTypeOpt = ((targetMethod.IsAbstract || targetMethod.IsVirtual) && boundDelegateCreation.Argument is BoundTypeExpression typeExpression) ? typeExpression.Type : null;
75var fieldType = TypeParameters.IsEmpty ? delegateType : TypeMap.SubstituteType(delegateType).Type;
93private sealed class CLRSignatureComparer : IEqualityComparer<(TypeSymbol? constrainedToTypeOpt, TypeSymbol delegateType, MethodSymbol targetMethod)>
97public bool Equals((TypeSymbol? constrainedToTypeOpt, TypeSymbol delegateType, MethodSymbol targetMethod) x, (TypeSymbol? constrainedToTypeOpt, TypeSymbol delegateType, MethodSymbol targetMethod) y)
106public int GetHashCode((TypeSymbol? constrainedToTypeOpt, TypeSymbol delegateType, MethodSymbol targetMethod) conversion)
Lowering\LocalRewriter\LocalRewriter.cs (13)
72Debug.Assert(TypeSymbol.Equals(factory.CurrentType, (containingType ?? containingMethod.ContainingType), TypeCompareKind.ConsiderEverything2));
259TypeSymbol? type = node.Type;
581private static BoundExpression BadExpression(SyntaxNode syntax, TypeSymbol resultType, BoundExpression child)
586private static BoundExpression BadExpression(SyntaxNode syntax, TypeSymbol resultType, BoundExpression child1, BoundExpression child2)
591private static BoundExpression BadExpression(SyntaxNode syntax, TypeSymbol resultType, ImmutableArray<BoundExpression> children)
630TypeSymbol container = compilation.Assembly.GetSpecialType(type);
631TypeSymbol returnType = new ExtendedErrorTypeSymbol(compilation: compilation, name: descriptor.Name, errorInfo: null, arity: descriptor.Arity);
649TypeSymbol.Equals(node.Type, _compilation.GetWellKnownType(WellKnownType.System_Type), TypeCompareKind.AllIgnoreOptions));
654var type = this.VisitType(node.Type);
675Debug.Assert(TypeSymbol.Equals(type, getTypeFromHandle.ReturnType, TypeCompareKind.AllIgnoreOptions));
684var type = this.VisitType(node.Type);
831var indexType = VisitType(node.Indices[0].Type);
835if (TypeSymbol.Equals(
Lowering\LocalRewriter\LocalRewriter_BinaryOperator.cs (61)
73var type = node.Type;
186TypeSymbol type,
188TypeSymbol? constrainedToTypeOpt,
202TypeSymbol type,
204TypeSymbol? constrainedToTypeOpt,
544private BoundExpression RewriteLiftedBinaryOperator(SyntaxNode syntax, BinaryOperatorKind operatorKind, BoundExpression loweredLeft, BoundExpression loweredRight, TypeSymbol type, MethodSymbol? method, TypeSymbol? constrainedToTypeOpt)
608TypeSymbol? constrainedToTypeOpt,
609TypeSymbol type,
732private BoundExpression MakeTruthTestForDynamicLogicalOperator(SyntaxNode syntax, BinaryOperatorKind operatorKind, BoundExpression loweredLeft, TypeSymbol boolean, MethodSymbol? leftTruthOperator, TypeSymbol? constrainedToTypeOpt, bool negative)
769var parameterType = leftTruthOperator.Parameters[0].Type;
790TypeSymbol type,
792TypeSymbol? constrainedToTypeOpt)
803Debug.Assert(TypeSymbol.Equals(method.ReturnType, type, TypeCompareKind.ConsiderEverything2));
819TypeSymbol? constrainedToTypeOpt)
830TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean);
1015TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean);
1149TypeSymbol? constrainedToTypeOpt)
1242TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean);
1316TypeSymbol type,
1318TypeSymbol? constrainedToTypeOpt)
1356TypeSymbol type,
1358TypeSymbol? constrainedToTypeOpt)
1381TypeSymbol type)
1425TypeSymbol type,
1427TypeSymbol? constrainedToTypeOpt)
1475TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean);
1527TypeSymbol type,
1529TypeSymbol? constrainedToTypeOpt)
1632Debug.Assert(TypeSymbol.Equals(seq.Type, conditional.Type, TypeCompareKind.ConsiderEverything2));
1633Debug.Assert(TypeSymbol.Equals(conditional.Type, conditional.Consequence.Type, TypeCompareKind.ConsiderEverything2));
1634Debug.Assert(TypeSymbol.Equals(conditional.Type, conditional.Alternative.Type, TypeCompareKind.ConsiderEverything2));
1660TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean);
1852TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean);
1912private MethodSymbol UnsafeGetNullableMethod(SyntaxNode syntax, TypeSymbol nullableType, SpecialMember member)
1922internal static MethodSymbol UnsafeGetNullableMethod(SyntaxNode syntax, TypeSymbol nullableType, SpecialMember member, CSharpCompilation compilation, BindingDiagnosticBag diagnostics)
1929private bool TryGetNullableMethod(SyntaxNode syntax, TypeSymbol nullableType, SpecialMember member, out MethodSymbol result, bool isOptional = false)
1946TypeSymbol returnType)
2013private BoundExpression RewriteStringEquality(BoundBinaryOperator? oldNode, SyntaxNode syntax, BinaryOperatorKind operatorKind, BoundExpression loweredLeft, BoundExpression loweredRight, TypeSymbol type, SpecialMember member)
2026private BoundExpression RewriteDelegateOperation(SyntaxNode syntax, BinaryOperatorKind operatorKind, BoundExpression loweredLeft, BoundExpression loweredRight, TypeSymbol type, SpecialMember member)
2092TypeSymbol? exprType = rewrittenExpr.Type;
2101TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean);
2115TypeSymbol objectType = _compilation.GetSpecialType(SpecialType.System_Object);
2150TypeSymbol type,
2156TypeSymbol rightType = loweredRight.Type;
2212TypeSymbol type)
2223TypeSymbol leftType = loweredLeft.Type;
2228TypeSymbol rightType = loweredRight.Type;
2272TypeSymbol returnType,
2393TypeSymbol multiplicationResultType;
2394TypeSymbol convertedMultiplicationResultType;
2399TypeSymbol nativeIntType = _factory.SpecialType(SpecialType.System_IntPtr);
2413TypeSymbol longType = _factory.SpecialType(SpecialType.System_Int64);
2414TypeSymbol nativeIntType = _factory.SpecialType(SpecialType.System_IntPtr);
2426TypeSymbol longType = _factory.SpecialType(SpecialType.System_Int64);
2427TypeSymbol nativeIntType = _factory.SpecialType(SpecialType.System_IntPtr);
2438TypeSymbol ulongType = _factory.SpecialType(SpecialType.System_UInt64);
2439TypeSymbol nativeUIntType = _factory.SpecialType(SpecialType.System_UIntPtr);
2459return TypeSymbol.Equals(convertedMultiplicationResultType, multiplicationResultType, TypeCompareKind.ConsiderEverything2)
2468TypeSymbol returnType)
Lowering\LocalRewriter\LocalRewriter_CollectionExpression.cs (16)
41var collectionTypeKind = conversion.GetCollectionExpressionTypeKind(out var elementType, out _, out _);
190private bool ShouldUseIEnumerableBulkAddMethod(TypeSymbol spreadType, TypeSymbol targetEnumerableType, MethodSymbol? getEnumeratorMethod)
245private BoundExpression VisitArrayOrSpanCollectionExpression(BoundCollectionExpression node, CollectionExpressionTypeKind collectionTypeKind, TypeSymbol collectionType, TypeWithAnnotations elementType)
327Debug.Assert(TypeSymbol.Equals(array.Type, spanConstructor.Parameters[0].Type, TypeCompareKind.AllIgnoreOptions));
331private BoundExpression VisitCollectionInitializerCollectionExpression(BoundCollectionExpression node, TypeSymbol collectionType)
515internal static bool IsAllocatingRefStructCollectionExpression(BoundCollectionExpressionBase node, CollectionExpressionTypeKind collectionKind, TypeSymbol? elementType, CSharpCompilation compilation)
524internal static bool ShouldUseRuntimeHelpersCreateSpan(BoundCollectionExpressionBase node, TypeSymbol elementType)
664var spreadTypeOriginalDefinition = spreadExpression.Type!.OriginalDefinition;
689var spanType = CallAsSpanMethod(spreadExpression, asSpanMethod).Type!.OriginalDefinition;
698bool tryGetToArrayMethod(TypeSymbol spreadTypeOriginalDefinition, WellKnownType wellKnownType, WellKnownMember wellKnownMember, [NotNullWhen(true)] out MethodSymbol? toArrayMethod)
700if (TypeSymbol.Equals(spreadTypeOriginalDefinition, this._compilation.GetWellKnownType(wellKnownType), TypeCompareKind.AllIgnoreOptions))
792var elementType = ((ArrayTypeSymbol)arrayTemp.Type).ElementType;
855private bool TryGetSpanConversion(TypeSymbol type, bool writableOnly, out MethodSymbol? asSpanMethod)
902var type = expression.Type;
1128var elementType = ((NamedTypeSymbol)spanTemp.Type).TypeArgumentsWithAnnotationsNoUseSiteDiagnostics[0].Type;
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (62)
69var rewrittenType = VisitType(node.Type);
81var toType = node.Type;
96var byteType = ((NamedTypeSymbol)node.Type).TypeArgumentsWithAnnotationsNoUseSiteDiagnostics.Single().Type;
225var type = rewrittenNode.Type;
268TypeSymbol rewrittenType)
303TypeSymbol rewrittenType)
618var sourceType = rewrittenOperand.Type;
738private void EnsureParamCollectionAttributeExists(SyntaxNode node, TypeSymbol delegateType)
751private static bool NeedsCheckedConversionInExpressionTree(TypeSymbol? source, TypeSymbol target, bool explicitCastInCode)
760SpecialType GetUnderlyingSpecialType(TypeSymbol type) =>
789private BoundExpression MakeConversionNode(BoundExpression rewrittenOperand, TypeSymbol rewrittenType, bool @checked, bool acceptFailingConversion = false, bool markAsChecked = false)
809TypeSymbol rewrittenType,
842TypeSymbol rewrittenType,
876if (!TypeSymbol.Equals(rewrittenOperand.Type, conversion.BestUserDefinedConversionAnalysis.FromType, TypeCompareKind.ConsiderEverything2))
886if (!TypeSymbol.Equals(rewrittenOperand.Type, conversion.Method.GetParameterType(0), TypeCompareKind.ConsiderEverything2))
895TypeSymbol userDefinedConversionRewrittenType = conversion.Method.ReturnType;
915if (!TypeSymbol.Equals(userDefined.Type, conversion.BestUserDefinedConversionAnalysis.ToType, TypeCompareKind.ConsiderEverything2))
924if (!TypeSymbol.Equals(userDefined.Type, rewrittenType, TypeCompareKind.ConsiderEverything2))
1041TypeSymbol rewrittenType)
1050TypeSymbol? rewrittenOperandType = rewrittenOperand.Type;
1097TypeSymbol rewrittenType)
1101TypeSymbol rewrittenOperandType = rewrittenOperand.Type;
1106TypeSymbol typeFrom = rewrittenOperandType.StrippedType();
1107TypeSymbol typeTo = rewrittenType.StrippedType();
1108if (!TypeSymbol.Equals(typeFrom, typeTo, TypeCompareKind.ConsiderEverything2) && (typeFrom.SpecialType == SpecialType.System_Decimal || typeTo.SpecialType == SpecialType.System_Decimal))
1111TypeSymbol typeFromUnderlying = typeFrom;
1112TypeSymbol typeToUnderlying = typeTo;
1148TypeSymbol type)
1209TypeSymbol type)
1242TypeSymbol type)
1282TypeSymbol type)
1313Debug.Assert(TypeSymbol.Equals(seq.Type, conditional.Type, TypeCompareKind.ConsiderEverything2));
1314Debug.Assert(TypeSymbol.Equals(conditional.Type, conditional.Consequence.Type, TypeCompareKind.ConsiderEverything2));
1315Debug.Assert(TypeSymbol.Equals(conditional.Type, conditional.Alternative.Type, TypeCompareKind.ConsiderEverything2));
1344TypeSymbol rewrittenType)
1350var parameterType = conversion.Method.GetParameterType(0);
1377Debug.Assert(TypeSymbol.Equals(result.Type, rewrittenType, TypeCompareKind.ConsiderEverything2));
1381private BoundExpression MakeLiftedUserDefinedConversionConsequence(BoundCall call, TypeSymbol resultType)
1385Debug.Assert(resultType.IsNullableType() && TypeSymbol.Equals(resultType.GetNullableUnderlyingType(), call.Method.ReturnType, TypeCompareKind.ConsiderEverything2));
1398TypeSymbol rewrittenType)
1488TypeSymbol rewrittenType)
1495TypeSymbol source = rewrittenOperand.Type;
1496TypeSymbol target = rewrittenType;
1537public static SpecialMember GetIntPtrConversionMethod(TypeSymbol source, TypeSymbol target)
1542TypeSymbol t0 = target.StrippedType();
1543TypeSymbol s0 = source.StrippedType();
1653private static SpecialMember DecimalConversionMethod(TypeSymbol typeFrom, TypeSymbol typeTo)
1697private BoundExpression RewriteDecimalConversion(SyntaxNode syntax, BoundExpression operand, TypeSymbol fromType, TypeSymbol toType, bool @checked, bool isImplicit, ConstantValue? constantValueOpt)
1725static TypeSymbol get64BitType(CSharpCompilation compilation, bool signed) => compilation.GetSpecialType(signed ? SpecialType.System_Int64 : SpecialType.System_UInt64);
1728private BoundExpression RewriteDecimalConversionCore(SyntaxNode syntax, BoundExpression operand, TypeSymbol fromType, TypeSymbol toType, bool isImplicit, ConstantValue? constantValueOpt)
1746Debug.Assert(TypeSymbol.Equals(method.ReturnType, toType, TypeCompareKind.ConsiderEverything2));
1754private Conversion TryMakeConversion(SyntaxNode syntax, Conversion conversion, TypeSymbol fromType, TypeSymbol toType, bool @checked)
1855private Conversion TryMakeConversion(SyntaxNode syntax, TypeSymbol fromType, TypeSymbol toType, bool @checked)
1866private Conversion TryMakeUserDefinedConversion(SyntaxNode syntax, MethodSymbol meth, TypeSymbol fromType, TypeSymbol toType, bool @checked, bool isImplicit)
Lowering\LocalRewriter\LocalRewriter_ForEachStatement.cs (17)
43TypeSymbol? nodeExpressionType = collectionExpression.Type;
71private bool CanRewriteForEachAsFor(SyntaxNode forEachSyntax, TypeSymbol nodeExpressionType, [NotNullWhen(true)] out MethodSymbol? indexerGet, [NotNullWhen(true)] out MethodSymbol? lengthGet)
76internal static bool CanRewriteForEachAsFor(CSharpCompilation compilation, SyntaxNode forEachSyntax, TypeSymbol nodeExpressionType, [NotNullWhen(true)] out MethodSymbol? indexerGet, [NotNullWhen(true)] out MethodSymbol? lengthGet, BindingDiagnosticBag diagnostics)
79var origDefinition = nodeExpressionType.OriginalDefinition;
158TypeSymbol enumeratorType = getEnumeratorInfo.Method.ReturnType;
315TypeSymbol enumeratorType,
481TypeSymbol awaitExpressionType = disposeAwaitableInfoOpt.GetResult?.ReturnType ?? _compilation.DynamicType;
499private BoundExpression ConvertReceiverForInvocation(CSharpSyntaxNode syntax, BoundExpression receiver, MethodSymbol method, Conversion receiverConversion, TypeSymbol convertedReceiverType)
603TypeSymbol intType = _compilation.GetSpecialType(SpecialType.System_Int32);
604TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean);
775TypeSymbol inlineArrayType = boundArrayVar.Type;
904TypeSymbol intType = _compilation.GetSpecialType(SpecialType.System_Int32);
905TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean);
1054TypeSymbol intType = _compilation.GetSpecialType(SpecialType.System_Int32);
1055TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean);
1223private static BoundLocal MakeBoundLocal(CSharpSyntaxNode syntax, LocalSymbol local, TypeSymbol type)
1243private BoundStatement MakePositionIncrement(CSharpSyntaxNode syntax, BoundLocal boundPositionVar, TypeSymbol intType)
Lowering\LocalRewriter\LocalRewriter_ObjectOrCollectionInitializerExpression.cs (7)
226var rewrittenType = VisitType(initializer.Type);
400Debug.Assert(assignment.Type.IsDynamic() || TypeSymbol.Equals(rewrittenAccess.Type, assignment.Type, TypeCompareKind.AllIgnoreOptions));
454Debug.Assert(TypeSymbol.Equals(rangeArgument.Type, _compilation.GetWellKnownType(WellKnownType.System_Range), TypeCompareKind.ConsiderEverything));
472Debug.Assert(TypeSymbol.Equals(rewrittenAccess.Type, assignment.Type, TypeCompareKind.AllIgnoreOptions));
505Debug.Assert(TypeSymbol.Equals(rewrittenAccess.Type, assignment.Type, TypeCompareKind.AllIgnoreOptions));
517if (TypeSymbol.Equals(implicitIndexer.Argument.Type, _compilation.GetWellKnownType(WellKnownType.System_Index), TypeCompareKind.ConsiderEverything))
539Debug.Assert(TypeSymbol.Equals(rewrittenAccess.Type, assignment.Type, TypeCompareKind.AllIgnoreOptions));
Lowering\LocalRewriter\LocalRewriter_TupleBinaryOperator.cs (6)
30var boolType = node.Type; // we can re-use the bool type
69var elementType = resultTypes[i].Type;
246BoundExpression left, BoundExpression right, TypeSymbol boolType,
267TypeSymbol boolType, ArrayBuilder<LocalSymbol> temps, BinaryOperatorKind operatorKind)
485BoundExpression left, BoundExpression right, TypeSymbol type,
542BoundExpression left, BoundExpression right, TypeSymbol boolType, BinaryOperatorKind operatorKind)
Lowering\LocalRewriter\LocalRewriter_UnaryOperator.cs (27)
67TypeSymbol? constrainedToTypeOpt,
69TypeSymbol type)
79TypeSymbol? constrainedToTypeOpt,
81TypeSymbol type)
114Debug.Assert(TypeSymbol.Equals(type, method.ReturnType, TypeCompareKind.ConsiderEverything2));
183TypeSymbol? constrainedToTypeOpt,
185TypeSymbol type)
247TypeSymbol? constrainedToTypeOpt,
249TypeSymbol type)
328Debug.Assert(TypeSymbol.Equals(seq.Type, conditional.Type, TypeCompareKind.ConsiderEverything2));
329Debug.Assert(TypeSymbol.Equals(conditional.Type, conditional.Consequence.Type, TypeCompareKind.ConsiderEverything2));
330Debug.Assert(TypeSymbol.Equals(conditional.Type, conditional.Alternative.Type, TypeCompareKind.ConsiderEverything2));
354private BoundExpression GetLiftedUnaryOperatorConsequence(UnaryOperatorKind kind, SyntaxNode syntax, MethodSymbol? method, TypeSymbol? constrainedToTypeOpt, TypeSymbol type, BoundExpression nonNullOperand)
421TypeSymbol? operandType = node.Operand.Type; //type of the variable being incremented
423Debug.Assert(TypeSymbol.Equals(operandType, node.Type, TypeCompareKind.AllIgnoreOptions));
458TypeSymbol? operandType = left.Type; //type of the variable being incremented
467Debug.Assert(TypeSymbol.Equals(operandType, transformedLHS.Type, TypeCompareKind.AllIgnoreOptions));
586TypeSymbol? operandType = transformedLHS.Type; //type of the variable being incremented
588Debug.Assert(TypeSymbol.Equals(operandType, node.Type, TypeCompareKind.ConsiderEverything2));
799TypeSymbol type = node.MethodOpt.GetParameterType(0);
803Debug.Assert(TypeSymbol.Equals(node.MethodOpt.GetParameterType(0), node.MethodOpt.ReturnType, TypeCompareKind.ConsiderEverything2));
889TypeSymbol unaryOperandType = GetUnaryOperatorType(node);
898(TypeSymbol binaryOperandType, ConstantValue constantOne) = GetConstantOneForIncrement(_compilation, binaryOperatorKind);
1056private TypeSymbol GetUnaryOperatorType(BoundIncrementOperator node)
1177TypeSymbol? underlyingType = node.Type;
1243private static (TypeSymbol, ConstantValue) GetConstantOneForIncrement(
Lowering\StateMachineRewriter\RefInitializationHoister.cs (5)
44/// <param name="createHoistedSymbol">Factory that creates a new hoisted symbol for a sub-expression value of a given <see cref="TypeSymbol"/>.</param>
62Func<TypeSymbol, TArg, LocalSymbol, THoistedSymbol> createHoistedSymbol,
96var type = _typeMap.SubstituteType(local.Type).Type;
98Debug.Assert(TypeSymbol.Equals(type, replacement.Type, TypeCompareKind.ConsiderEverything2));
141Func<TypeSymbol, TArg, LocalSymbol, THoistedSymbol> createHoistedSymbol,
Lowering\StateMachineRewriter\StateMachineFieldSymbol.cs (2)
38public StateMachineFieldSymbol(NamedTypeSymbol stateMachineType, TypeSymbol type, string name, SynthesizedLocalKind synthesizedKind, int slotIndex, bool isPublic)
43public StateMachineFieldSymbol(NamedTypeSymbol stateMachineType, TypeSymbol type, string name, LocalSlotDebugInfo slotDebugInfo, int slotIndex, bool isPublic) :
Lowering\SyntheticBoundNodeFactory.cs (51)
134Debug.Assert(TopLevelMethod is null || TypeSymbol.Equals(TopLevelMethod.ContainingType, CurrentType, TypeCompareKind.ConsiderEverything2));
143TypeSymbol.Equals(CurrentFunction.ContainingType, CurrentType, TypeCompareKind.ConsiderEverything2));
178public StateMachineFieldSymbol StateMachineField(TypeSymbol type, string name, bool isPublic = false, bool isThis = false)
186public StateMachineFieldSymbol StateMachineFieldForRegularParameter(TypeSymbol type, string name, ParameterSymbol parameter, bool isPublic)
194public StateMachineFieldSymbol StateMachineField(TypeSymbol type, string name, SynthesizedLocalKind synthesizedKind, int slotIndex)
202public StateMachineFieldSymbol StateMachineField(TypeSymbol type, string name, LocalSlotDebugInfo slotDebugInfo, int slotIndex)
239public BoundBadExpression BadExpression(TypeSymbol type)
595TypeSymbol type,
617TypeSymbol type,
637public ParameterSymbol SynthesizedParameter(TypeSymbol type, string name, MethodSymbol? container = null, int ordinal = 0)
642public BoundBinaryOperator Binary(BinaryOperatorKind kind, TypeSymbol type, BoundExpression left, BoundExpression right)
647public BoundAsOperator As(BoundExpression operand, TypeSymbol type)
652public BoundIsOperator Is(BoundExpression operand, TypeSymbol type)
739public BoundLiteral Literal(ConstantValue value, TypeSymbol type)
798public BoundExpression StaticCall(TypeSymbol receiver, MethodSymbol method, params BoundExpression[] args)
819public BoundExpression StaticCall(WellKnownMember method, ImmutableArray<TypeSymbol> typeArgs, params BoundExpression[] args)
912public BoundExpression Conditional(BoundExpression condition, BoundExpression consequence, BoundExpression alternative, TypeSymbol type, bool isRef = false)
920Debug.Assert(TypeSymbol.Equals(valueTypeReceiver.Type, referenceTypeReceiver.Type, TypeCompareKind.ConsiderEverything2));
1035public BoundSequence Sequence(BoundExpression[] sideEffects, BoundExpression result, TypeSymbol? type = null)
1038var resultType = type ?? result.Type;
1230public BoundExpression ThrowExpression(BoundExpression thrown, TypeSymbol type)
1235public BoundExpression Null(TypeSymbol type)
1247public static BoundExpression Null(TypeSymbol type, SyntaxNode syntax)
1256public BoundTypeExpression Type(TypeSymbol type)
1261public BoundExpression Typeof(WellKnownType type, TypeSymbol systemType)
1266public BoundExpression Typeof(TypeSymbol type, TypeSymbol systemType)
1282Debug.Assert(TypeSymbol.Equals(systemType, getTypeFromHandle.ReturnType, TypeCompareKind.AllIgnoreOptions));
1292public BoundExpression Typeof(TypeWithAnnotations type, TypeSymbol systemType)
1297public ImmutableArray<BoundExpression> TypeOfs(ImmutableArray<TypeWithAnnotations> typeArguments, TypeSymbol systemType)
1308public BoundExpression Sizeof(TypeSymbol type)
1382public BoundExpression InstrumentationPayloadRoot(int analysisKind, TypeSymbol payloadType)
1413public BoundExpression MethodInfo(MethodSymbol method, TypeSymbol systemReflectionMethodInfo)
1448private MethodSymbol GetMethodFromHandleMethod(NamedTypeSymbol methodContainer, TypeSymbol systemReflectionMethodOrConstructorInfo)
1480public BoundExpression Convert(TypeSymbol type, BoundExpression arg, bool allowBoxingByRefLikeTypeParametersToObject = false)
1484if (TypeSymbol.Equals(type, arg.Type, TypeCompareKind.ConsiderEverything2))
1510public BoundExpression Convert(TypeSymbol type, BoundExpression arg, Conversion conversion, bool isChecked = false)
1514if (conversion.Method is { } && !TypeSymbol.Equals(conversion.Method.Parameters[0].Type, arg.Type, TypeCompareKind.ConsiderEverything2))
1537public BoundExpression ArrayOrEmpty(TypeSymbol elementType, BoundExpression[] elements)
1549public BoundExpression ArrayOrEmpty(TypeSymbol elementType, ImmutableArray<BoundExpression> elements)
1564public BoundExpression Array(TypeSymbol elementType, ImmutableArray<BoundExpression> elements)
1573public BoundExpression Array(TypeSymbol elementType, BoundExpression length)
1583internal BoundExpression Default(TypeSymbol type)
1588internal static BoundExpression Default(TypeSymbol type, SyntaxNode syntax)
1628internal BoundExpression NullOrDefault(TypeSymbol typeSymbol)
1633internal static BoundExpression NullOrDefault(TypeSymbol typeSymbol, SyntaxNode syntax)
1694var type = argument.Type;
1764TypeSymbol exprType = rewrittenExpr.Type;
1773TypeSymbol boolType = Compilation.GetSpecialType(CodeAnalysis.SpecialType.System_Boolean);
1787TypeSymbol objectType = SpecialType(CodeAnalysis.SpecialType.System_Object);
1826TypeSymbol returnType)
Operations\CSharpOperationFactory.cs (11)
764return CreateBoundDynamicMemberAccessOperation(implicitReceiver, typeArgumentsOpt: ImmutableArray<TypeSymbol>.Empty, memberName: "Add",
951ImmutableArray<TypeSymbol> typeArgumentsOpt,
1082if (boundOperand.Kind == BoundKind.ConvertedTupleLiteral && TypeSymbol.Equals(boundOperand.Type, boundConversion.Type, TypeCompareKind.ConsiderEverything2))
1103!TypeSymbol.Equals(nestedConversion.Type, nestedOperand.Type, TypeCompareKind.ConsiderEverything2))
1374private static TypeParameterSymbol? GetConstrainedToTypeForOperator(MethodSymbol? operatorMethod, TypeSymbol? constrainedToTypeOpt)
1497TypeSymbol? constrainedToTypeOpt = GetConstrainedToTypeForOperator(boundBinaryOperator.LogicalOperator, boundBinaryOperator.ConstrainedToTypeOpt) ??
2242TypeSymbol? naturalType = boundTupleExpression switch
2520TypeSymbol inputType = boundConstantPattern.InputType;
2521TypeSymbol narrowedType = boundConstantPattern.NarrowedType;
2531TypeSymbol inputType = boundRelationalPattern.InputType;
2532TypeSymbol narrowedType = boundRelationalPattern.NarrowedType;
Symbols\Attributes\AttributeData.cs (7)
250internal static void DecodeMemberNotNullAttribute<T>(TypeSymbol type, ref DecodeWellKnownAttributeArguments<AttributeSyntax, CSharpAttributeData, AttributeLocation> arguments)
286private static void ReportBadNotNullMemberIfNeeded(TypeSymbol type, DecodeWellKnownAttributeArguments<AttributeSyntax, CSharpAttributeData, AttributeLocation> arguments, string memberName)
300internal static void DecodeMemberNotNullWhenAttribute<T>(TypeSymbol type, ref DecodeWellKnownAttributeArguments<AttributeSyntax, CSharpAttributeData, AttributeLocation> arguments)
367var firstArgType = (TypeSymbol?)firstArg.TypeInternal;
642var builderType = (TypeSymbol?)CommonConstructorArguments[0].ValueInternal;
Symbols\Compilation_WellKnownMembers.cs (49)
183TypeSymbol.Equals(result, _lazyWellKnownTypes[index], TypeCompareKind.ConsiderEverything2) || (_lazyWellKnownTypes[index]!.IsErrorType() && result.IsErrorType())
197internal bool IsAttributeType(TypeSymbol type)
208internal bool IsExceptionType(TypeSymbol type, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
213internal bool IsReadOnlySpanType(TypeSymbol type)
215return TypeSymbol.Equals(type.OriginalDefinition, GetWellKnownType(WellKnownType.System_ReadOnlySpan_T), TypeCompareKind.ConsiderEverything2);
218internal bool IsEqualOrDerivedFromWellKnownClass(TypeSymbol type, WellKnownType wellKnownType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
234return TypeSymbol.Equals((TypeSymbol)type, GetWellKnownType(WellKnownType.System_Type), TypeCompareKind.ConsiderEverything2);
247internal static Symbol? GetRuntimeMember(NamedTypeSymbol declaringType, in MemberDescriptor descriptor, SignatureComparer<MethodSymbol, FieldSymbol, PropertySymbol, TypeSymbol, ParameterSymbol> comparer, AssemblySymbol? accessWithinOpt)
253internal static Symbol? GetRuntimeMember(ImmutableArray<Symbol> members, in MemberDescriptor descriptor, SignatureComparer<MethodSymbol, FieldSymbol, PropertySymbol, TypeSymbol, ParameterSymbol> comparer, AssemblySymbol? accessWithinOpt)
714TypeSymbol debuggableAttribute = GetWellKnownType(WellKnownType.System_Diagnostics_DebuggableAttribute);
721TypeSymbol debuggingModesType = GetWellKnownType(WellKnownType.System_Diagnostics_DebuggableAttribute__DebuggingModes);
789internal SynthesizedAttributeData? SynthesizeDynamicAttribute(TypeSymbol type, int customModifiersCount, RefKind refKindOpt = RefKind.None)
809internal SynthesizedAttributeData? SynthesizeTupleNamesAttribute(TypeSymbol type)
839public static ImmutableArray<string?> Encode(TypeSymbol type)
852public static ImmutableArray<TypedConstant> Encode(TypeSymbol type, TypeSymbol stringType)
868internal static bool TryGetNames(TypeSymbol type, ArrayBuilder<string?> namesBuilder)
874private static bool AddNames(TypeSymbol type, ArrayBuilder<string?> namesBuilder)
903internal static ImmutableArray<TypedConstant> Encode(TypeSymbol type, RefKind refKind, int customModifiersCount, TypeSymbol booleanType)
915internal static ImmutableArray<bool> Encode(TypeSymbol type, RefKind refKind, int customModifiersCount)
922internal static ImmutableArray<bool> EncodeWithoutCustomModifierFlags(TypeSymbol type, RefKind refKind)
929internal static void Encode(TypeSymbol type, int customModifiersCount, RefKind refKind, ArrayBuilder<bool> transformFlagsBuilder, bool addCustomModifierFlags)
951private static bool AddFlags(TypeSymbol type, ArrayBuilder<bool> transformFlagsBuilder, bool isNestedNamedType, bool addCustomModifierFlags)
1010Func<TypeSymbol, (ArrayBuilder<bool>, bool), bool, bool> visitor =
1011(TypeSymbol type, (ArrayBuilder<bool> builder, bool addCustomModifierFlags) param, bool isNestedNamedType) => AddFlags(type, param.builder, isNestedNamedType, param.addCustomModifierFlags);
1055internal static void Encode(ArrayBuilder<bool> builder, TypeSymbol type)
1061private static bool AddFlags(TypeSymbol type, ArrayBuilder<bool> builder)
1075internal class SpecialMembersSignatureComparer : SignatureComparer<MethodSymbol, FieldSymbol, PropertySymbol, TypeSymbol, ParameterSymbol>
1085protected override TypeSymbol? GetMDArrayElementType(TypeSymbol type)
1099protected override TypeSymbol GetFieldType(FieldSymbol field)
1104protected override TypeSymbol GetPropertyType(PropertySymbol property)
1109protected override TypeSymbol? GetGenericTypeArgument(TypeSymbol type, int argumentIndex)
1127protected override TypeSymbol? GetGenericTypeDefinition(TypeSymbol type)
1155protected override TypeSymbol GetParamType(ParameterSymbol parameter)
1160protected override TypeSymbol? GetPointedToType(TypeSymbol type)
1165protected override TypeSymbol GetReturnType(MethodSymbol method)
1170protected override TypeSymbol? GetSZArrayElementType(TypeSymbol type)
1199protected override bool IsGenericMethodTypeParam(TypeSymbol type, int paramPosition)
1213protected override bool IsGenericTypeParam(TypeSymbol type, int paramPosition)
1227protected override bool MatchArrayRank(TypeSymbol type, int countOfDimensions)
1238protected override bool MatchTypeToTypeId(TypeSymbol type, int typeId)
1263protected override bool MatchTypeToTypeId(TypeSymbol type, int typeId)
Symbols\ConstraintsHelper.cs (20)
144TypeSymbol deducedBaseType = effectiveBaseClass;
164TypeSymbol constraintDeducedBase;
241var underlyingType = constraintType.Type.GetNullableUnderlyingType();
469var deducedBase = bounds.DeducedBaseType;
489this TypeSymbol type,
502this TypeSymbol type,
519public static void CheckAllConstraints(this TypeSymbol type, CheckConstraintsArgsBoxed args)
585private static readonly Func<TypeSymbol, CheckConstraintsArgsBoxed, bool, bool> s_checkConstraintsSingleTypeFunc = (type, arg, unused) => CheckConstraintsSingleType(type, in arg.Args);
587private static bool CheckConstraintsSingleType(TypeSymbol type, in CheckConstraintsArgs args)
681ConsList<TypeSymbol> basesBeingResolved)
760private static bool HasDuplicateInterfaces(NamedTypeSymbol type, ConsList<TypeSymbol> basesBeingResolved)
1230var type = typeWithAnnotations.Type;
1273var type = typeWithAnnotations.Type;
1451private static TypeParameterDiagnosticInfo GenerateConflictingConstraintsError(TypeParameterSymbol typeParameter, TypeSymbol deducedBase, bool classConflict)
1481private static ConstructorConstraintError SatisfiesConstructorConstraint(TypeSymbol typeArgument)
1552private static bool IsEncompassedBy(ConversionsBase conversions, TypeSymbol a, TypeSymbol b, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
1563private static bool IsValidEncompassedByArgument(TypeSymbol type)
1624private static void CheckEffectiveAndDeducedBaseTypes(ConversionsBase conversions, TypeSymbol effectiveBase, TypeSymbol deducedBase)
Symbols\FunctionPointers\FunctionPointerMethodSymbol.cs (9)
23public static FunctionPointerMethodSymbol CreateFromSource(FunctionPointerTypeSyntax syntax, Binder typeBinder, BindingDiagnosticBag diagnostics, ConsList<TypeSymbol> basesBeingResolved, bool suppressUseSiteDiagnostics)
330public static FunctionPointerMethodSymbol CreateFromMetadata(ModuleSymbol containingModule, CallingConvention callingConvention, ImmutableArray<ParamInfo<TypeSymbol>> retAndParamTypes)
543private FunctionPointerMethodSymbol(CallingConvention callingConvention, ImmutableArray<ParamInfo<TypeSymbol>> retAndParamTypes, bool useUpdatedEscapeRules)
547ParamInfo<TypeSymbol> retInfo = retAndParamTypes[0];
558static ImmutableArray<FunctionPointerParameterSymbol> makeParametersFromMetadata(ReadOnlySpan<ParamInfo<TypeSymbol>> parameterTypes, FunctionPointerMethodSymbol parent)
566ParamInfo<TypeSymbol> param = parameterTypes[i];
581static RefKind getRefKind(ParamInfo<TypeSymbol> param, ImmutableArray<CustomModifier> paramRefCustomMods, RefKind hasInRefKind, RefKind hasOutRefKind, bool requiresLocationAllowed)
800internal bool GetUnificationUseSiteDiagnosticRecursive(ref DiagnosticInfo? result, Symbol owner, ref HashSet<TypeSymbol> checkedTypes)
864internal sealed override bool HasAsyncMethodBuilderAttribute(out TypeSymbol? builderArgument)
Symbols\FunctionPointers\FunctionPointerTypeSymbol.cs (9)
19public static FunctionPointerTypeSymbol CreateFromSource(FunctionPointerTypeSyntax syntax, Binder typeBinder, BindingDiagnosticBag diagnostics, ConsList<TypeSymbol> basesBeingResolved, bool suppressUseSiteDiagnostics)
56public static FunctionPointerTypeSymbol CreateFromMetadata(ModuleSymbol containingModule, Cci.CallingConvention callingConvention, ImmutableArray<ParamInfo<TypeSymbol>> retAndParamTypes)
98internal override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol>? basesBeingResolved = null) => ImmutableArray<NamedTypeSymbol>.Empty;
100internal override bool Equals(TypeSymbol t2, TypeCompareKind compareKind)
136internal override bool ApplyNullableTransforms(byte defaultTransformFlag, ImmutableArray<byte> transforms, ref int position, out TypeSymbol result)
156internal override bool GetUnificationUseSiteDiagnosticRecursive(ref DiagnosticInfo? result, Symbol owner, ref HashSet<TypeSymbol> checkedTypes)
161internal override TypeSymbol MergeEquivalentTypes(TypeSymbol other, VarianceKind variance)
173internal override TypeSymbol SetNullabilityForReferenceTypes(Func<TypeWithAnnotations, TypeWithAnnotations> transform)
Symbols\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\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\PEParameterSymbol.cs (7)
196ParamInfo<TypeSymbol> parameterInfo,
224ParamInfo<TypeSymbol> parameterInfo,
308var typeSymbol = DynamicTypeDecoder.TransformType(typeWithAnnotations.Type, countOfCustomModifiers, handle, moduleSymbol, refKind);
381ImmutableArray<ModifierInfo<TypeSymbol>> refCustomModifiers,
382TypeSymbol type,
385ImmutableArray<ModifierInfo<TypeSymbol>> customModifiers,
427ImmutableArray<ModifierInfo<TypeSymbol>> refCustomModifiers,
Symbols\Metadata\PE\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\NamedTypeSymbol.cs (19)
909internal abstract NamedTypeSymbol GetDeclaredBaseType(ConsList<TypeSymbol> basesBeingResolved);
911internal abstract ImmutableArray<NamedTypeSymbol> GetDeclaredInterfaces(ConsList<TypeSymbol> basesBeingResolved);
930internal override bool Equals(TypeSymbol t2, TypeCompareKind comparison)
1066internal override bool ApplyNullableTransforms(byte defaultTransformFlag, ImmutableArray<byte> transforms, ref int position, out TypeSymbol result)
1100internal override TypeSymbol SetNullabilityForReferenceTypes(Func<TypeWithAnnotations, TypeWithAnnotations> transform)
1134internal override TypeSymbol MergeEquivalentTypes(TypeSymbol other, VarianceKind variance)
1246public NamedTypeSymbol Construct(params TypeSymbol[] typeArguments)
1257public NamedTypeSymbol Construct(ImmutableArray<TypeSymbol> typeArguments)
1267public NamedTypeSymbol Construct(IEnumerable<TypeSymbol> typeArguments)
1296internal abstract bool HasAsyncMethodBuilderAttribute(out TypeSymbol builderArgument);
1309private NamedTypeSymbol ConstructWithoutModifiers(ImmutableArray<TypeSymbol> typeArguments, bool unbound)
1408internal void GetAllTypeArguments(ref TemporaryArray<TypeSymbol> builder, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
1477protected sealed override TypeSymbol OriginalTypeSymbolDefinition
1557HashSet<TypeSymbol> unificationCheckedTypes = null;
1584internal override bool GetUnificationUseSiteDiagnosticRecursive(ref DiagnosticInfo result, Symbol owner, ref HashSet<TypeSymbol> checkedTypes)
1759internal abstract bool HasCollectionBuilderAttribute(out TypeSymbol? builderType, out string? methodName);
1763/// Requires less computation than <see cref="TypeSymbol.TypeKind"/> == <see cref="TypeKind.Interface"/>.
1797TypeSymbol typeToCheck = this;
Symbols\Retargeting\RetargetingSymbolTranslator.cs (18)
171return marshallingInfo?.WithTranslatedTypes<TypeSymbol, RetargetingSymbolTranslator>(
175public TypeSymbol Retarget(TypeSymbol symbol, RetargetOptions options)
177return (TypeSymbol)symbol.Accept(this, options);
182var newTypeSymbol = Retarget(underlyingType.Type, options);
192if (modifiersHaveChanged || !TypeSymbol.Equals(underlyingType.Type, newTypeSymbol, TypeCompareKind.ConsiderEverything2))
406TypeSymbol? cached;
475Debug.Assert(TypeSymbol.Equals(result1, result, TypeCompareKind.ConsiderEverything2));
643private bool IsOrClosedOverAnExplicitLocalType(TypeSymbol symbol)
848public ImmutableArray<TypeSymbol> Retarget(ImmutableArray<TypeSymbol> sequence)
1119if (TypeSymbol.Equals(retargetedEvent.Type, targetType.Type, TypeCompareKind.ConsiderEverything2))
1223TypeSymbol oldConstantType = (TypeSymbol)oldConstant.TypeInternal;
1224TypeSymbol newConstantType = (object)oldConstantType == null ?
1231if (!TypeSymbol.Equals(newConstantType, oldConstantType, TypeCompareKind.ConsiderEverything2) || newArray != oldConstant.Values)
1246newConstantValue = Retarget((TypeSymbol)oldConstantValue, RetargetOptions.RetargetPrimitiveTypesByTypeCode);
1253if (!TypeSymbol.Equals(newConstantType, oldConstantType, TypeCompareKind.ConsiderEverything2) || newConstantValue != oldConstantValue)
Symbols\Source\SourceNamedTypeSymbol_Bases.cs (12)
66internal sealed override ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol> basesBeingResolved)
226var curBaseSym = baseBinder.BindType(b, BindingDiagnosticBag.Discarded).Type;
255internal Tuple<NamedTypeSymbol, ImmutableArray<NamedTypeSymbol>> GetDeclaredBases(ConsList<TypeSymbol> basesBeingResolved)
270internal override NamedTypeSymbol GetDeclaredBaseType(ConsList<TypeSymbol> basesBeingResolved)
275internal override ImmutableArray<NamedTypeSymbol> GetDeclaredInterfaces(ConsList<TypeSymbol> basesBeingResolved)
280private Tuple<NamedTypeSymbol, ImmutableArray<NamedTypeSymbol>> MakeDeclaredBases(ConsList<TypeSymbol> basesBeingResolved, BindingDiagnosticBag diagnostics)
319else if ((object)partBase != null && !TypeSymbol.Equals(partBase, baseType, TypeCompareKind.ConsiderEverything) && partBase.TypeKind != TypeKind.Error)
347static bool containsOnlyOblivious(TypeSymbol type)
438private Tuple<NamedTypeSymbol, ImmutableArray<NamedTypeSymbol>> MakeOneDeclaredBases(ConsList<TypeSymbol> newBasesBeingResolved, SingleTypeDeclaration decl, BindingDiagnosticBag diagnostics)
467TypeSymbol baseType;
630void checkPrimaryConstructorBaseType(BaseTypeSyntax baseTypeSyntax, TypeSymbol baseType)
658private ImmutableArray<NamedTypeSymbol> MakeAcyclicInterfaces(ConsList<TypeSymbol> basesBeingResolved, BindingDiagnosticBag diagnostics)
Symbols\Source\SourceNamedTypeSymbol_Extension.cs (6)
157static void AppendClrType(TypeSymbol type, ImmutableArray<CustomModifier> modifiers, StringBuilder builder)
193static void appendNamedType(TypeSymbol type, StringBuilder builder, NamedTypeSymbol namedType)
464static void appendType(TypeSymbol type, StringBuilder builder)
903AppendClrType((TypeSymbol)argument.ValueInternal, modifiers: [], builder);
1171internal static Symbol? GetCompatibleSubstitutedMember(CSharpCompilation compilation, Symbol extensionMember, TypeSymbol receiverType)
1207static NamedTypeSymbol? inferExtensionTypeArguments(NamedTypeSymbol extension, TypeSymbol receiverType, CSharpCompilation compilation)
Symbols\Source\SourceNamespaceSymbol.AliasesAndUsings.cs (21)
21public Imports GetImports(CSharpSyntaxNode declarationSyntax, ConsList<TypeSymbol>? basesBeingResolved)
143public ImmutableArray<AliasAndUsingDirective> GetUsingAliases(CSharpSyntaxNode declarationSyntax, ConsList<TypeSymbol>? basesBeingResolved)
174public ImmutableDictionary<string, AliasAndUsingDirective> GetUsingAliasesMap(CSharpSyntaxNode declarationSyntax, ConsList<TypeSymbol>? basesBeingResolved)
206public ImmutableArray<NamespaceOrTypeAndUsingDirective> GetUsingNamespacesOrTypes(CSharpSyntaxNode declarationSyntax, ConsList<TypeSymbol>? basesBeingResolved)
238private Imports GetGlobalUsingImports(ConsList<TypeSymbol>? basesBeingResolved)
243private ImmutableDictionary<string, AliasAndUsingDirective> GetGlobalUsingAliasesMap(ConsList<TypeSymbol>? basesBeingResolved)
248private ImmutableArray<NamespaceOrTypeAndUsingDirective> GetGlobalUsingNamespacesOrTypes(ConsList<TypeSymbol>? basesBeingResolved)
253private MergedGlobalAliasesAndUsings GetMergedGlobalAliasesAndUsings(ConsList<TypeSymbol>? basesBeingResolved, CancellationToken cancellationToken = default)
510internal ImmutableArray<AliasAndUsingDirective> GetUsingAliases(SourceNamespaceSymbol declaringSymbol, CSharpSyntaxNode declarationSyntax, ConsList<TypeSymbol>? basesBeingResolved)
515internal ImmutableArray<AliasAndUsingDirective> GetGlobalUsingAliases(SourceNamespaceSymbol declaringSymbol, CSharpSyntaxNode declarationSyntax, ConsList<TypeSymbol>? basesBeingResolved)
520internal ImmutableDictionary<string, AliasAndUsingDirective> GetUsingAliasesMap(SourceNamespaceSymbol declaringSymbol, CSharpSyntaxNode declarationSyntax, ConsList<TypeSymbol>? basesBeingResolved)
525internal ImmutableDictionary<string, AliasAndUsingDirective> GetGlobalUsingAliasesMap(SourceNamespaceSymbol declaringSymbol, SyntaxReference declarationSyntax, ConsList<TypeSymbol>? basesBeingResolved)
530internal ImmutableArray<NamespaceOrTypeAndUsingDirective> GetUsingNamespacesOrTypes(SourceNamespaceSymbol declaringSymbol, CSharpSyntaxNode declarationSyntax, ConsList<TypeSymbol>? basesBeingResolved)
535private UsingsAndDiagnostics GetUsingsAndDiagnostics(SourceNamespaceSymbol declaringSymbol, CSharpSyntaxNode declarationSyntax, ConsList<TypeSymbol>? basesBeingResolved)
540internal ImmutableArray<NamespaceOrTypeAndUsingDirective> GetGlobalUsingNamespacesOrTypes(SourceNamespaceSymbol declaringSymbol, SyntaxReference declarationSyntax, ConsList<TypeSymbol>? basesBeingResolved)
545private UsingsAndDiagnostics GetGlobalUsingsAndDiagnostics(SourceNamespaceSymbol declaringSymbol, CSharpSyntaxNode declarationSyntax, ConsList<TypeSymbol>? basesBeingResolved)
550private UsingsAndDiagnostics GetUsingsAndDiagnostics(ref UsingsAndDiagnostics? usings, SourceNamespaceSymbol declaringSymbol, CSharpSyntaxNode declarationSyntax, ConsList<TypeSymbol>? basesBeingResolved, bool onlyGlobal)
620ConsList<TypeSymbol>? basesBeingResolved)
898internal Imports GetImports(SourceNamespaceSymbol declaringSymbol, CSharpSyntaxNode declarationSyntax, ConsList<TypeSymbol>? basesBeingResolved)
1019var typeSymbol = (TypeSymbol)target;
Symbols\Symbol.cs (7)
1209internal bool DeriveUseSiteInfoFromType(ref UseSiteInfo<AssemblySymbol> result, TypeSymbol type)
1341internal static bool GetUnificationUseSiteDiagnosticRecursive<T>(ref DiagnosticInfo result, ImmutableArray<T> types, Symbol owner, ref HashSet<TypeSymbol> checkedTypes) where T : TypeSymbol
1354internal static bool GetUnificationUseSiteDiagnosticRecursive(ref DiagnosticInfo result, ImmutableArray<TypeWithAnnotations> types, Symbol owner, ref HashSet<TypeSymbol> checkedTypes)
1367internal static bool GetUnificationUseSiteDiagnosticRecursive(ref DiagnosticInfo result, ImmutableArray<CustomModifier> modifiers, Symbol owner, ref HashSet<TypeSymbol> checkedTypes)
1380internal static bool GetUnificationUseSiteDiagnosticRecursive(ref DiagnosticInfo result, ImmutableArray<ParameterSymbol> parameters, Symbol owner, ref HashSet<TypeSymbol> checkedTypes)
1394internal static bool GetUnificationUseSiteDiagnosticRecursive(ref DiagnosticInfo result, ImmutableArray<TypeParameterSymbol> typeParameters, Symbol owner, ref HashSet<TypeSymbol> checkedTypes)
Symbols\SymbolExtensions.cs (13)
87public static bool IsNoMoreVisibleThan(this Symbol symbol, TypeSymbol type, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
219public static bool IsContainingSymbolOfAllTypeParameters(this Symbol containingSymbol, TypeSymbol type)
228public static bool IsContainingSymbolOfAllTypeParameters(this Symbol containingSymbol, ImmutableArray<TypeSymbol> types)
233private static readonly Func<TypeSymbol, Symbol, bool, bool> s_hasInvalidTypeParameterFunc =
236private static bool HasInvalidTypeParameter(TypeSymbol type, Symbol? containingSymbol)
268Debug.Assert(!(symbol is TypeSymbol));
407internal static TypeSymbol? EnsureCSharpSymbolOrNull(this ITypeSymbol? symbol, string paramName)
409return (TypeSymbol?)EnsureCSharpSymbolOrNull((ISymbol?)symbol, paramName);
517returnType = TypeWithAnnotations.Create((TypeSymbol)symbol);
580internal static ITypeSymbol? GetPublicSymbol(this TypeSymbol? symbol)
701internal static ImmutableArray<ITypeSymbol> GetPublicSymbols(this ImmutableArray<TypeSymbol> symbols)
765internal static TypeSymbol? GetSymbol(this ITypeSymbol? symbol)
767return symbol.GetSymbol<TypeSymbol>();
Symbols\Synthesized\SynthesizedIntrinsicOperatorSymbol.cs (12)
18private readonly TypeSymbol _containingType;
21private readonly TypeSymbol _returnType;
23public SynthesizedIntrinsicOperatorSymbol(TypeSymbol leftType, string name, TypeSymbol rightType, TypeSymbol returnType)
49public SynthesizedIntrinsicOperatorSymbol(TypeSymbol container, string name, TypeSymbol returnType)
442TypeSymbol.Equals(_containingType, other._containingType, compareKind) &&
443TypeSymbol.Equals(_returnType, other._returnType, compareKind))
447if (!TypeSymbol.Equals(_parameters[i].Type, other._parameters[i].Type, compareKind))
468TypeSymbol type,
520internal sealed override bool HasAsyncMethodBuilderAttribute(out TypeSymbol builderArgument)
Symbols\TypeSymbol.cs (53)
51/// <see cref="TypeSymbol.InterfacesAndTheirBaseInterfacesNoUseSiteDiagnostics"/>
106for (var baseType = this; !ReferenceEquals(baseType, null); baseType = baseType.BaseTypeNoUseSiteDiagnostics)
130public new TypeSymbol OriginalDefinition
138protected virtual TypeSymbol OriginalTypeSymbolDefinition
191internal abstract ImmutableArray<NamedTypeSymbol> InterfacesNoUseSiteDiagnostics(ConsList<TypeSymbol> basesBeingResolved = null);
216var current = this;
235internal TypeSymbol EffectiveTypeNoUseSiteDiagnostics
243internal TypeSymbol EffectiveType(ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
251internal bool IsDerivedFrom(TypeSymbol type, TypeCompareKind comparison, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
278internal bool IsEqualToOrDerivedFrom(TypeSymbol type, TypeCompareKind comparison, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
293internal virtual bool Equals(TypeSymbol t2, TypeCompareKind compareKind)
300var t2 = other as TypeSymbol;
342for (var baseType = this; !ReferenceEquals(baseType, null); baseType = baseType.BaseTypeNoUseSiteDiagnostics)
531internal abstract bool GetUnificationUseSiteDiagnosticRecursive(ref DiagnosticInfo result, Symbol owner, ref HashSet<TypeSymbol> checkedTypes);
633internal abstract bool ApplyNullableTransforms(byte defaultTransformFlag, ImmutableArray<byte> transforms, ref int position, out TypeSymbol result);
635internal abstract TypeSymbol SetNullabilityForReferenceTypes(Func<TypeWithAnnotations, TypeWithAnnotations> transform);
637internal TypeSymbol SetUnknownNullabilityForReferenceTypes()
651internal abstract TypeSymbol MergeEquivalentTypes(TypeSymbol other, VarianceKind variance);
802private static Symbol ComputeImplementationForInterfaceMember(Symbol interfaceMember, TypeSymbol implementingType, BindingDiagnosticBag diagnostics,
833TypeSymbol implementingBaseOpt = null; // Calculated only if canBeImplementedImplicitly == false
838for (TypeSymbol currType = implementingType; (object)currType != null; currType = currType.BaseTypeWithDefinitionUseSiteDiagnostics(ref useSiteInfo))
1054private static Symbol FindMostSpecificImplementationInInterfaces(Symbol interfaceMember, TypeSymbol implementingType,
1087static bool stopLookup(MethodSymbol interfaceAccessor, TypeSymbol implementingType)
1150TypeSymbol implementingType,
1463private static bool IsExplicitlyImplementedViaAccessors(bool checkPendingExplicitImplementations, Symbol interfaceMember, TypeSymbol currType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, out Symbol implementingMember)
1500private static bool TryGetExplicitImplementationAssociatedPropertyOrEvent(bool checkPendingExplicitImplementations, MethodSymbol interfaceAccessor, TypeSymbol currType, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, out Symbol associated)
1544private static void CheckForImplementationOfCorrespondingPropertyOrEvent(MethodSymbol interfaceMethod, TypeSymbol implementingType, bool implementingTypeIsFromSomeCompilation,
1596else if ((object)correspondingImplementingAccessor != null && ((object)implicitImpl == null || TypeSymbol.Equals(correspondingImplementingAccessor.ContainingType, implicitImpl.ContainingType, TypeCompareKind.ConsiderEverything2)))
1627private static void ReportDefaultInterfaceImplementationMatchDiagnostics(Symbol interfaceMember, TypeSymbol implementingType, Symbol implicitImpl, BindingDiagnosticBag diagnostics)
1675private static void ReportImplicitImplementationMatchDiagnostics(Symbol interfaceMember, TypeSymbol implementingType, Symbol implicitImpl, BindingDiagnosticBag diagnostics)
1770internal static void CheckModifierMismatchOnImplementingMember(TypeSymbol implementingType, Symbol implementingMember, Symbol interfaceMember, bool isExplicit, BindingDiagnosticBag diagnostics)
1801TypeSymbol implementingType,
1807ReportMismatchInReturnType<(TypeSymbol implementingType, bool isExplicit)> reportMismatchInReturnType =
1830ReportMismatchInParameterType<(TypeSymbol implementingType, bool isExplicit)> reportMismatchInParameterType =
1987private static void ReportImplicitImplementationMismatchDiagnostics(Symbol interfaceMember, TypeSymbol implementingType, Symbol closestMismatch, BindingDiagnosticBag diagnostics)
2009TypeSymbol interfaceMemberReturnType;
2082private static Location GetInterfaceLocation(Symbol interfaceMember, TypeSymbol implementingType)
2096private static bool ReportAnyMismatchedConstraints(MethodSymbol interfaceMethod, TypeSymbol implementingType, MethodSymbol implicitImpl, BindingDiagnosticBag diagnostics)
2142internal static Location GetImplicitImplementationDiagnosticLocation(Symbol interfaceMember, TypeSymbol implementingType, Symbol member)
2144if (TypeSymbol.Equals(member.ContainingType, implementingType, TypeCompareKind.ConsiderEverything2))
2174TypeSymbol currType,
2458public static bool Equals(TypeSymbol? left, TypeSymbol? right, TypeCompareKind comparison)
2470public static bool operator ==(TypeSymbol left, TypeSymbol right)
2474public static bool operator !=(TypeSymbol left, TypeSymbol right)
2478public static bool operator ==(Symbol left, TypeSymbol right)
2482public static bool operator !=(Symbol left, TypeSymbol right)
2486public static bool operator ==(TypeSymbol left, Symbol right)
2490public static bool operator !=(TypeSymbol left, Symbol right)
Symbols\TypeSymbolExtensions.cs (170)
27public static bool ImplementsInterface(this TypeSymbol subType, TypeSymbol superInterface, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
31if (@interface.IsInterface && TypeSymbol.Equals(@interface, superInterface, TypeCompareKind.ConsiderEverything2))
39public static bool CanBeAssignedNull(this TypeSymbol type)
44public static bool CanContainNull(this TypeSymbol type)
50public static bool CanBeConst(this TypeSymbol typeSymbol)
70public static bool IsTypeParameterDisallowingAnnotationInCSharp8(this TypeSymbol type)
91public static bool IsPossiblyNullableReferenceTypeTypeParameter(this TypeSymbol type)
96public static bool IsNonNullableValueType(this TypeSymbol typeArgument)
106public static bool IsVoidType(this TypeSymbol type)
111public static bool IsNullableTypeOrTypeParameter(this TypeSymbol? type)
140public static bool IsNullableType(this TypeSymbol type)
145public static bool IsValidNullableTypeArgument(this TypeSymbol type)
153public static TypeSymbol GetNullableUnderlyingType(this TypeSymbol type)
158public static bool IsNullableType(this TypeSymbol? type, [NotNullWhen(true)] out TypeSymbol? underlyingType)
171public static TypeWithAnnotations GetNullableUnderlyingTypeWithAnnotations(this TypeSymbol type)
180public static TypeSymbol StrippedType(this TypeSymbol type)
185public static TypeSymbol EnumUnderlyingTypeOrSelf(this TypeSymbol type)
190public static bool IsNativeIntegerOrNullableThereof(this TypeSymbol? type)
195public static bool IsObjectType(this TypeSymbol type)
200public static bool IsStringType(this TypeSymbol type)
205public static bool IsCharType(this TypeSymbol type)
210public static bool IsIntegralType(this TypeSymbol type)
215public static NamedTypeSymbol? GetEnumUnderlyingType(this TypeSymbol? type)
220public static bool IsEnumType(this TypeSymbol type)
226public static bool IsValidEnumType(this TypeSymbol type)
239public static bool IsValidAttributeParameterType(this TypeSymbol type, CSharpCompilation compilation)
250public static TypedConstantKind GetAttributeParameterTypedConstantKind(this TypeSymbol type, CSharpCompilation compilation)
314public static bool IsValidExtensionParameterType(this TypeSymbol type)
327public static bool IsInterfaceType(this TypeSymbol type)
333public static bool IsClassType(this TypeSymbol type)
339public static bool IsStructType(this TypeSymbol type)
345public static bool IsErrorType(this TypeSymbol type)
356public static bool IsDynamic(this TypeSymbol type)
361public static bool IsTypeParameter(this TypeSymbol type)
367public static bool IsArray(this TypeSymbol type)
373public static bool IsSZArray(this TypeSymbol type)
379internal static bool IsArrayInterface(this TypeSymbol type, out TypeWithAnnotations typeArgument)
399public static bool IsFunctionPointer(this TypeSymbol type)
404public static bool IsPointerOrFunctionPointer(this TypeSymbol type)
417internal static ImmutableArray<NamedTypeSymbol> GetAllInterfacesOrEffectiveInterfaces(this TypeSymbol type)
438public static NamedTypeSymbol? GetDelegateType(this TypeSymbol? type)
449public static TypeSymbol? GetDelegateOrFunctionPointerType(this TypeSymbol? type)
451return (TypeSymbol?)GetDelegateType(type) ?? type as FunctionPointerTypeSymbol;
458public static bool IsExpressionTree(this TypeSymbol type)
467public static bool IsNonGenericExpressionType(this TypeSymbol type)
477public static bool IsGenericOrNonGenericExpressionType(this TypeSymbol _type, out bool isGenericType)
517public static bool IsPossibleArrayGenericInterface(this TypeSymbol type)
540internal static bool IsErrorOrRefLikeOrAllowsRefLikeType(this TypeSymbol type)
545internal static bool IsRefLikeOrAllowsRefLikeType(this TypeSymbol type)
568public static bool IsDelegateType(this TypeSymbol type)
574public static ImmutableArray<ParameterSymbol> DelegateParameters(this TypeSymbol type)
584public static ImmutableArray<ParameterSymbol> DelegateOrFunctionPointerParameters(this TypeSymbol type)
597public static bool TryGetElementTypesWithAnnotationsIfTupleType(this TypeSymbol type, out ImmutableArray<TypeWithAnnotations> elementTypes)
610public static MethodSymbol? DelegateInvokeMethod(this TypeSymbol type)
621public static ConstantValue? GetDefaultValue(this TypeSymbol type)
669public static SpecialType GetSpecialTypeSafe(this TypeSymbol? type)
674public static bool IsAtLeastAsVisibleAs(this TypeSymbol type, Symbol sym, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
683var result = type.VisitType(static (type1, arg, unused) => IsTypeLessVisibleThan(type1, arg.Symbol!, ref arg.UseSiteInfo),
698private static bool IsTypeLessVisibleThan(TypeSymbol type, Symbol sym, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
722public static TypeSymbol? VisitType<T>(
723this TypeSymbol type,
724Func<TypeSymbol, T, bool, bool> predicate,
750public static TypeSymbol? VisitType<T>(
752TypeSymbol? type,
754Func<TypeSymbol, T, bool, bool>? typePredicate,
771TypeSymbol current = type ?? (useDefaultType ? typeWithAnnotationsOpt.DefaultType : typeWithAnnotationsOpt.Type);
787var result = VisitType(default, containingType, typeWithAnnotationsPredicate, typePredicate, arg, canDigThroughNullable, useDefaultType, visitCustomModifiers);
820var result = VisitType(
871(TypeWithAnnotations nextTypeWithAnnotations, TypeSymbol? nextType) = getNextIterationElements(fields[i].TypeWithAnnotations, canDigThroughNullable);
872var result = VisitType(
902(TypeWithAnnotations nextTypeWithAnnotations, TypeSymbol? nextType) = getNextIterationElements(typeArguments[i], canDigThroughNullable);
903var result = VisitType(
933var result = visitFunctionPointerType((FunctionPointerTypeSymbol)current, typeWithAnnotationsPredicate, typePredicate, arg, useDefaultType, canDigThroughNullable, visitCustomModifiers, out next);
951static (TypeWithAnnotations, TypeSymbol?) getNextIterationElements(TypeWithAnnotations type, bool canDigThroughNullable)
954static 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)
963var result = VisitType(
981(TypeWithAnnotations nextTypeWithAnnotations, TypeSymbol? nextType) = getNextIterationElements(currentPointer.Parameters[i].TypeWithAnnotations, canDigThroughNullable);
1183public static bool IsUnboundGenericType(this TypeSymbol type)
1199public static bool ContainsTypeParameter(this TypeSymbol type, TypeParameterSymbol? parameter = null)
1201var result = type.VisitType(s_containsTypeParameterPredicate, parameter);
1205private static readonly Func<TypeSymbol, TypeParameterSymbol?, bool, bool> s_containsTypeParameterPredicate =
1206(type, parameter, unused) => type.TypeKind == TypeKind.TypeParameter && (parameter is null || TypeSymbol.Equals(type, parameter, TypeCompareKind.ConsiderEverything2));
1208public static bool ContainsTypeParameter(this TypeSymbol type, Symbol typeParameterContainer)
1212var result = type.VisitType(s_isTypeParameterWithSpecificContainerPredicate, typeParameterContainer);
1216private static readonly Func<TypeSymbol, Symbol, bool, bool> s_isTypeParameterWithSpecificContainerPredicate =
1219public static bool ContainsTypeParameters(this TypeSymbol type, HashSet<TypeParameterSymbol> parameters)
1221var result = type.VisitType(s_containsTypeParametersPredicate, parameters);
1225private static readonly Func<TypeSymbol, HashSet<TypeParameterSymbol>, bool, bool> s_containsTypeParametersPredicate =
1228public static bool ContainsMethodTypeParameter(this TypeSymbol type)
1230var result = type.VisitType(s_containsMethodTypeParameterPredicate, null);
1234private static readonly Func<TypeSymbol, object?, bool, bool> s_containsMethodTypeParameterPredicate =
1240public static bool ContainsDynamic(this TypeSymbol type)
1242var result = type.VisitType(s_containsDynamicPredicate, null, canDigThroughNullable: true);
1246private static readonly Func<TypeSymbol, object?, bool, bool> s_containsDynamicPredicate = (type, unused1, unused2) => type.TypeKind == TypeKind.Dynamic;
1248internal static bool ContainsNativeIntegerWrapperType(this TypeSymbol type)
1250var result = type.VisitType((type, unused1, unused2) => type.IsNativeIntegerWrapperType, (object?)null, canDigThroughNullable: true);
1259internal static bool ContainsErrorType(this TypeSymbol type)
1261var result = type.VisitType((type, unused1, unused2) => type.IsErrorType(), (object?)null, canDigThroughNullable: true);
1268internal static bool ContainsTuple(this TypeSymbol type) =>
1269type.VisitType((TypeSymbol t, object? _1, bool _2) => t.IsTupleType, null) is object;
1274internal static bool ContainsTupleNames(this TypeSymbol type) =>
1275type.VisitType((TypeSymbol t, object? _1, bool _2) => !t.TupleElementNames.IsDefault, null) is object;
1280internal static bool ContainsFunctionPointer(this TypeSymbol type) =>
1281type.VisitType((TypeSymbol t, object? _, bool _) => t.IsFunctionPointer(), null) is object;
1283internal static bool ContainsPointerOrFunctionPointer(this TypeSymbol type) =>
1284type.VisitType((TypeSymbol t, object? _, bool _) => t.TypeKind is TypeKind.Pointer or TypeKind.FunctionPointer, null) is object;
1301internal static TypeSymbol? GetNonErrorGuess(this TypeSymbol type)
1303var result = ExtendedErrorTypeSymbol.ExtractNonErrorType(type);
1312internal static TypeKind GetNonErrorTypeKindGuess(this TypeSymbol type)
1322internal static bool IsValidV6SwitchGoverningType(this TypeSymbol type, bool isTargetTypeOfUserDefinedOp = false)
1367internal static bool IsSpan(this TypeSymbol type)
1380internal static bool IsReadOnlySpan(this TypeSymbol type)
1393internal static bool IsSpanChar(this TypeSymbol type)
1404internal static bool IsReadOnlySpanChar(this TypeSymbol type)
1415internal static bool IsSpanOrReadOnlySpanChar(this TypeSymbol type)
1433internal static bool IsRestrictedType(this TypeSymbol type,
1449public static bool IsIntrinsicType(this TypeSymbol type)
1476public static bool IsPartial(this TypeSymbol type)
1481public static bool HasFileLocalTypes(this TypeSymbol type)
1483var foundType = type.VisitType(predicate: (type, _, _) => type is NamedTypeSymbol { IsFileLocal: true }, arg: (object?)null);
1496public static bool IsPointerType(this TypeSymbol type)
1501internal static int FixedBufferElementSizeInBytes(this TypeSymbol type)
1507internal static bool IsValidVolatileFieldType(this TypeSymbol type)
1541public static bool MarkCheckedIfNecessary(this TypeSymbol type, ref HashSet<TypeSymbol> checkedTypes)
1545checkedTypes = new HashSet<TypeSymbol>();
1551internal static bool IsVoidPointer(this TypeSymbol type)
1560internal static bool IsPrimitiveRecursiveStruct(this TypeSymbol t)
1644public static TypeSymbol AsDynamicIfNoPia(this TypeSymbol type, NamedTypeSymbol containingType)
1646return type.TryAsDynamicIfNoPia(containingType, out TypeSymbol? result) ? result : type;
1649public static bool TryAsDynamicIfNoPia(this TypeSymbol type, NamedTypeSymbol containingType, [NotNullWhen(true)] out TypeSymbol? result)
1669internal static bool IsVerifierReference(this TypeSymbol type)
1677internal static bool IsVerifierValue(this TypeSymbol type)
1829internal static bool IsNonGenericTaskType(this TypeSymbol type, CSharpCompilation compilation)
1847internal static bool IsGenericTaskType(this TypeSymbol type, CSharpCompilation compilation)
1860internal static bool IsIAsyncEnumerableType(this TypeSymbol type, CSharpCompilation compilation)
1870internal static bool IsIAsyncEnumeratorType(this TypeSymbol type, CSharpCompilation compilation)
1890internal static bool IsCustomTaskType(this NamedTypeSymbol type, [NotNullWhen(true)] out TypeSymbol? builderArgument)
1907internal static TypeSymbol NormalizeTaskTypes(this TypeSymbol type, CSharpCompilation compilation)
1916private static bool NormalizeTaskTypesInType(CSharpCompilation compilation, ref TypeSymbol type)
1955var type = typeWithAnnotations.Type;
1977var typeArgNormalized = typeWithModifier.Type;
2120internal static bool IsWellKnownTypeInAttribute(this TypeSymbol typeSymbol)
2123internal static bool IsWellKnownTypeRequiresLocationAttribute(this TypeSymbol typeSymbol)
2126internal static bool IsWellKnownTypeUnmanagedType(this TypeSymbol typeSymbol)
2129internal static bool IsWellKnownTypeIsExternalInit(this TypeSymbol typeSymbol)
2132internal static bool IsWellKnownTypeOutAttribute(this TypeSymbol typeSymbol) => typeSymbol.IsWellKnownInteropServicesTopLevelType("OutAttribute");
2135internal static bool IsWellKnownTypeLock(this TypeSymbol typeSymbol)
2141internal static bool IsMicrosoftCodeAnalysisEmbeddedAttribute(this TypeSymbol typeSymbol)
2152private static bool IsWellKnownInteropServicesTopLevelType(this TypeSymbol typeSymbol, string name)
2162private static bool IsWellKnownCompilerServicesTopLevelType(this TypeSymbol typeSymbol, string name)
2172internal static bool IsCompilerServicesTopLevelType(this TypeSymbol typeSymbol)
2175internal static bool IsWellKnownSetsRequiredMembersAttribute(this TypeSymbol type)
2178internal static bool IsWellKnownINumberBaseType(this TypeSymbol type)
2185internal static bool IsWellKnownDiagnosticsCodeAnalysisTopLevelType(this TypeSymbol typeSymbol)
2188private static bool IsContainedInNamespace(this TypeSymbol typeSymbol, string outerNS, string midNS, string? innerNS = null)
2221internal static int TypeToIndex(this TypeSymbol type)
2246TypeSymbol underlyingType = type.GetNullableUnderlyingType();
2275internal static bool IsDisplayClassType(this TypeSymbol type)
Symbols\TypeUnification.cs (9)
18public static bool CanUnify(TypeSymbol t1, TypeSymbol t2)
20if (TypeSymbol.Equals(t1, t2, TypeCompareKind.CLRSignatureCompareOptions))
57private static bool CanUnifyHelper(TypeSymbol t1, TypeSymbol t2, ref MutableTypeMap? substitution)
92if (TypeSymbol.Equals(t1.Type, t2.Type, TypeCompareKind.CLRSignatureCompareOptions) && t1.CustomModifiers.SequenceEqual(t2.CustomModifiers))
160if (nt2.Arity != arity || !TypeSymbol.Equals(nt2.OriginalDefinition, nt1.OriginalDefinition, TypeCompareKind.ConsiderEverything))
265private static bool Contains(TypeSymbol type, TypeParameterSymbol typeParam)
293return TypeSymbol.Equals(type, typeParam, TypeCompareKind.ConsiderEverything);
Symbols\TypeWithAnnotations.cs (90)
40internal readonly TypeSymbol DefaultType;
53private TypeWithAnnotations(TypeSymbol defaultType, NullableAnnotation defaultAnnotation, Extensions extensions)
75internal static TypeWithAnnotations Create(bool isNullableEnabled, TypeSymbol typeSymbol, bool isAnnotated = false)
85internal static TypeWithAnnotations Create(TypeSymbol typeSymbol, NullableAnnotation nullableAnnotation = NullableAnnotation.Oblivious, ImmutableArray<CustomModifier> customModifiers = default)
168private static TypeWithAnnotations CreateNonLazyType(TypeSymbol typeSymbol, NullableAnnotation nullableAnnotation, ImmutableArray<CustomModifier> customModifiers)
178private static TypeWithAnnotations CreateLazySubstitutedType(TypeSymbol substitutedTypeSymbol, ImmutableArray<CustomModifier> customModifiers, TypeParameterSymbol typeParameter)
198var typeSymbol = this.Type;
243TypeSymbol typeSymbol = other.Type;
245TypeSymbol type = Type.MergeEquivalentTypes(typeSymbol, variance);
254public TypeSymbol Type => _extensions?.GetResolvedType(DefaultType);
256public TypeSymbol NullableUnderlyingTypeOrSelf => _extensions.GetNullableUnderlyingTypeOrSelf(DefaultType);
377TypeSymbol type = Type;
424public bool GetUnificationUseSiteDiagnosticRecursive(ref DiagnosticInfo result, Symbol owner, ref HashSet<TypeSymbol> checkedTypes)
445TypeSymbol typeSymbol = this.Type;
556public TypeSymbol AsTypeSymbolOnly() => _extensions.AsTypeSymbolOnly(DefaultType);
567public TypeWithAnnotations WithTypeAndModifiers(TypeSymbol typeSymbol, ImmutableArray<CustomModifier> customModifiers) =>
570public TypeWithAnnotations WithType(TypeSymbol typeSymbol) =>
591TypeSymbol typeOpt)
593var type = TypeSymbolExtensions.VisitType(
606private static bool IsNonGenericValueType(TypeSymbol type)
629var type = typeWithAnnotations.Type;
665TypeSymbol oldTypeSymbol = Type;
687TypeSymbol newTypeSymbol;
726var typeSymbol = Type;
737var typeSymbol = Type;
738var newTypeSymbol = typeSymbol.SetUnknownNullabilityForReferenceTypes();
813static NullableFlowState getFlowState(TypeSymbol type, NullableAnnotation annotation)
852internal abstract TypeSymbol GetResolvedType(TypeSymbol defaultType);
861internal abstract TypeSymbol GetNullableUnderlyingTypeOrSelf(TypeSymbol typeSymbol);
863internal abstract TypeSymbol AsTypeSymbolOnly(TypeSymbol typeSymbol);
865internal abstract SpecialType GetSpecialType(TypeSymbol typeSymbol);
866internal abstract bool IsRestrictedType(TypeSymbol typeSymbol, bool ignoreSpanLikeTypes);
867internal abstract bool IsStatic(TypeSymbol typeSymbol);
868internal abstract bool IsVoid(TypeSymbol typeSymbol);
869internal abstract bool IsSZArray(TypeSymbol typeSymbol);
870internal abstract bool IsRefLikeType(TypeSymbol typeSymbol);
871internal abstract bool IsRefLikeOrAllowsRefLikeType(TypeSymbol typeSymbol);
873internal abstract TypeWithAnnotations WithTypeAndModifiers(TypeWithAnnotations type, TypeSymbol typeSymbol, ImmutableArray<CustomModifier> customModifiers);
893internal override TypeSymbol GetResolvedType(TypeSymbol defaultType) => defaultType;
897internal override SpecialType GetSpecialType(TypeSymbol typeSymbol) => typeSymbol.SpecialType;
898internal override bool IsRestrictedType(TypeSymbol typeSymbol, bool ignoreSpanLikeTypes) => typeSymbol.IsRestrictedType(ignoreSpanLikeTypes);
899internal override bool IsStatic(TypeSymbol typeSymbol) => typeSymbol.IsStatic;
900internal override bool IsVoid(TypeSymbol typeSymbol) => typeSymbol.IsVoidType();
901internal override bool IsSZArray(TypeSymbol typeSymbol) => typeSymbol.IsSZArray();
902internal override bool IsRefLikeType(TypeSymbol typeSymbol) => typeSymbol.IsRefLikeType;
903internal override bool IsRefLikeOrAllowsRefLikeType(TypeSymbol typeSymbol) => typeSymbol.IsRefLikeOrAllowsRefLikeType();
905internal override TypeSymbol GetNullableUnderlyingTypeOrSelf(TypeSymbol typeSymbol) => typeSymbol.StrippedType();
912internal override TypeSymbol AsTypeSymbolOnly(TypeSymbol typeSymbol) => typeSymbol;
914internal override TypeWithAnnotations WithTypeAndModifiers(TypeWithAnnotations type, TypeSymbol typeSymbol, ImmutableArray<CustomModifier> customModifiers)
926var defaultType = type.DefaultType;
970internal override SpecialType GetSpecialType(TypeSymbol typeSymbol) => typeSymbol.SpecialType;
971internal override bool IsRestrictedType(TypeSymbol typeSymbol, bool ignoreSpanLikeTypes) => typeSymbol.IsRestrictedType(ignoreSpanLikeTypes);
972internal override bool IsStatic(TypeSymbol typeSymbol) => typeSymbol.IsStatic;
973internal override bool IsVoid(TypeSymbol typeSymbol) => typeSymbol.IsVoidType();
974internal override bool IsSZArray(TypeSymbol typeSymbol) => typeSymbol.IsSZArray();
975internal override bool IsRefLikeType(TypeSymbol typeSymbol) => typeSymbol.IsRefLikeType;
976internal override bool IsRefLikeOrAllowsRefLikeType(TypeSymbol typeSymbol) => typeSymbol.IsRefLikeOrAllowsRefLikeType();
1006internal override TypeSymbol GetNullableUnderlyingTypeOrSelf(TypeSymbol typeSymbol) => typeSymbol.StrippedType();
1007internal override TypeSymbol AsTypeSymbolOnly(TypeSymbol typeSymbol) => typeSymbol;
1009internal override TypeSymbol GetResolvedType(TypeSymbol defaultType) => defaultType;
1017internal override TypeWithAnnotations WithTypeAndModifiers(TypeWithAnnotations type, TypeSymbol typeSymbol, ImmutableArray<CustomModifier> customModifiers)
1029var defaultType = type.DefaultType;
1063private TypeSymbol _resolved;
1074internal override bool IsVoid(TypeSymbol typeSymbol) => false;
1075internal override bool IsSZArray(TypeSymbol typeSymbol) => false;
1076internal override bool IsRefLikeType(TypeSymbol typeSymbol) => false;
1077internal override bool IsRefLikeOrAllowsRefLikeType(TypeSymbol typeSymbol) => typeSymbol.IsRefLikeOrAllowsRefLikeType();
1078internal override bool IsStatic(TypeSymbol typeSymbol) => false;
1080private TypeSymbol GetResolvedType()
1090internal override TypeSymbol GetNullableUnderlyingTypeOrSelf(TypeSymbol typeSymbol) => _underlying.Type;
1092internal override SpecialType GetSpecialType(TypeSymbol typeSymbol)
1098internal override bool IsRestrictedType(TypeSymbol typeSymbol, bool ignoreSpanLikeTypes) => _underlying.IsRestrictedType(ignoreSpanLikeTypes);
1100internal override TypeSymbol AsTypeSymbolOnly(TypeSymbol typeSymbol)
1102var resolvedType = GetResolvedType();
1108internal override TypeSymbol GetResolvedType(TypeSymbol defaultType) => GetResolvedType();
1119var resolvedType = GetResolvedType();
1128internal override TypeWithAnnotations WithTypeAndModifiers(TypeWithAnnotations type, TypeSymbol typeSymbol, ImmutableArray<CustomModifier> customModifiers)
1202var resolved = asValueType ?