Binder\Binder.ValueChecks.cs (34)
126public ImmutableArray<ParameterSymbol> Parameters;
356internal ParameterSymbol? Parameter { get; }
365internal MixableDestination(ParameterSymbol parameter, BoundExpression argument)
401internal ParameterSymbol? Parameter { get; }
407internal EscapeArgument(ParameterSymbol? parameter, BoundExpression argument, RefKind refKind, bool isArgList = false)
415public void Deconstruct(out ParameterSymbol? parameter, out BoundExpression argument, out RefKind refKind)
437internal ParameterSymbol? Parameter { get; }
450internal EscapeValue(ParameterSymbol? parameter, BoundExpression argument, EscapeLevel escapeLevel, bool isRefEscape)
458public void Deconstruct(out ParameterSymbol? parameter, out BoundExpression argument, out EscapeLevel escapeLevel, out bool isRefEscape)
1362ParameterSymbol parameterSymbol = parameter.ParameterSymbol;
1419static void reportReadOnlyParameterError(ParameterSymbol parameterSymbol, SyntaxNode node, BindValueKind valueKind, bool checkingReceiver, BindingDiagnosticBag diagnostics)
1475private static SafeContext GetParameterValEscape(ParameterSymbol parameter)
1485private static EscapeLevel? GetParameterValEscapeLevel(ParameterSymbol parameter) =>
1488private static SafeContext GetParameterRefEscape(ParameterSymbol parameter)
1500private static EscapeLevel? GetParameterRefEscapeLevel(ParameterSymbol parameter) =>
1503private bool CheckParameterValEscape(SyntaxNode node, ParameterSymbol parameter, SafeContext escapeTo, BindingDiagnosticBag diagnostics)
1521private bool CheckParameterRefEscape(SyntaxNode node, BoundExpression parameter, ParameterSymbol parameterSymbol, SafeContext escapeTo, bool checkingReceiver, BindingDiagnosticBag diagnostics)
2376var extensionParameter = symbol.ContainingType.ExtensionParameter;
2662var parameter = argIndex < parameters.Length ?
2690static bool isMixableParameter([NotNullWhen(true)] ParameterSymbol? parameter) =>
2742ParameterSymbol? thisParameter = null;
2847ParameterSymbol? extensionReceiver = null;
2904return method?.TryGetThisParameter(out var thisParameter) == true &&
2908static bool isRefToRefStruct(ParameterSymbol parameter)
3068private static string GetInvocationParameterName(ParameterSymbol? parameter)
3085ParameterSymbol? parameter,
3327private readonly ParameterSymbol _underlyingParameter;
3329internal TypeParameterThisParameterSymbol(ParameterSymbol underlyingParameter, TypeParameterSymbol type)
3721var thisParam = ((MethodSymbol)_symbol).ThisParameter;
4012var thisParam = ((MethodSymbol)_symbol).ThisParameter;
4321var thisParam = ((MethodSymbol)_symbol).ThisParameter;
4980var thisParam = ((MethodSymbol)_symbol).ThisParameter;
5652ImmutableArray.Create<ParameterSymbol>(new SignatureOnlyParameterSymbol(
5692ImmutableArray.Create<ParameterSymbol>(new SignatureOnlyParameterSymbol(
Binder\Binder_Expressions.cs (23)
460TryGetPrimaryConstructorParameterUsedAsValue(primaryConstructor, result) is (ParameterSymbol parameter, SyntaxNode syntax) &&
489ParameterSymbol parameter,
500ParameterSymbol parameter,
1812if (GetSymbolOrMethodOrPropertyGroup(lookupResult, node, name, node.Arity, members, diagnostics, out bool isError, qualifierOpt: null) is ParameterSymbol shadowedParameter &&
2116var parameter = (ParameterSymbol)symbol;
2541ParameterSymbol? thisSymbol = this.ContainingMemberOrLambda.EnclosingThisSymbol();
3487ImmutableArray<ParameterSymbol> parameters,
3543ImmutableArray<ParameterSymbol> parameters,
3576ImmutableArray<ParameterSymbol> parameters,
3659static ParameterSymbol getCorrespondingParameter(in MemberAnalysisResult result, ImmutableArray<ParameterSymbol> parameters, int arg)
3669ImmutableArray<ParameterSymbol> parameters,
3681var correspondingParameter = getCorrespondingParameter(in result, parameters, interpolatedStringArgNum);
3795var receiverParameter = ((TypeSymbol)methodResult.Member.ContainingSymbol).ExtensionParameter;
3805var parameter = parameters[originalParameterIndex];
3825var parameter = parameters[originalParameterIndex];
3899private void CheckArgumentRefKind(RefKind argRefKind, BoundExpression argument, int arg, ParameterSymbol parameter,
5037var parametersPassedToBase = new OrderedSet<ParameterSymbol>();
5046if (TryGetPrimaryConstructorParameterUsedAsValue(primaryConstructor, analyzedArguments.Argument(i)) is (ParameterSymbol parameter, SyntaxNode syntax))
5050var baseParameter = GetCorrespondingParameter(i, resultMember.Parameters, argsToParamsOpt, expanded: true);
5141private static (ParameterSymbol, SyntaxNode) TryGetPrimaryConstructorParameterUsedAsValue(SynthesizedPrimaryConstructor primaryConstructor, BoundExpression boundExpression)
9977var parameter = property.Parameters[0];
Binder\Binder_Invocation.cs (18)
1260ParameterSymbol 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;
1529ImmutableArray<ParameterSymbol> parameters,
1544var parameter = GetCorrespondingParameter(i, parameters, argsToParamsOpt, expanded);
1605foreach (var parameter in parameters.AsSpan()[..lastIndex])
1661BoundExpression bindDefaultArgument(SyntaxNode syntax, ParameterSymbol parameter, Symbol? containingMember, bool enableCallerInfo, BindingDiagnosticBag diagnostics, ArrayBuilder<BoundExpression> argumentsBuilder, int argumentsCount, ImmutableArray<int> argsToParamsOpt)
1780private BoundExpression CreateParamsCollection(SyntaxNode node, ParameterSymbol paramsParameter, ImmutableArray<BoundExpression> collectionArgs, BindingDiagnosticBag diagnostics)
1911!(d.Arguments is [ParameterSymbol shadowedParameter] && shadowedParameter.Type.Equals(typeOrValue.Data.ValueExpression.Type, TypeCompareKind.AllIgnoreOptions))) // If the type and the name match, we would resolve to the same type rather than a value at the end.
2055var parameterListList = ArrayBuilder<ImmutableArray<ParameterSymbol>>.GetInstance();
2075var parameterListList = ArrayBuilder<ImmutableArray<ParameterSymbol>>.GetInstance();
2094private ImmutableArray<BoundExpression> BuildArgumentsForErrorRecovery(AnalyzedArguments analyzedArguments, IEnumerable<ImmutableArray<ParameterSymbol>> parameterListList)
2228private static TypeSymbol GetCorrespondingParameterType(AnalyzedArguments analyzedArguments, int i, ImmutableArray<ParameterSymbol> parameterList)
2234foreach (var parameter in parameterList)
2251return BuildArgumentsForErrorRecovery(analyzedArguments, Enumerable.Empty<ImmutableArray<ParameterSymbol>>());
Binder\Semantics\OverloadResolution\OverloadResolution.cs (20)
1312ParameterSymbol final = member.GetParameters().Last();
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);
3756private static bool IdenticalParameters(ImmutableArray<ParameterSymbol> p1, ImmutableArray<ParameterSymbol> p2)
3771var param1 = p1[i];
3772var param2 = p2[i];
3882ImmutableArray<ParameterSymbol> parameters = member.GetParametersIncludingExtensionParameter(skipExtensionIfStatic: false);
3916var parameter = parameters[parm];
3941ParameterSymbol parameter,
4053var 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)
1794case ParameterSymbol _:
3234protected ParameterSymbol GetParameterSymbol(
3235ImmutableArray<ParameterSymbol> parameters,
3239foreach (var symbol in parameters)
3697var thisParam = GetThisParameter(boundNode.Type, containingType, containingMember, out resultKind);
3742private static ParameterSymbol GetThisParameter(TypeSymbol typeOfThis, NamedTypeSymbol containingType, Symbol containingMember, out LookupResultKind resultKind)
3751ParameterSymbol thisParam;
4523ParameterSymbol param = FindNamedParameter(containingInvocationInfo.Symbol.GetSymbol().GetParameters(), argumentName);
4540ParameterSymbol param = FindNamedParameter(invocationSym.GetSymbol().GetParameters(), argumentName);
4562private static ParameterSymbol FindNamedParameter(ImmutableArray<ParameterSymbol> parameters, string argumentName)
4564foreach (ParameterSymbol param in parameters)
FlowAnalysis\NullableWalker.cs (83)
253/// 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>)"/>.
603ParameterSymbol methodThisParameter = MethodThisParameter;
610if (_symbol.TryGetInstanceExtensionParameter(out ParameterSymbol? extensionParameter))
658method.TryGetThisParameter(out var thisParameter);
1242ImmutableArray<ParameterSymbol> parameters = method.GetParametersIncludingExtensionParameter(skipExtensionIfStatic: true);
1259foreach (var parameter in parameters)
1290ImmutableArray<ParameterSymbol> parameters = method.GetParametersIncludingExtensionParameter(skipExtensionIfStatic: true);
1291foreach (var parameter in parameters)
1324private void EnforceParameterNotNullWhenOnExit(SyntaxNode syntax, ImmutableArray<ParameterSymbol> parameters, bool sense, LocalState stateWhen)
1331foreach (var parameter in parameters)
1337private void ReportParameterIfBadConditionalState(SyntaxNode syntax, ParameterSymbol parameter, bool sense, LocalState stateWhen)
1346bool parameterHasBadConditionalState(ParameterSymbol parameter, bool sense, LocalState stateWhen)
1384private void EnforceNotNullIfNotNull(SyntaxNode? syntaxOpt, LocalState state, ImmutableArray<ParameterSymbol> parameters, ImmutableHashSet<string> inputParamNames, NullableFlowState outputState, ParameterSymbol? outputParam)
1391foreach (var inputParam in parameters)
2025var parameter = (ParameterSymbol)symbol;
2129var thisParameter = method?.ThisParameter;
2229if (symbol is ParameterSymbol { ContainingSymbol: SynthesizedPrimaryConstructor primaryConstructor } parameter &&
2241if (enclosingMemberMethod?.TryGetThisParameter(out ParameterSymbol methodThisParameter) == true &&
2337private static object GetParameterAsDiagnosticArgument(ParameterSymbol? parameterOpt)
2344private static object GetContainingSymbolAsDiagnosticArgument(ParameterSymbol? parameterOpt)
2406ParameterSymbol? parameterOpt = null,
2972var parameter = methodParameters[i];
2981private void EnterParameter(ParameterSymbol parameter, TypeWithAnnotations parameterType)
3008var parameter = equalsValue.Parameter;
3106ImmutableArray<ParameterSymbol> parameters = method.GetParametersIncludingExtensionParameter(skipExtensionIfStatic: true);
3920var reinferredParameter = reinferredAddMethod.Parameters[argIndex];
5450BoundExpression expr, BoundExpression operand, Conversion conversion, ParameterSymbol parameter, TypeWithState operandType, bool isLifted,
5474private void VisitBinaryOperatorOperandConversionAndPostConditions(BoundExpression expr, BoundExpression operand, Conversion conversion, ParameterSymbol parameter, TypeWithState operandType, bool isLifted)
6632ImmutableArray<ParameterSymbol> parameters = getParameters(method.Parameters, adjustForNewExtension, method);
6656static ImmutableArray<ParameterSymbol> getParameters(ImmutableArray<ParameterSymbol> parameters, bool isNewExtension, MethodSymbol method)
6663ParameterSymbol? extensionParameter = method.ContainingType.ExtensionParameter;
6698ParameterSymbol? extensionParameter = method.ContainingType.ExtensionParameter;
7016private FlowAnalysisAnnotations GetParameterAnnotations(ParameterSymbol parameter)
7172ImmutableArray<ParameterSymbol> parametersOpt,
7187private delegate (TMember? member, bool returnNotNull) ArgumentsCompletionDelegate<TMember>(ImmutableArray<VisitResult> argumentResults, ImmutableArray<ParameterSymbol> parametersOpt, TMember? member) where TMember : Symbol;
7194ImmutableArray<ParameterSymbol> parametersOpt,
7236ImmutableArray<ParameterSymbol> parametersOpt,
7291var notNullParametersBuilder = parameterHasNotNullIfNotNull ? ArrayBuilder<ParameterSymbol>.GetInstance() : null;
7303(ParameterSymbol? parameter, TypeWithAnnotations parameterType, FlowAnalysisAnnotations parameterAnnotations, bool isExpandedParamsArgument) =
7379(ParameterSymbol? parameter, TypeWithAnnotations parameterType, FlowAnalysisAnnotations parameterAnnotations, _) =
7430return (ImmutableArray<VisitResult> results, ImmutableArray<ParameterSymbol> parametersOpt, TMember? member) =>
7442static void expandParamsCollection(ref ImmutableArray<BoundExpression> arguments, ref ImmutableArray<RefKind> refKindsOpt, ImmutableArray<ParameterSymbol> parametersOpt, ref ImmutableArray<int> argsToParamsOpt, ref BitVector defaultArguments)
7583if (current.TryGetThisParameter(out var thisParameter) && thisParameter is not null)
7710private ImmutableArray<FlowAnalysisAnnotations> GetParametersAnnotations(ImmutableArray<BoundExpression> arguments, ImmutableArray<ParameterSymbol> parametersOpt, ImmutableArray<int> argsToParamsOpt, bool expanded)
7806ParameterSymbol parameter,
7943ParameterSymbol parameter,
7947ArrayBuilder<ParameterSymbol>? notNullParametersOpt,
8038FlowAnalysisAnnotations notNullBasedOnParameters(FlowAnalysisAnnotations parameterAnnotations, ArrayBuilder<ParameterSymbol>? notNullParametersOpt, ParameterSymbol parameter)
8045foreach (var notNullParameter in notNullParametersOpt)
8240private (ParameterSymbol? Parameter, TypeWithAnnotations Type, FlowAnalysisAnnotations Annotations, bool isExpandedParamsArgument) GetCorrespondingParameter(
8242ImmutableArray<ParameterSymbol> parametersOpt,
8252var parameter = Binder.GetCorrespondingParameter(argumentOrdinal, parametersOpt, argsToParamsOpt, expanded);
9028ParameterSymbol? parameterOpt,
9157void reportBadDelegateParameter(BindingDiagnosticBag bag, MethodSymbol sourceInvokeMethod, MethodSymbol targetInvokeMethod, ParameterSymbol parameter, bool topLevel, (TypeSymbol targetType, Location location) arg)
9228void reportBadDelegateParameter(BindingDiagnosticBag bag, MethodSymbol sourceInvokeMethod, MethodSymbol targetInvokeMethod, ParameterSymbol parameterSymbol, bool topLevel, Location location)
9283ParameterSymbol? parameterOpt = null,
9359static (MethodSymbol invokeSignature, ImmutableArray<ParameterSymbol>) getDelegateOrFunctionPointerInfo(TypeSymbol targetType)
9364_ => (null, ImmutableArray<ParameterSymbol>.Empty),
9841ParameterSymbol? parameterOpt,
9887var parameter = method.Parameters[0];
10060ParameterSymbol? parameterOpt,
10312private MethodSymbol CheckMethodGroupReceiverNullability(BoundMethodGroup group, ImmutableArray<ParameterSymbol> parameters, MethodSymbol method, bool invokedAsExtensionMethod)
10335foreach (var parameter in parameters)
10349ParameterSymbol? receiverParameter = isNewExtensionMethod ? method.ContainingType.ExtensionParameter : method.Parameters[0];
10442var parameter = node.ParameterSymbol;
10571BoundParameter { ParameterSymbol: ParameterSymbol parameter }
10738var receiverParameter = isNewExtension ? deconstructMethod.ContainingType.ExtensionParameter : deconstructMethod.Parameters[0];
10746var parameter = parameters[i + offset];
10766var parameter = parameters[i + offset];
11034ParameterSymbol? parameter = null;
11282private void ReportNullabilityMismatchInRefArgument(BoundExpression argument, TypeSymbol argumentType, ParameterSymbol parameter, TypeSymbol parameterType)
11294private void ReportNullabilityMismatchInArgument(SyntaxNode argument, TypeSymbol argumentType, ParameterSymbol parameter, TypeSymbol parameterType, bool forOutput)
11299private void ReportNullabilityMismatchInArgument(Location argumentLocation, TypeSymbol argumentType, ParameterSymbol? parameterOpt, TypeSymbol parameterType, bool forOutput)
11315private TypeWithAnnotations GetDeclaredParameterResult(ParameterSymbol parameter)
11342var extensionParameter = property.ContainingType.ExtensionParameter;
11344ImmutableArray<ParameterSymbol> parameters = [extensionParameter];
11980var parameter = method.Parameters[0];
12213var trueFalseParameter = trueFalseOperator.Parameters[0];
12654private 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)
2378public BoundParameterId(SyntaxNode syntax, ParameterSymbol parameter, FieldSymbol? hoistedField, TypeSymbol type, bool hasErrors)
2389public BoundParameterId(SyntaxNode syntax, ParameterSymbol parameter, FieldSymbol? hoistedField, TypeSymbol type)
2401public ParameterSymbol Parameter { get; }
2407public BoundParameterId Update(ParameterSymbol parameter, FieldSymbol? hoistedField, TypeSymbol type)
4632public BoundParameter(SyntaxNode syntax, ParameterSymbol parameterSymbol, TypeSymbol type, bool hasErrors)
4642public BoundParameter(SyntaxNode syntax, ParameterSymbol parameterSymbol, TypeSymbol type)
4653public ParameterSymbol ParameterSymbol { get; }
4658public BoundParameter Update(ParameterSymbol parameterSymbol, TypeSymbol type)
10853ParameterSymbol parameter = this.VisitParameterSymbol(node.Parameter);
11225ParameterSymbol parameter = this.VisitParameterSymbol(node.Parameter);
11608ParameterSymbol parameterSymbol = this.VisitParameterSymbol(node.ParameterSymbol);
12435ParameterSymbol parameter = GetUpdatedSymbol(node, node.Parameter);
13209ParameterSymbol parameter = GetUpdatedSymbol(node, node.Parameter);
13773ParameterSymbol parameterSymbol = GetUpdatedSymbol(node, node.ParameterSymbol);
Symbols\Compilation_WellKnownMembers.cs (8)
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)
1019foreach (var param in sig.Parameters)
1075internal class SpecialMembersSignatureComparer : SignatureComparer<MethodSymbol, FieldSymbol, PropertySymbol, TypeSymbol, ParameterSymbol>
1145protected override ImmutableArray<ParameterSymbol> GetParameters(MethodSymbol method)
1150protected override ImmutableArray<ParameterSymbol> GetParameters(PropertySymbol property)
1155protected override TypeSymbol GetParamType(ParameterSymbol parameter)
1184protected override bool IsByRefParam(ParameterSymbol parameter)
Symbols\Source\ParameterHelpers.cs (28)
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 EnsureParamCollectionAttributeExistsAndModifyCompilation(CSharpCompilation compilation, ImmutableArray<ParameterSymbol> parameters, BindingDiagnosticBag diagnostics)
381internal static void EnsureNativeIntegerAttributeExists(PEModuleBuilder moduleBuilder, ImmutableArray<ParameterSymbol> parameters)
387internal static void EnsureNativeIntegerAttributeExists(CSharpCompilation? compilation, ImmutableArray<ParameterSymbol> parameters, BindingDiagnosticBag diagnostics, bool modifyCompilation)
404private static void EnsureNativeIntegerAttributeExists(CSharpCompilation compilation, ImmutableArray<ParameterSymbol> parameters, BindingDiagnosticBag? diagnostics, bool modifyCompilation, PEModuleBuilder? moduleBuilder)
407foreach (var parameter in parameters)
423internal static bool RequiresScopedRefAttribute(ParameterSymbol parameter)
439internal static bool IsRefScopedByDefault(ParameterSymbol parameter)
449internal static void EnsureScopedRefAttributeExists(PEModuleBuilder moduleBuilder, ImmutableArray<ParameterSymbol> parameters)
454internal static void EnsureScopedRefAttributeExists(CSharpCompilation? compilation, ImmutableArray<ParameterSymbol> parameters, BindingDiagnosticBag diagnostics, bool modifyCompilation)
466private static void EnsureScopedRefAttributeExists(CSharpCompilation compilation, ImmutableArray<ParameterSymbol> parameters, BindingDiagnosticBag? diagnostics, bool modifyCompilation, PEModuleBuilder? moduleBuilder)
468foreach (var parameter in parameters)
484internal static void EnsureNullableAttributeExists(PEModuleBuilder moduleBuilder, Symbol container, ImmutableArray<ParameterSymbol> parameters)
489internal static void EnsureNullableAttributeExists(CSharpCompilation? compilation, Symbol container, ImmutableArray<ParameterSymbol> parameters, BindingDiagnosticBag? diagnostics, bool modifyCompilation)
501private static void EnsureNullableAttributeExists(CSharpCompilation compilation, Symbol container, ImmutableArray<ParameterSymbol> parameters, BindingDiagnosticBag? diagnostics, bool modifyCompilation, PEModuleBuilder? moduleBuilder)
505foreach (var parameter in parameters)
522internal static void CheckUnderspecifiedGenericExtension(Symbol extensionMember, ImmutableArray<ParameterSymbol> parameters, BindingDiagnosticBag diagnostics)
544static void reportUnusedExtensionTypeParameters(Symbol extensionMember, ImmutableArray<ParameterSymbol> parameters, BindingDiagnosticBag diagnostics, NamedTypeSymbol extension, ParameterSymbol extensionParameter, PooledHashSet<TypeParameterSymbol> usedTypeParameters)
557foreach (var parameter in parameters)
587internal static Location GetParameterLocation(ParameterSymbol parameter) => parameter.GetNonNullSyntaxNode().Location;
Symbols\Source\SourceMemberContainerSymbol.cs (15)
4454private static bool ParametersMatchPropertyAccessor(PropertySymbol propertySymbol, bool getNotSet, ImmutableArray<ParameterSymbol> methodParams)
4465var methodParam = methodParams[i];
4485private static bool ParametersMatchEventAccessor(EventSymbol eventSymbol, ImmutableArray<ParameterSymbol> methodParams)
4878ctor.Parameters.SelectAsArray<ParameterSymbol, ParameterSymbol>(param => new SignatureOnlyParameterSymbol(param.TypeWithAnnotations,
4925ImmutableArray.Create<ParameterSymbol>(new SignatureOnlyParameterSymbol(
4978ImmutableArray.Create<ParameterSymbol>(new SignatureOnlyParameterSymbol(
5038ImmutableArray<ParameterSymbol>.Empty,
5106ImmutableArray<Symbol> addProperties(ImmutableArray<ParameterSymbol> recordParameters)
5110foreach (ParameterSymbol param in recordParameters)
5117ImmutableArray<ParameterSymbol>.Empty,
5188bool checkMemberNotHidden(Symbol symbol, ParameterSymbol param)
5212ImmutableArray<ParameterSymbol>.Empty,
5243ImmutableArray<ParameterSymbol>.Empty,
5305ImmutableArray.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;