Skip to content

Commit 66b9922

Browse files
authored
Extensions: use specific tracking issues for different areas (second pass) (#78971)
1 parent d9a48df commit 66b9922

21 files changed

+59
-60
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ internal MethodInfo ReplaceWithExtensionImplementation(out bool wasError)
9393

9494
wasError = (Method is not null && method is null) || (SetMethod is not null && setMethod is null);
9595

96-
// Tracked by https://github.com/dotnet/roslyn/issues/76130 : Test with indexers (ie. "method") and in compound assignment (ie. "setMethod")
96+
// Tracked by https://github.com/dotnet/roslyn/issues/76130 : Test in compound assignment (ie. "setMethod")
9797
return new MethodInfo(symbol, method, setMethod);
9898

9999
static MethodSymbol? replace(MethodSymbol? method)

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

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

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

15271527
if (!inferenceResult.Success)
15281528
{
@@ -1605,7 +1605,7 @@ static bool bindInvocationExpressionContinued(
16051605
var methodResult = result.ValidResult;
16061606
var method = methodResult.Member;
16071607

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

@@ -1668,7 +1668,7 @@ internal static BoundExpression GetUnderlyingCollectionExpressionElement(BoundCo
16681668
// Add methods. This case can be hit for spreads and non-spread elements.
16691669
Debug.Assert(call.HasErrors);
16701670
Debug.Assert(call.Method.Name == "Add");
1671-
return call.Arguments[call.InvokedAsExtensionMethod ? 1 : 0]; // Tracked by https://github.com/dotnet/roslyn/issues/76130: Add test coverage for new extensions
1671+
return call.Arguments[call.InvokedAsExtensionMethod ? 1 : 0]; // Tracked by https://github.com/dotnet/roslyn/issues/78960: Add test coverage for new extensions
16721672
case BoundBadExpression badExpression:
16731673
Debug.Assert(false); // Add test if we hit this assert.
16741674
return badExpression;
@@ -1717,7 +1717,7 @@ internal bool TryGetCollectionIterationType(SyntaxNode syntax, TypeSymbol collec
17171717
out iterationType,
17181718
builder: out var builder);
17191719
// Collection expression target types require instance method GetEnumerator.
1720-
if (result && builder.ViaExtensionMethod) // Tracked by https://github.com/dotnet/roslyn/issues/76130: Add test coverage for new extensions
1720+
if (result && builder.ViaExtensionMethod) // Tracked by https://github.com/dotnet/roslyn/issues/78960: Add test coverage for new extensions
17211721
{
17221722
iterationType = default;
17231723
return false;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ private ImmutableArray<Symbol> BindIndexerMemberCref(IndexerMemberCrefSyntax syn
222222

223223
private ImmutableArray<Symbol> BindExtensionMemberCref(ExtensionMemberCrefSyntax syntax, NamespaceOrTypeSymbol? containerOpt, out Symbol? ambiguityWinner, BindingDiagnosticBag diagnostics)
224224
{
225-
// Tracked by https://github.com/dotnet/roslyn/issues/76130 : handle extension operators
225+
// Tracked by https://github.com/dotnet/roslyn/issues/78967 : cref, handle extension operators
226226
CheckFeatureAvailability(syntax, MessageID.IDS_FeatureExtensions, diagnostics);
227227

228228
if (containerOpt is not NamedTypeSymbol namedContainer)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8046,7 +8046,7 @@ private BoundExpression GetExtensionMemberAccess(SyntaxNode syntax, BoundExpress
80468046
return BindPropertyAccess(syntax, receiver, propertySymbol, diagnostics, LookupResultKind.Viable, hasErrors: false);
80478047

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

80528052
default:

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ private BoundInterpolatedString BindUnconvertedInterpolatedExpressionToFactory(
339339
SyntaxNode syntax = unconvertedSource.Syntax;
340340
ImmutableArray<BoundExpression> expressions = makeInterpolatedStringFactoryArguments(syntax, parts, diagnostics);
341341

342-
BoundExpression construction = MakeInvocationExpression( // Tracked by https://github.com/dotnet/roslyn/issues/76130 : test this scenario with a delegate-returning property (should be blocked by virtue of allowFieldsAndProperties: false)
342+
BoundExpression construction = MakeInvocationExpression( // Tracked by https://github.com/dotnet/roslyn/issues/78965 : interpolated string, test this scenario with a delegate-returning property (should be blocked by virtue of allowFieldsAndProperties: false)
343343
syntax,
344344
new BoundTypeExpression(syntax, null, factoryType) { WasCompilerGenerated = true },
345345
factoryMethod,

src/Compilers/CSharp/Portable/CodeGen/EmitExpression.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3565,7 +3565,7 @@ private void EmitParameterIdExpression(BoundParameterId node)
35653565

35663566
if (node.HoistedField is null)
35673567
{
3568-
_builder.EmitIntConstant(node.Parameter.Ordinal); // Tracked by https://github.com/dotnet/roslyn/issues/76130 : Follow up
3568+
_builder.EmitIntConstant(node.Parameter.Ordinal); // Tracked by https://github.com/dotnet/roslyn/issues/78963 : Follow up
35693569
}
35703570
else
35713571
{

src/Compilers/CSharp/Portable/Compilation/CSharpSemanticModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3371,7 +3371,7 @@ private OneOrMany<Symbol> GetSemanticSymbols(
33713371
case BoundKind.PropertyGroup:
33723372
symbols = GetPropertyGroupSemanticSymbols((BoundPropertyGroup)boundNode, boundNodeForSyntacticParent, binderOpt, out resultKind, out memberGroup);
33733373
break;
3374-
// Tracked by https://github.com/dotnet/roslyn/issues/76130 : handle BoundPropertyAccess (which now may have a member group)
3374+
// Tracked by https://github.com/dotnet/roslyn/issues/78957 : public API, consider handling BoundPropertyAccess (which now may have a member group)
33753375

33763376
case BoundKind.BadExpression:
33773377
{

src/Compilers/CSharp/Portable/Lowering/ExtensionMethodReferenceRewriter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ method.OriginalDefinition is ErrorMethodSymbol ||
190190
public override BoundNode? VisitMethodDefIndex(BoundMethodDefIndex node)
191191
{
192192
MethodSymbol method = node.Method;
193-
Debug.Assert(method.IsDefinition); // Tracked by https://github.com/dotnet/roslyn/issues/76130 : From the code coverage and other instrumentations perspective, should we remap the index to the implementation symbol?
193+
Debug.Assert(method.IsDefinition); // Tracked by https://github.com/dotnet/roslyn/issues/78962 : From the code coverage and other instrumentations perspective, should we remap the index to the implementation symbol?
194194
TypeSymbol? type = this.VisitType(node.Type);
195195
return node.Update(method, type);
196196
}

src/Compilers/CSharp/Portable/SymbolDisplay/SymbolDisplayVisitor.Types.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ private void AddNameAndTypeArgumentsOrParameters(INamedTypeSymbol symbol)
345345
{
346346
if (Format.CompilerInternalOptions.HasFlag(SymbolDisplayCompilerInternalOptions.UseMetadataMemberNames))
347347
{
348-
var extensionIdentifier = underlyingTypeSymbol!.ExtensionName; // Tracked by https://github.com/dotnet/roslyn/issues/76130 : use public API once it's available
348+
var extensionIdentifier = underlyingTypeSymbol!.ExtensionName; // Tracked by https://github.com/dotnet/roslyn/issues/78957 : public API, use public API once it's available
349349
Builder.Add(CreatePart(SymbolDisplayPartKind.ClassName, symbol, extensionIdentifier));
350350
}
351351
else

src/Compilers/CSharp/Portable/Symbols/Extensions/RewrittenMethodSymbol.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ protected RewrittenMethodSymbol(MethodSymbol originalMethod, TypeMap typeMap, Im
2121
Debug.Assert(originalMethod.ExplicitInterfaceImplementations.IsEmpty);
2222

2323
_originalMethod = originalMethod;
24-
// Tracked by https://github.com/dotnet/roslyn/issues/76130 : Are we creating type parameters with the right emit behavior? Attributes, etc.
24+
// Tracked by https://github.com/dotnet/roslyn/issues/78963 : Are we creating type parameters with the right emit behavior? Attributes, etc.
2525
_typeMap = typeMap.WithAlphaRename(typeParametersToAlphaRename, this, out _typeParameters);
2626
}
2727

0 commit comments

Comments
 (0)