Binder\Binder.ValueChecks.cs (34)
124public ImmutableArray<ParameterSymbol> Parameters;
355internal ParameterSymbol? Parameter { get; }
364internal MixableDestination(ParameterSymbol parameter, BoundExpression argument)
400internal ParameterSymbol? Parameter { get; }
406internal EscapeArgument(ParameterSymbol? parameter, BoundExpression argument, RefKind refKind, bool isArgList = false)
414public void Deconstruct(out ParameterSymbol? parameter, out BoundExpression argument, out RefKind refKind)
436internal ParameterSymbol? Parameter { get; }
449internal EscapeValue(ParameterSymbol? parameter, BoundExpression argument, EscapeLevel escapeLevel, bool isRefEscape)
457public void Deconstruct(out ParameterSymbol? parameter, out BoundExpression argument, out EscapeLevel escapeLevel, out bool isRefEscape)
1366ParameterSymbol parameterSymbol = parameter.ParameterSymbol;
1423static void reportReadOnlyParameterError(ParameterSymbol parameterSymbol, SyntaxNode node, BindValueKind valueKind, bool checkingReceiver, BindingDiagnosticBag diagnostics)
1479private static SafeContext GetParameterValEscape(ParameterSymbol parameter)
1489private static EscapeLevel? GetParameterValEscapeLevel(ParameterSymbol parameter) =>
1492private static SafeContext GetParameterRefEscape(ParameterSymbol parameter)
1504private static EscapeLevel? GetParameterRefEscapeLevel(ParameterSymbol parameter) =>
1507private bool CheckParameterValEscape(SyntaxNode node, ParameterSymbol parameter, SafeContext escapeTo, BindingDiagnosticBag diagnostics)
1525private bool CheckParameterRefEscape(SyntaxNode node, BoundExpression parameter, ParameterSymbol parameterSymbol, SafeContext escapeTo, bool checkingReceiver, BindingDiagnosticBag diagnostics)
2376var extensionParameter = symbol.ContainingType.ExtensionParameter;
2659var parameter = argIndex < parameters.Length ?
2687static bool isMixableParameter([NotNullWhen(true)] ParameterSymbol? parameter) =>
2739ParameterSymbol? thisParameter = null;
2844ParameterSymbol? extensionReceiver = null;
2901return method?.TryGetThisParameter(out var thisParameter) == true && thisParameter is not null &&
2905static bool isRefToRefStruct(ParameterSymbol parameter)
3071private static string GetInvocationParameterName(ParameterSymbol? parameter)
3088ParameterSymbol? parameter,
3327private readonly ParameterSymbol _underlyingParameter;
3329internal TypeParameterThisParameterSymbol(ParameterSymbol underlyingParameter, TypeParameterSymbol type)
3721var thisParam = ((MethodSymbol)_symbol).ThisParameter;
4016var thisParam = ((MethodSymbol)_symbol).ThisParameter;
4328var thisParam = ((MethodSymbol)_symbol).ThisParameter;
4980var thisParam = ((MethodSymbol)_symbol).ThisParameter;
5647ImmutableArray.Create<ParameterSymbol>(new SignatureOnlyParameterSymbol(
5687ImmutableArray.Create<ParameterSymbol>(new SignatureOnlyParameterSymbol(
Binder\Binder_Expressions.cs (25)
486TryGetPrimaryConstructorParameterUsedAsValue(primaryConstructor, result) is (ParameterSymbol parameter, SyntaxNode syntax) &&
515ParameterSymbol parameter,
526ParameterSymbol parameter,
1826private ParameterSymbol GetShadowedPrimaryConstructorParameter(SimpleNameSyntax node, Symbol symbol, bool invoked, ArrayBuilder<Symbol> membersOpt)
1873if (singleSymbol is ParameterSymbol shadowedParameter &&
2075var parameter = (ParameterSymbol)symbol;
2598ParameterSymbol? thisSymbol = this.ContainingMemberOrLambda.EnclosingThisSymbol();
3544ImmutableArray<ParameterSymbol> parameters,
3600ImmutableArray<ParameterSymbol> parameters,
3633ImmutableArray<ParameterSymbol> parameters,
3716static ParameterSymbol getCorrespondingParameter(in MemberAnalysisResult result, ImmutableArray<ParameterSymbol> parameters, int arg)
3726ImmutableArray<ParameterSymbol> parameters,
3738var correspondingParameter = getCorrespondingParameter(in result, parameters, interpolatedStringArgNum);
3852var receiverParameter = ((NamedTypeSymbol)methodResult.Member.ContainingSymbol).ExtensionParameter;
3862var parameter = parameters[originalParameterIndex];
3882var parameter = parameters[originalParameterIndex];
3956private void CheckArgumentRefKind(RefKind argRefKind, BoundExpression argument, int arg, ParameterSymbol parameter,
5094var parametersPassedToBase = new OrderedSet<ParameterSymbol>();
5103if (TryGetPrimaryConstructorParameterUsedAsValue(primaryConstructor, analyzedArguments.Argument(i)) is (ParameterSymbol parameter, SyntaxNode syntax))
5107var baseParameter = GetCorrespondingParameter(i, resultMember.Parameters, argsToParamsOpt, expanded: true);
5200private static (ParameterSymbol, SyntaxNode) TryGetPrimaryConstructorParameterUsedAsValue(SynthesizedPrimaryConstructor primaryConstructor, BoundExpression boundExpression)
7607leftType = ((ParameterSymbol)leftSymbol).Type;
10120var parameter = property.Parameters[0];
Binder\Binder_Invocation.cs (17)
1269ParameterSymbol receiverParameter = method.Parameters.First();
1370private BoundExpression CheckAndConvertExtensionReceiver(BoundExpression receiver, ParameterSymbol extensionParameter, BindingDiagnosticBag diagnostics)
1427private BoundExpression GetDefaultParameterSpecialNoConversion(SyntaxNode syntax, ParameterSymbol parameter, BindingDiagnosticBag diagnostics)
1485internal static ParameterSymbol? GetCorrespondingParameter(
1487ImmutableArray<ParameterSymbol> parameters,
1492ParameterSymbol? parameter;
1530ImmutableArray<ParameterSymbol> parameters,
1546var parameter = GetCorrespondingParameter(i, parameters, argsToParamsOpt, expanded);
1607foreach (var parameter in parameters.AsSpan()[..lastIndex])
1663BoundExpression bindDefaultArgument(SyntaxNode syntax, ParameterSymbol parameter, Symbol? containingMember, bool enableCallerInfo, BindingDiagnosticBag diagnostics,
1834private BoundExpression CreateParamsCollection(SyntaxNode node, ParameterSymbol paramsParameter, ImmutableArray<BoundExpression> collectionArgs, BindingDiagnosticBag diagnostics)
2110var parameterListList = ArrayBuilder<ImmutableArray<ParameterSymbol>>.GetInstance();
2130var parameterListList = ArrayBuilder<ImmutableArray<ParameterSymbol>>.GetInstance();
2149private ImmutableArray<BoundExpression> BuildArgumentsForErrorRecovery(AnalyzedArguments analyzedArguments, IEnumerable<ImmutableArray<ParameterSymbol>> parameterListList, BindingDiagnosticBag diagnostics)
2285private static TypeSymbol GetCorrespondingParameterType(AnalyzedArguments analyzedArguments, int i, ImmutableArray<ParameterSymbol> parameterList)
2291foreach (var parameter in parameterList)
2308return BuildArgumentsForErrorRecovery(analyzedArguments, Enumerable.Empty<ImmutableArray<ParameterSymbol>>(), BindingDiagnosticBag.Discarded);
Binder\Semantics\OverloadResolution\OverloadResolution.cs (23)
1312ParameterSymbol final = member.GetParameters().Last();
2534var m1LastParameter = m1LeastOverriddenParameters[^1];
2535var m2LastParameter = m2LeastOverriddenParameters[^1];
2539var parameter1 = getParameterOrExtensionParameter(i, m1.Result, m1LeastOverriddenParameters, m1.LeastOverriddenMember);
2540var parameter2 = getParameterOrExtensionParameter(i, m2.Result, m2LeastOverriddenParameters, m2.LeastOverriddenMember);
2568static TypeSymbol getParameterTypeAndRefKind(int i, MemberAnalysisResult memberResolutionResult, ImmutableArray<ParameterSymbol> parameters,
2571ParameterSymbol parameter = getParameterOrExtensionParameter(i, memberResolutionResult, parameters, member);
2589static ParameterSymbol getParameterOrExtensionParameter(int argIndex, MemberAnalysisResult result, ImmutableArray<ParameterSymbol> parameters, TMember member)
2596ParameterSymbol? extensionParameter = member.ContainingType.ExtensionParameter;
2610ImmutableArray<ParameterSymbol> parameters1,
2612ImmutableArray<ParameterSymbol> parameters2)
2620var p1 = getParameterOrExtensionParameter(i, m1.Result, parameters1, m1.Member);
2621var p2 = getParameterOrExtensionParameter(i, m2.Result, parameters2, m2.Member);
2676private static RefKind GetParameterBetternessRefKind<TMember>(ParameterSymbol parameter, TMember member) where TMember : Symbol
3769private static bool IdenticalParameters(ImmutableArray<ParameterSymbol> p1, ImmutableArray<ParameterSymbol> p2)
3784var param1 = p1[i];
3785var param2 = p2[i];
3895ImmutableArray<ParameterSymbol> parameters = member.GetParametersIncludingExtensionParameter(skipExtensionIfStatic: false);
3929var parameter = parameters[parm];
3954ParameterSymbol parameter,
4066var parameter = parameters[parm];
CodeGen\CodeGenerator_RefSafety.cs (11)
12/// <inheritdoc cref="MightEscapeTemporaryRefs(bool, TypeSymbol, RefKind, ParameterSymbol?, ImmutableArray{ParameterSymbol})"/>
19thisParameterSymbol: node.Method.TryGetThisParameter(out var thisParameter) ? thisParameter : null,
23/// <inheritdoc cref="MightEscapeTemporaryRefs(bool, TypeSymbol, RefKind, ParameterSymbol?, ImmutableArray{ParameterSymbol})"/>
34/// <inheritdoc cref="MightEscapeTemporaryRefs(bool, TypeSymbol, RefKind, ParameterSymbol?, ImmutableArray{ParameterSymbol})"/>
65ParameterSymbol? thisParameterSymbol,
66ImmutableArray<ParameterSymbol> parameters)
84foreach (var parameter in parameters)
95static bool processParameter(ParameterSymbol parameter, ref bool anyRefSources, ref bool anyRefTargets)
Compilation\CSharpSemanticModel.cs (12)
1797case ParameterSymbol _:
3224protected ParameterSymbol GetParameterSymbol(
3225ImmutableArray<ParameterSymbol> parameters,
3229foreach (var symbol in parameters)
3688var thisParam = GetThisParameter(boundNode.Type, containingType, containingMember, out resultKind);
3733private static ParameterSymbol GetThisParameter(TypeSymbol typeOfThis, NamedTypeSymbol containingType, Symbol containingMember, out LookupResultKind resultKind)
3742ParameterSymbol thisParam;
4519ParameterSymbol param = FindNamedParameter(containingInvocationInfo.Symbol.GetSymbol().GetParameters(), argumentName);
4536ParameterSymbol param = FindNamedParameter(invocationSym.GetSymbol().GetParameters(), argumentName);
4558private static ParameterSymbol FindNamedParameter(ImmutableArray<ParameterSymbol> parameters, string argumentName)
4560foreach (ParameterSymbol param in parameters)
FlowAnalysis\NullableWalker.cs (83)
272/// The delegate is invoked by <see cref="VisitConversion(BoundConversion, BoundExpression, Conversion, TypeWithAnnotations, TypeWithState, bool, bool, bool, AssignmentKind, ParameterSymbol, bool, bool, bool, bool, Optional<LocalState>,bool, Location, ArrayBuilder<VisitResult>)"/>.
622ParameterSymbol methodThisParameter = MethodThisParameter;
629if (_symbol.TryGetInstanceExtensionParameter(out ParameterSymbol? extensionParameter))
675if (method.TryGetThisParameter(out var thisParameter) && thisParameter is object)
1259ImmutableArray<ParameterSymbol> parameters = method.GetParametersIncludingExtensionParameter(skipExtensionIfStatic: true);
1276foreach (var parameter in parameters)
1307ImmutableArray<ParameterSymbol> parameters = method.GetParametersIncludingExtensionParameter(skipExtensionIfStatic: true);
1308foreach (var parameter in parameters)
1341private void EnforceParameterNotNullWhenOnExit(SyntaxNode syntax, ImmutableArray<ParameterSymbol> parameters, bool sense, LocalState stateWhen)
1348foreach (var parameter in parameters)
1354private void ReportParameterIfBadConditionalState(SyntaxNode syntax, ParameterSymbol parameter, bool sense, LocalState stateWhen)
1363bool parameterHasBadConditionalState(ParameterSymbol parameter, bool sense, LocalState stateWhen)
1401private void EnforceNotNullIfNotNull(SyntaxNode? syntaxOpt, LocalState state, ImmutableArray<ParameterSymbol> parameters, ImmutableHashSet<string> inputParamNames, NullableFlowState outputState, ParameterSymbol? outputParam)
1408foreach (var inputParam in parameters)
2043var parameter = (ParameterSymbol)symbol;
2147var thisParameter = method?.ThisParameter;
2247if (symbol is ParameterSymbol { ContainingSymbol: SynthesizedPrimaryConstructor primaryConstructor } parameter &&
2259if (enclosingMemberMethod?.TryGetThisParameter(out ParameterSymbol? methodThisParameter) == true &&
2355private static object GetParameterAsDiagnosticArgument(ParameterSymbol? parameterOpt)
2362private static object GetContainingSymbolAsDiagnosticArgument(ParameterSymbol? parameterOpt)
2424ParameterSymbol? parameterOpt = null,
2990var parameter = methodParameters[i];
2999private void EnterParameter(ParameterSymbol parameter, TypeWithAnnotations parameterType)
3026var parameter = equalsValue.Parameter;
3124ImmutableArray<ParameterSymbol> parameters = method.GetParametersIncludingExtensionParameter(skipExtensionIfStatic: true);
3935var reinferredParameter = reinferredAddMethod.Parameters[argIndex];
5501BoundExpression expr, BoundExpression operand, Conversion conversion, ParameterSymbol parameter, TypeWithState operandType, bool isLifted,
5525private void VisitBinaryOperatorOperandConversionAndPostConditions(BoundExpression expr, BoundExpression operand, Conversion conversion, ParameterSymbol parameter, TypeWithState operandType, bool isLifted)
6724ImmutableArray<ParameterSymbol> parameters = getParameters(method.Parameters, adjustForNewExtension, method);
6748static ImmutableArray<ParameterSymbol> getParameters(ImmutableArray<ParameterSymbol> parameters, bool isNewExtension, MethodSymbol method)
6755ParameterSymbol? extensionParameter = method.ContainingType.ExtensionParameter;
6790ParameterSymbol? extensionParameter = method.ContainingType.ExtensionParameter;
7108private FlowAnalysisAnnotations GetParameterAnnotations(ParameterSymbol parameter)
7264ImmutableArray<ParameterSymbol> parametersOpt,
7279private delegate (TMember? member, bool returnNotNull) ArgumentsCompletionDelegate<TMember>(ImmutableArray<VisitResult> argumentResults, ImmutableArray<ParameterSymbol> parametersOpt, TMember? member) where TMember : Symbol;
7286ImmutableArray<ParameterSymbol> parametersOpt,
7328ImmutableArray<ParameterSymbol> parametersOpt,
7383var notNullParametersBuilder = parameterHasNotNullIfNotNull ? ArrayBuilder<ParameterSymbol>.GetInstance() : null;
7395(ParameterSymbol? parameter, TypeWithAnnotations parameterType, FlowAnalysisAnnotations parameterAnnotations, bool isExpandedParamsArgument) =
7471(ParameterSymbol? parameter, TypeWithAnnotations parameterType, FlowAnalysisAnnotations parameterAnnotations, _) =
7522return (ImmutableArray<VisitResult> results, ImmutableArray<ParameterSymbol> parametersOpt, TMember? member) =>
7534static void expandParamsCollection(ref ImmutableArray<BoundExpression> arguments, ref ImmutableArray<RefKind> refKindsOpt, ImmutableArray<ParameterSymbol> parametersOpt, ref ImmutableArray<int> argsToParamsOpt, ref BitVector defaultArguments)
7675if (current.TryGetThisParameter(out var thisParameter) && thisParameter is not null)
7802private ImmutableArray<FlowAnalysisAnnotations> GetParametersAnnotations(ImmutableArray<BoundExpression> arguments, ImmutableArray<ParameterSymbol> parametersOpt, ImmutableArray<int> argsToParamsOpt, bool expanded)
7898ParameterSymbol parameter,
8035ParameterSymbol parameter,
8039ArrayBuilder<ParameterSymbol>? notNullParametersOpt,
8130FlowAnalysisAnnotations notNullBasedOnParameters(FlowAnalysisAnnotations parameterAnnotations, ArrayBuilder<ParameterSymbol>? notNullParametersOpt, ParameterSymbol parameter)
8137foreach (var notNullParameter in notNullParametersOpt)
8332private (ParameterSymbol? Parameter, TypeWithAnnotations Type, FlowAnalysisAnnotations Annotations, bool isExpandedParamsArgument) GetCorrespondingParameter(
8334ImmutableArray<ParameterSymbol> parametersOpt,
8344var parameter = Binder.GetCorrespondingParameter(argumentOrdinal, parametersOpt, argsToParamsOpt, expanded);
9166ParameterSymbol? parameterOpt,
9295void reportBadDelegateParameter(BindingDiagnosticBag bag, MethodSymbol sourceInvokeMethod, MethodSymbol targetInvokeMethod, ParameterSymbol parameter, bool topLevel, (TypeSymbol targetType, Location location) arg)
9366void reportBadDelegateParameter(BindingDiagnosticBag bag, MethodSymbol sourceInvokeMethod, MethodSymbol targetInvokeMethod, ParameterSymbol parameterSymbol, bool topLevel, Location location)
9421ParameterSymbol? parameterOpt = null,
9497static (MethodSymbol invokeSignature, ImmutableArray<ParameterSymbol>) getDelegateOrFunctionPointerInfo(TypeSymbol targetType)
9502_ => (null, ImmutableArray<ParameterSymbol>.Empty),
9979ParameterSymbol? parameterOpt,
10025var parameter = method.Parameters[0];
10198ParameterSymbol? parameterOpt,
10450private MethodSymbol CheckMethodGroupReceiverNullability(BoundMethodGroup group, ImmutableArray<ParameterSymbol> parameters, MethodSymbol method, bool invokedAsExtensionMethod)
10473foreach (var parameter in parameters)
10487ParameterSymbol? receiverParameter = isNewExtensionMethod ? method.ContainingType.ExtensionParameter : method.Parameters[0];
10580var parameter = node.ParameterSymbol;
10709BoundParameter { ParameterSymbol: ParameterSymbol parameter }
10874var receiverParameter = isNewExtension ? deconstructMethod.ContainingType.ExtensionParameter : deconstructMethod.Parameters[0];
10882var parameter = parameters[i + offset];
10902var parameter = parameters[i + offset];
11169ParameterSymbol? parameter = null;
11416private void ReportNullabilityMismatchInRefArgument(BoundExpression argument, TypeSymbol argumentType, ParameterSymbol parameter, TypeSymbol parameterType)
11428private void ReportNullabilityMismatchInArgument(SyntaxNode argument, TypeSymbol argumentType, ParameterSymbol parameter, TypeSymbol parameterType, bool forOutput)
11433private void ReportNullabilityMismatchInArgument(Location argumentLocation, TypeSymbol argumentType, ParameterSymbol? parameterOpt, TypeSymbol parameterType, bool forOutput)
11449private TypeWithAnnotations GetDeclaredParameterResult(ParameterSymbol parameter)
11476var extensionParameter = property.ContainingType.ExtensionParameter;
11478ImmutableArray<ParameterSymbol> parameters = [extensionParameter];
12118var parameter = method.Parameters[0];
12351var trueFalseParameter = trueFalseOperator.Parameters[0];
12792private void CheckExtensionMethodThisNullability(BoundExpression expr, Conversion conversion, ParameterSymbol parameter, TypeWithState result)
Generated\BoundNodes.xml.Generated.cs (17)
350public BoundParameterEqualsValue(SyntaxNode syntax, ParameterSymbol parameter, ImmutableArray<LocalSymbol> locals, BoundExpression value, bool hasErrors = false)
361public ParameterSymbol Parameter { get; }
366public BoundParameterEqualsValue Update(ParameterSymbol parameter, ImmutableArray<LocalSymbol> locals, BoundExpression value)
2395public BoundParameterId(SyntaxNode syntax, ParameterSymbol parameter, FieldSymbol? hoistedField, TypeSymbol type, bool hasErrors)
2406public BoundParameterId(SyntaxNode syntax, ParameterSymbol parameter, FieldSymbol? hoistedField, TypeSymbol type)
2418public ParameterSymbol Parameter { get; }
2424public BoundParameterId Update(ParameterSymbol parameter, FieldSymbol? hoistedField, TypeSymbol type)
4655public BoundParameter(SyntaxNode syntax, ParameterSymbol parameterSymbol, TypeSymbol type, bool hasErrors)
4665public BoundParameter(SyntaxNode syntax, ParameterSymbol parameterSymbol, TypeSymbol type)
4676public ParameterSymbol ParameterSymbol { get; }
4681public BoundParameter Update(ParameterSymbol parameterSymbol, TypeSymbol type)
10883ParameterSymbol parameter = this.VisitParameterSymbol(node.Parameter);
11256ParameterSymbol parameter = this.VisitParameterSymbol(node.Parameter);
11638ParameterSymbol parameterSymbol = this.VisitParameterSymbol(node.ParameterSymbol);
12465ParameterSymbol parameter = GetUpdatedSymbol(node, node.Parameter);
13244ParameterSymbol parameter = GetUpdatedSymbol(node, node.Parameter);
13807ParameterSymbol parameterSymbol = GetUpdatedSymbol(node, node.ParameterSymbol);
Symbols\Compilation_WellKnownMembers.cs (8)
251internal static Symbol? GetRuntimeMember(NamedTypeSymbol declaringType, in MemberDescriptor descriptor, SignatureComparer<MethodSymbol, FieldSymbol, PropertySymbol, TypeSymbol, ParameterSymbol> comparer, AssemblySymbol? accessWithinOpt)
257internal static Symbol? GetRuntimeMember(ImmutableArray<Symbol> members, in MemberDescriptor descriptor, SignatureComparer<MethodSymbol, FieldSymbol, PropertySymbol, TypeSymbol, ParameterSymbol> comparer, AssemblySymbol? accessWithinOpt)
1023foreach (var param in sig.Parameters)
1079internal class SpecialMembersSignatureComparer : SignatureComparer<MethodSymbol, FieldSymbol, PropertySymbol, TypeSymbol, ParameterSymbol>
1149protected override ImmutableArray<ParameterSymbol> GetParameters(MethodSymbol method)
1154protected override ImmutableArray<ParameterSymbol> GetParameters(PropertySymbol property)
1159protected override TypeSymbol GetParamType(ParameterSymbol parameter)
1188protected override bool IsByRefParam(ParameterSymbol parameter)
Symbols\Source\ParameterHelpers.cs (29)
180where TParameterSymbol : ParameterSymbol
215ImmutableArray<ParameterSymbol> parametersForNameConflict = parameters.Cast<TParameterSymbol, ParameterSymbol>();
262where TParameterSymbol : ParameterSymbol
327internal static void EnsureRefKindAttributesExist(PEModuleBuilder moduleBuilder, ImmutableArray<ParameterSymbol> parameters)
332internal static void EnsureRefKindAttributesExist(CSharpCompilation? compilation, ImmutableArray<ParameterSymbol> parameters, BindingDiagnosticBag diagnostics, bool modifyCompilation)
344private static void EnsureRefKindAttributesExist(CSharpCompilation compilation, ImmutableArray<ParameterSymbol> parameters, BindingDiagnosticBag? diagnostics, bool modifyCompilation, PEModuleBuilder? moduleBuilder)
346foreach (var parameter in parameters)
373internal static void EnsureParamCollectionAttributeExists(PEModuleBuilder moduleBuilder, ImmutableArray<ParameterSymbol> parameters)
381internal static void EnsureParamCollectionAttributeExists(CSharpCompilation compilation, ImmutableArray<ParameterSymbol> parameters, BindingDiagnosticBag diagnostics, bool modifyCompilation)
389internal static void EnsureNativeIntegerAttributeExists(PEModuleBuilder moduleBuilder, ImmutableArray<ParameterSymbol> parameters)
395internal static void EnsureNativeIntegerAttributeExists(CSharpCompilation? compilation, ImmutableArray<ParameterSymbol> parameters, BindingDiagnosticBag diagnostics, bool modifyCompilation)
412private static void EnsureNativeIntegerAttributeExists(CSharpCompilation compilation, ImmutableArray<ParameterSymbol> parameters, BindingDiagnosticBag? diagnostics, bool modifyCompilation, PEModuleBuilder? moduleBuilder)
415foreach (var parameter in parameters)
431internal static bool RequiresScopedRefAttribute(ParameterSymbol parameter)
447internal static bool IsRefScopedByDefault(ParameterSymbol parameter)
457internal static void EnsureScopedRefAttributeExists(PEModuleBuilder moduleBuilder, ImmutableArray<ParameterSymbol> parameters)
462internal static void EnsureScopedRefAttributeExists(CSharpCompilation? compilation, ImmutableArray<ParameterSymbol> parameters, BindingDiagnosticBag diagnostics, bool modifyCompilation)
474private static void EnsureScopedRefAttributeExists(CSharpCompilation compilation, ImmutableArray<ParameterSymbol> parameters, BindingDiagnosticBag? diagnostics, bool modifyCompilation, PEModuleBuilder? moduleBuilder)
476foreach (var parameter in parameters)
492internal static void EnsureNullableAttributeExists(PEModuleBuilder moduleBuilder, Symbol container, ImmutableArray<ParameterSymbol> parameters)
497internal static void EnsureNullableAttributeExists(CSharpCompilation? compilation, Symbol container, ImmutableArray<ParameterSymbol> parameters, BindingDiagnosticBag? diagnostics, bool modifyCompilation)
509private static void EnsureNullableAttributeExists(CSharpCompilation compilation, Symbol container, ImmutableArray<ParameterSymbol> parameters, BindingDiagnosticBag? diagnostics, bool modifyCompilation, PEModuleBuilder? moduleBuilder)
513foreach (var parameter in parameters)
530internal static void CheckUnderspecifiedGenericExtension(Symbol extensionMember, ImmutableArray<ParameterSymbol> parameters, BindingDiagnosticBag diagnostics)
552static void reportUnusedExtensionTypeParameters(Symbol extensionMember, ImmutableArray<ParameterSymbol> parameters, BindingDiagnosticBag diagnostics, NamedTypeSymbol extension, ParameterSymbol extensionParameter, PooledHashSet<TypeParameterSymbol> usedTypeParameters)
565foreach (var parameter in parameters)
595internal static Location GetParameterLocation(ParameterSymbol parameter) => parameter.GetNonNullSyntaxNode().Location;
Symbols\Source\SourceMemberContainerSymbol.cs (15)
4461private static bool ParametersMatchPropertyAccessor(PropertySymbol propertySymbol, bool getNotSet, ImmutableArray<ParameterSymbol> methodParams)
4472var methodParam = methodParams[i];
4492private static bool ParametersMatchEventAccessor(EventSymbol eventSymbol, ImmutableArray<ParameterSymbol> methodParams)
4885ctor.Parameters.SelectAsArray<ParameterSymbol, ParameterSymbol>(param => new SignatureOnlyParameterSymbol(param.TypeWithAnnotations,
4932ImmutableArray.Create<ParameterSymbol>(new SignatureOnlyParameterSymbol(
4985ImmutableArray.Create<ParameterSymbol>(new SignatureOnlyParameterSymbol(
5045ImmutableArray<ParameterSymbol>.Empty,
5113ImmutableArray<Symbol> addProperties(ImmutableArray<ParameterSymbol> recordParameters)
5117foreach (ParameterSymbol param in recordParameters)
5124ImmutableArray<ParameterSymbol>.Empty,
5195bool checkMemberNotHidden(Symbol symbol, ParameterSymbol param)
5219ImmutableArray<ParameterSymbol>.Empty,
5250ImmutableArray<ParameterSymbol>.Empty,
5312ImmutableArray.Create<ParameterSymbol>(new SignatureOnlyParameterSymbol(
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (13)
19internal delegate void ReportMismatchInParameterType<TArg>(BindingDiagnosticBag bag, MethodSymbol overriddenMethod, MethodSymbol overridingMethod, ParameterSymbol parameter, bool topLevel, TArg arg);
1157if (RequiresValidScopedOverrideForRefSafety(overriddenMethod, overridingMethod.TryGetThisParameter(out var thisParam) ? thisParam : null))
1229(BindingDiagnosticBag diagnostics, MethodSymbol overriddenMethod, MethodSymbol overridingMethod, ParameterSymbol overridingParameter, bool topLevel, Location location)
1298var baseParameter = baseParameters[i];
1301var overrideParameter = overrideParameters[parameterIndex];
1335var overrideParam = overrideParameters[i + overrideParameterOffset];
1336var baseParam = baseParameters[i];
1381internal static bool RequiresValidScopedOverrideForRefSafety(MethodSymbol? method, ParameterSymbol? overrideThisParameter)
1474var baseParameter = baseParameters[i];
1475var overrideParameter = overrideParameters[i + overrideParameterOffset];
1507ReportMismatchInParameterType<(ParameterSymbol BaseParameter, TArg Arg)> reportMismatchInParameterType,
1525var baseParameter = baseParameters[i];
1526var overrideParameter = overrideParameters[i + overrideParameterOffset];
Symbols\Synthesized\SynthesizedEmbeddedNullableAttributeSymbol.cs (7)
76private void GenerateByteArrayConstructorBody(SyntheticBoundNodeFactory factory, ArrayBuilder<BoundStatement> statements, ImmutableArray<ParameterSymbol> parameters)
90private void GenerateSingleByteConstructorBody(SyntheticBoundNodeFactory factory, ArrayBuilder<BoundStatement> statements, ImmutableArray<ParameterSymbol> parameters)
112private readonly ImmutableArray<ParameterSymbol> _parameters;
114private readonly Action<SyntheticBoundNodeFactory, ArrayBuilder<BoundStatement>, ImmutableArray<ParameterSymbol>> _getConstructorBody;
118Func<MethodSymbol, ImmutableArray<ParameterSymbol>> getParameters,
119Action<SyntheticBoundNodeFactory, ArrayBuilder<BoundStatement>, ImmutableArray<ParameterSymbol>> getConstructorBody) :
126public override ImmutableArray<ParameterSymbol> Parameters => _parameters;