Skip to content

Commit b2ab298

Browse files
authored
Extensions: remove PROTOTYPE comments (#77836)
1 parent ed62fb1 commit b2ab298

File tree

52 files changed

+254
-254
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+254
-254
lines changed

src/Compilers/CSharp/CSharpAnalyzerDriver/CSharpDeclarationComputer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ private static void ComputeDeclarations(
102102
case SyntaxKind.StructDeclaration:
103103
case SyntaxKind.RecordDeclaration:
104104
case SyntaxKind.RecordStructDeclaration:
105-
// PROTOTYPE likely needs work for analyzers
105+
// Tracked by https://github.com/dotnet/roslyn/issues/76130 : likely needs work for analyzers
106106
{
107107
if (associatedSymbol is IMethodSymbol ctor)
108108
{

src/Compilers/CSharp/Portable/Binder/Binder_Conversions.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1467,7 +1467,7 @@ static ImmutableArray<MethodSymbol> filterOutBadGenericMethods(
14671467

14681468
if (!typeParameters.IsEmpty)
14691469
{
1470-
if (resolution.IsExtensionMethodGroup) // PROTOTYPE we need to handle new extension methods
1470+
if (resolution.IsExtensionMethodGroup) // Tracked by https://github.com/dotnet/roslyn/issues/76130 : we need to handle new extension methods
14711471
{
14721472
// We need to validate an ability to infer type arguments as well as check conversion to 'this' parameter.
14731473
// Overload resolution doesn't check the conversion when 'this' type refers to a type parameter
@@ -1518,7 +1518,7 @@ static ImmutableArray<MethodSymbol> filterOutBadGenericMethods(
15181518
parameterTypes,
15191519
parameterRefKinds,
15201520
ImmutableArray.Create<BoundExpression>(methodGroup.ReceiverOpt, new BoundValuePlaceholder(syntax, secondArgumentType) { WasCompilerGenerated = true }),
1521-
ref useSiteInfo); // PROTOTYPE we may need to override ordinals here
1521+
ref useSiteInfo); // Tracked by https://github.com/dotnet/roslyn/issues/76130 : we may need to override ordinals here
15221522

15231523
if (!inferenceResult.Success)
15241524
{
@@ -1601,7 +1601,7 @@ static bool bindInvocationExpressionContinued(
16011601
var methodResult = result.ValidResult;
16021602
var method = methodResult.Member;
16031603

1604-
// PROTOTYPE: It looks like we added a bunch of code in BindInvocationExpressionContinued at this position
1604+
// Tracked by https://github.com/dotnet/roslyn/issues/76130: It looks like we added a bunch of code in BindInvocationExpressionContinued at this position
16051605
// that specifically deals with new extension methods. It adjusts analyzedArguments, etc.
16061606
// It is very likely we need to do the same here.
16071607

@@ -1663,7 +1663,7 @@ internal static BoundExpression GetUnderlyingCollectionExpressionElement(BoundCo
16631663
// Add methods. This case can be hit for spreads and non-spread elements.
16641664
Debug.Assert(call.HasErrors);
16651665
Debug.Assert(call.Method.Name == "Add");
1666-
return call.Arguments[call.InvokedAsExtensionMethod ? 1 : 0]; // PROTOTYPE: Add test coverage for new extensions
1666+
return call.Arguments[call.InvokedAsExtensionMethod ? 1 : 0]; // Tracked by https://github.com/dotnet/roslyn/issues/76130: Add test coverage for new extensions
16671667
case BoundBadExpression badExpression:
16681668
Debug.Assert(false); // Add test if we hit this assert.
16691669
return badExpression;
@@ -1712,7 +1712,7 @@ internal bool TryGetCollectionIterationType(SyntaxNode syntax, TypeSymbol collec
17121712
out iterationType,
17131713
builder: out var builder);
17141714
// Collection expression target types require instance method GetEnumerator.
1715-
if (result && builder.ViaExtensionMethod) // PROTOTYPE: Add test coverage for new extensions
1715+
if (result && builder.ViaExtensionMethod) // Tracked by https://github.com/dotnet/roslyn/issues/76130: Add test coverage for new extensions
17161716
{
17171717
iterationType = default;
17181718
return false;

src/Compilers/CSharp/Portable/Binder/Binder_Deconstruct.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -683,7 +683,7 @@ private BoundExpression MakeDeconstructInvocationExpression(
683683
// This prevents, for example, an unused params parameter after the out parameters.
684684
var deconstructMethod = ((BoundCall)result).Method;
685685
var parameters = deconstructMethod.Parameters;
686-
for (int i = (deconstructMethod.IsExtensionMethod ? 1 : 0); i < parameters.Length; i++) // PROTOTYPE: Test this code path with new extensions
686+
for (int i = (deconstructMethod.IsExtensionMethod ? 1 : 0); i < parameters.Length; i++) // Tracked by https://github.com/dotnet/roslyn/issues/76130: Test this code path with new extensions
687687
{
688688
if (parameters[i].RefKind != RefKind.Out)
689689
{

src/Compilers/CSharp/Portable/Binder/Binder_Expressions.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3905,7 +3905,7 @@ private void CheckArgumentRefKind(RefKind argRefKind, BoundExpression argument,
39053905
}
39063906
else
39073907
{
3908-
// PROTOTYPE consider removing or adjusting the reported argument position
3908+
// Tracked by https://github.com/dotnet/roslyn/issues/76130 : consider removing or adjusting the reported argument position
39093909
var argNumber = invokedAsExtensionMethod ? arg : arg + 1;
39103910

39113911
// Warn for `ref`/`in` or None/`ref readonly` mismatch.
@@ -8016,7 +8016,7 @@ private BoundExpression MakeMemberAccessValue(BoundExpression expr, BindingDiagn
80168016
Debug.Assert(typeArgumentsOpt.IsDefault);
80178017
if (!receiver.HasErrors)
80188018
{
8019-
diagnostics.AddRange(resolution.Diagnostics); // PROTOTYPE test dependencies/diagnostics
8019+
diagnostics.AddRange(resolution.Diagnostics); // Tracked by https://github.com/dotnet/roslyn/issues/76130 : test dependencies/diagnostics
80208020
}
80218021

80228022
resolution.Free();
@@ -8045,7 +8045,7 @@ private BoundExpression GetExtensionMemberAccess(SyntaxNode syntax, BoundExpress
80458045
return BindPropertyAccess(syntax, receiver, propertySymbol, diagnostics, LookupResultKind.Viable, hasErrors: false);
80468046

80478047
case ExtendedErrorTypeSymbol errorTypeSymbol:
8048-
// PROTOTYPE we should likely reduce (ie. do type inference and substitute) the candidates (like ToBadExpression)
8048+
// Tracked by https://github.com/dotnet/roslyn/issues/76130 : we should likely reduce (ie. do type inference and substitute) the candidates (like ToBadExpression)
80498049
return new BoundBadExpression(syntax, LookupResultKind.Viable, errorTypeSymbol.CandidateSymbols!, [receiver], CreateErrorType());
80508050

80518051
default:
@@ -8629,7 +8629,7 @@ static bool tryResolveExtensionInScope(
86298629
// 3. resolve properties
86308630
Debug.Assert(arity == 0 || lookupResult.Symbols.All(s => s.Kind != SymbolKind.Property));
86318631

8632-
// PROTOTYPE: Regarding 'acceptOnlyMethods', consider if it would be better to add a special 'LookupOptions' value to filter out properties during lookup
8632+
// Tracked by https://github.com/dotnet/roslyn/issues/76130 : Regarding 'acceptOnlyMethods', consider if it would be better to add a special 'LookupOptions' value to filter out properties during lookup
86338633
OverloadResolutionResult<PropertySymbol>? propertyResult = arity != 0 || acceptOnlyMethods ? null : resolveProperties(left, lookupResult, binder, ref actualReceiverArguments, ref useSiteInfo);
86348634

86358635
// 4. determine member kind
@@ -8686,7 +8686,7 @@ static bool tryResolveExtensionInScope(
86868686

86878687
// ambiguous between multiple applicable properties
86888688
propertyResult.Free();
8689-
// PROTOTYPE consider using the property overload resolution result in the result to improve reported diagnostics
8689+
// Tracked by https://github.com/dotnet/roslyn/issues/76130 : consider using the property overload resolution result in the result to improve reported diagnostics
86908690
result = makeErrorResult(left.Type, memberName, arity, lookupResult, expression, diagnostics);
86918691
return true;
86928692
}
@@ -8816,7 +8816,7 @@ static MethodGroupResolution resolveMethods(
88168816

88178817
static MethodGroupResolution makeErrorResult(TypeSymbol receiverType, string memberName, int arity, LookupResult lookupResult, SyntaxNode expression, BindingDiagnosticBag diagnostics)
88188818
{
8819-
// PROTOTYPE we'll want to describe what went wrong in a useful way (see OverloadResolutionResult.ReportDiagnostics)
8819+
// Tracked by https://github.com/dotnet/roslyn/issues/76130 : we'll want to describe what went wrong in a useful way (see OverloadResolutionResult.ReportDiagnostics)
88208820
var errorInfo = new CSDiagnosticInfo(ErrorCode.ERR_ExtensionResolutionFailed, receiverType, memberName);
88218821
diagnostics.Add(errorInfo, expression.Location);
88228822
var resultSymbol = new ExtendedErrorTypeSymbol(containingSymbol: null, lookupResult.Symbols.ToImmutable(), LookupResultKind.OverloadResolutionFailure, errorInfo, arity);
@@ -10501,7 +10501,7 @@ void makeCall(SyntaxNode syntax, BoundExpression receiver, MethodSymbol method,
1050110501
indexerOrSliceAccess = BindMethodGroupInvocation(syntax, syntax, method.Name, boundMethodGroup, analyzedArguments,
1050210502
diagnostics, queryClause: null, ignoreNormalFormIfHasValidParamsParameter: true, anyApplicableCandidates: out bool _,
1050310503
disallowExpandedNonArrayParams: false,
10504-
acceptOnlyMethods: true).MakeCompilerGenerated(); // PROTOTYPE: Test effect of acceptOnlyMethods value
10504+
acceptOnlyMethods: true).MakeCompilerGenerated(); // Tracked by https://github.com/dotnet/roslyn/issues/76130 : Test effect of acceptOnlyMethods value
1050510505

1050610506
analyzedArguments.Free();
1050710507
}
@@ -10630,7 +10630,7 @@ internal MethodGroupResolution ResolveMethodGroup(
1063010630
return ResolveMethodGroup(
1063110631
node, node.Syntax, node.Name, analyzedArguments, ref useSiteInfo,
1063210632
options,
10633-
acceptOnlyMethods: true, // PROTOTYPE: Confirm this value is appropriate for all consumers of the enclosing method and test effect of this value for all of them
10633+
acceptOnlyMethods: true, // Tracked by https://github.com/dotnet/roslyn/issues/76130 : Confirm this value is appropriate for all consumers of the enclosing method and test effect of this value for all of them
1063410634
returnRefKind: returnRefKind, returnType: returnType,
1063510635
callingConventionInfo: callingConventionInfo);
1063610636
}

src/Compilers/CSharp/Portable/Binder/Binder_Invocation.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2398,7 +2398,7 @@ internal bool InvocableNameofInScope()
23982398
#nullable enable
23992399
private BoundFunctionPointerInvocation BindFunctionPointerInvocation(SyntaxNode node, BoundExpression boundExpression, AnalyzedArguments analyzedArguments, BindingDiagnosticBag diagnostics)
24002400
{
2401-
// PROTOTYPE this function will probably need an adjustment to deal with static extensions
2401+
// Tracked by https://github.com/dotnet/roslyn/issues/76130 : this function will probably need an adjustment to deal with static extensions
24022402
boundExpression = BindToNaturalType(boundExpression, diagnostics);
24032403
RoslynDebug.Assert(boundExpression.Type is FunctionPointerTypeSymbol);
24042404

src/Compilers/CSharp/Portable/Binder/Binder_Lookup.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ private static void LookupMembersInNamespace(LookupResult result, NamespaceSymbo
523523
}
524524
}
525525

526-
// PROTOTYPE we should be able to remove this method once all the callers are updated to account for new extension members
526+
// Tracked by https://github.com/dotnet/roslyn/issues/76130 : we should be able to remove this method once all the callers are updated to account for new extension members
527527
/// <summary>
528528
/// Lookup extension methods by name and arity in the given binder and
529529
/// check viability in this binder. The lookup is performed on a single

src/Compilers/CSharp/Portable/Binder/Binder_Patterns.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1058,7 +1058,7 @@ deconstructMethod is null &&
10581058
if (deconstructMethod is null)
10591059
hasErrors = true;
10601060

1061-
int skippedExtensionParameters = deconstructMethod?.IsExtensionMethod == true ? 1 : 0; // PROTOTYPE: Test this code path with new extensions
1061+
int skippedExtensionParameters = deconstructMethod?.IsExtensionMethod == true ? 1 : 0; // Tracked by https://github.com/dotnet/roslyn/issues/76130: Test this code path with new extensions
10621062
for (int i = 0; i < node.Subpatterns.Count; i++)
10631063
{
10641064
var subPattern = node.Subpatterns[i];

src/Compilers/CSharp/Portable/Binder/Binder_Query.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,7 @@ private void ReduceFrom(FromClauseSyntax from, QueryTranslationState state, Bind
676676

677677
private static BoundExpression? ExtractCastInvocation(BoundCall invocation)
678678
{
679-
int index = invocation.InvokedAsExtensionMethod ? 1 : 0; // PROTOTYPE: Add test coverage for his code path
679+
int index = invocation.InvokedAsExtensionMethod ? 1 : 0; // Tracked by https://github.com/dotnet/roslyn/issues/76130: Add test coverage for his code path
680680
var c1 = invocation.Arguments[index] as BoundConversion;
681681
var l1 = c1 != null ? c1.Operand as BoundLambda : null;
682682
var r1 = l1 != null ? l1.Body.Statements[0] as BoundReturnStatement : null;

src/Compilers/CSharp/Portable/Binder/Binder_QueryErrors.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ private static bool ReportQueryInferenceFailedSelectMany(FromClauseSyntax fromCl
215215
Debug.Assert(methodName == "SelectMany");
216216

217217
// Estimate the return type of Select's lambda argument
218-
BoundExpression arg = arguments.Argument(arguments.IncludesReceiverAsArgument ? 1 : 0); // PROTOTYPE test this code path for new extensions
218+
BoundExpression arg = arguments.Argument(arguments.IncludesReceiverAsArgument ? 1 : 0); // Tracked by https://github.com/dotnet/roslyn/issues/76130 : test this code path for new extensions
219219
TypeSymbol type = null;
220220
if (arg.Kind == BoundKind.UnboundLambda)
221221
{

src/Compilers/CSharp/Portable/Binder/Binder_Symbols.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1545,7 +1545,7 @@ private void CheckWhatCandidatesWeHave(
15451545
foreach (var scope in new ExtensionScopes(this))
15461546
{
15471547
lookupResult ??= LookupResult.GetInstance();
1548-
LookupExtensionMethods(lookupResult, scope, plainName, arity, ref useSiteInfo); // PROTOTYPE account for new extension members
1548+
LookupExtensionMethods(lookupResult, scope, plainName, arity, ref useSiteInfo); // Tracked by https://github.com/dotnet/roslyn/issues/76130 : account for new extension members
15491549

15501550
if (lookupResult.IsMultiViable)
15511551
{

0 commit comments

Comments
 (0)