From 4a6a34f5c1a2286c82b07c825a62365469475a2f Mon Sep 17 00:00:00 2001 From: Rikki Gibson Date: Wed, 29 May 2024 11:17:26 -0700 Subject: [PATCH] reference issue --- .../Nullable/CSharpDeclareAsNullableCodeFixProvider.cs | 2 +- .../CSharp/Portable/FlowAnalysis/NullableWalker.Variables.cs | 2 +- src/Compilers/CSharp/Portable/FlowAnalysis/NullableWalker.cs | 2 +- .../AnalyzerManager.AnalyzerExecutionContext.cs | 2 +- .../Portable/DiagnosticAnalyzer/CompilationWithAnalyzers.cs | 2 +- .../Core/Portable/Emit/EditAndContinue/SymbolChanges.cs | 2 +- src/Compilers/Core/Portable/Emit/SemanticEdit.cs | 2 +- .../CSharpTest/SymbolKey/SymbolKeyCompilationsTests.cs | 2 +- .../Portable/NavigationBar/CSharpNavigationBarItemService.cs | 2 +- .../Providers/AbstractPartialMethodCompletionProvider.cs | 2 +- .../Core/Portable/Debugging/AbstractBreakpointResolver.cs | 2 +- .../Portable/EditAndContinue/AbstractEditAndContinueAnalyzer.cs | 2 +- .../Core/Portable/EditAndContinue/Utilities/Extensions.cs | 2 +- .../EditAndContinue/EditAndContinueTestVerifier.cs | 2 +- .../Portable/Rename/CSharpRenameRewriterLanguageService.cs | 2 +- .../FindReferences/Finders/OrdinaryMethodReferenceFinder.cs | 2 +- .../FindReferences/Finders/ParameterSymbolReferenceFinder.cs | 2 +- .../Rename/ConflictEngine/DeclarationConflictHelpers.cs | 2 +- 18 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/Analyzers/CSharp/CodeFixes/Nullable/CSharpDeclareAsNullableCodeFixProvider.cs b/src/Analyzers/CSharp/CodeFixes/Nullable/CSharpDeclareAsNullableCodeFixProvider.cs index be4e99b00f398..6882dc66da3d5 100644 --- a/src/Analyzers/CSharp/CodeFixes/Nullable/CSharpDeclareAsNullableCodeFixProvider.cs +++ b/src/Analyzers/CSharp/CodeFixes/Nullable/CSharpDeclareAsNullableCodeFixProvider.cs @@ -234,7 +234,7 @@ SyntaxKind.IndexerDeclaration or var symbol = model.GetSymbolInfo(invocation.Expression, cancellationToken).Symbol; if (symbol is not IMethodSymbol method || method.PartialImplementationPart is not null) { - // PROTOTYPE(partial-properties): should we also bail out on a partial property? + // https://github.com/dotnet/roslyn/issues/73772: should we also bail out on a partial property? // We don't handle partial methods yet return null; } diff --git a/src/Compilers/CSharp/Portable/FlowAnalysis/NullableWalker.Variables.cs b/src/Compilers/CSharp/Portable/FlowAnalysis/NullableWalker.Variables.cs index 0706f0e642de9..dd3ed1448840d 100644 --- a/src/Compilers/CSharp/Portable/FlowAnalysis/NullableWalker.Variables.cs +++ b/src/Compilers/CSharp/Portable/FlowAnalysis/NullableWalker.Variables.cs @@ -396,7 +396,7 @@ internal Variables GetRootScope() internal Variables? GetVariablesForMethodScope(MethodSymbol method) { - // PROTOTYPE(partial-properties): is this needed if we also delete the weird cascading in EnterParameters? + // https://github.com/dotnet/roslyn/issues/73772: is this needed if we also delete the weird cascading in EnterParameters? method = method.PartialImplementationPart ?? method; var variables = this; while (true) diff --git a/src/Compilers/CSharp/Portable/FlowAnalysis/NullableWalker.cs b/src/Compilers/CSharp/Portable/FlowAnalysis/NullableWalker.cs index db60c698c4a7a..faf378f8cfdaa 100644 --- a/src/Compilers/CSharp/Portable/FlowAnalysis/NullableWalker.cs +++ b/src/Compilers/CSharp/Portable/FlowAnalysis/NullableWalker.cs @@ -2764,7 +2764,7 @@ private void EnterParameters() } // The partial definition part may include optional parameters whose default values we want to simulate assigning at the beginning of the method - // PROTOTYPE(partial-properties): is this actually used/meaningful? + // https://github.com/dotnet/roslyn/issues/73772: is this actually used/meaningful? methodSymbol = methodSymbol.PartialDefinitionPart ?? methodSymbol; var methodParameters = methodSymbol.Parameters; diff --git a/src/Compilers/Core/Portable/DiagnosticAnalyzer/AnalyzerManager.AnalyzerExecutionContext.cs b/src/Compilers/Core/Portable/DiagnosticAnalyzer/AnalyzerManager.AnalyzerExecutionContext.cs index d184cc0453425..40acf22276ee5 100644 --- a/src/Compilers/Core/Portable/DiagnosticAnalyzer/AnalyzerManager.AnalyzerExecutionContext.cs +++ b/src/Compilers/Core/Portable/DiagnosticAnalyzer/AnalyzerManager.AnalyzerExecutionContext.cs @@ -204,7 +204,7 @@ void processMembers(IEnumerable members) memberSet.Add(member); // Ensure that we include symbols for both parts of partial methods. - // PROTOTYPE(partial-properties): also cascade to partial property implementation part + // https://github.com/dotnet/roslyn/issues/73772: also cascade to partial property implementation part if (member is IMethodSymbol method && !(method.PartialImplementationPart is null)) { diff --git a/src/Compilers/Core/Portable/DiagnosticAnalyzer/CompilationWithAnalyzers.cs b/src/Compilers/Core/Portable/DiagnosticAnalyzer/CompilationWithAnalyzers.cs index 786f7db40df5e..a23c7ef140d3f 100644 --- a/src/Compilers/Core/Portable/DiagnosticAnalyzer/CompilationWithAnalyzers.cs +++ b/src/Compilers/Core/Portable/DiagnosticAnalyzer/CompilationWithAnalyzers.cs @@ -1118,7 +1118,7 @@ static bool shouldIncludeSymbol(ISymbolInternal symbol, SyntaxTree tree, Cancell } } - // PROTOTYPE(partial-properties): should we also check IPropertySymbol? + // https://github.com/dotnet/roslyn/issues/73772: should we also check IPropertySymbol? // there is no interface IPropertySymbolInternal // where are tests for this? diff --git a/src/Compilers/Core/Portable/Emit/EditAndContinue/SymbolChanges.cs b/src/Compilers/Core/Portable/Emit/EditAndContinue/SymbolChanges.cs index f6414229ef600..89c2cf1fd101a 100644 --- a/src/Compilers/Core/Portable/Emit/EditAndContinue/SymbolChanges.cs +++ b/src/Compilers/Core/Portable/Emit/EditAndContinue/SymbolChanges.cs @@ -414,7 +414,7 @@ private void CalculateChanges( // Partial methods are supplied as implementations but recorded // internally as definitions since definitions are used in emit. - // PROTOTYPE(partial-properties): should we also make sure to use the definition for a partial property? + // https://github.com/dotnet/roslyn/issues/73772: should we also make sure to use the definition for a partial property? if (newMember.Kind == SymbolKind.Method) { var newMethod = (IMethodSymbolInternal)newMember; diff --git a/src/Compilers/Core/Portable/Emit/SemanticEdit.cs b/src/Compilers/Core/Portable/Emit/SemanticEdit.cs index 7e42853286335..14cec150ebc50 100644 --- a/src/Compilers/Core/Portable/Emit/SemanticEdit.cs +++ b/src/Compilers/Core/Portable/Emit/SemanticEdit.cs @@ -142,7 +142,7 @@ public SemanticEdit(SemanticEditKind kind, ISymbol? oldSymbol, ISymbol? newSymbo } } - // PROTOTYPE(partial-properties): should we also do this check for partial properties? + // https://github.com/dotnet/roslyn/issues/73772: should we also do this check for partial properties? if (oldSymbol is IMethodSymbol { PartialImplementationPart: not null }) { throw new ArgumentException("Partial method implementation required", nameof(oldSymbol)); diff --git a/src/EditorFeatures/CSharpTest/SymbolKey/SymbolKeyCompilationsTests.cs b/src/EditorFeatures/CSharpTest/SymbolKey/SymbolKeyCompilationsTests.cs index f05e5082b940c..06f701c10e9c4 100644 --- a/src/EditorFeatures/CSharpTest/SymbolKey/SymbolKeyCompilationsTests.cs +++ b/src/EditorFeatures/CSharpTest/SymbolKey/SymbolKeyCompilationsTests.cs @@ -160,7 +160,7 @@ public partial void M() { } var implementation = definition.PartialImplementationPart; // Assert that both the definition and implementation resolve back to themselves - // PROTOTYPE(partial-properties): add a similar test for properties + // https://github.com/dotnet/roslyn/issues/73772: add a similar test for properties Assert.Equal(definition, ResolveSymbol(definition, comp, SymbolKeyComparison.None)); Assert.Equal(implementation, ResolveSymbol(implementation, comp, SymbolKeyComparison.None)); } diff --git a/src/Features/CSharp/Portable/NavigationBar/CSharpNavigationBarItemService.cs b/src/Features/CSharp/Portable/NavigationBar/CSharpNavigationBarItemService.cs index 777ad42c7f595..2b27f273ca219 100644 --- a/src/Features/CSharp/Portable/NavigationBar/CSharpNavigationBarItemService.cs +++ b/src/Features/CSharp/Portable/NavigationBar/CSharpNavigationBarItemService.cs @@ -73,7 +73,7 @@ private static ImmutableArray GetMembersInTypes( continue; } - // PROTOTYPE(partial-properties): also do this for properties? + // https://github.com/dotnet/roslyn/issues/73772: also do this for properties? var method = member as IMethodSymbol; if (method != null && method.PartialImplementationPart != null) { diff --git a/src/Features/Core/Portable/Completion/Providers/AbstractPartialMethodCompletionProvider.cs b/src/Features/Core/Portable/Completion/Providers/AbstractPartialMethodCompletionProvider.cs index a932d616736a5..0a8c4d8bc85f9 100644 --- a/src/Features/Core/Portable/Completion/Providers/AbstractPartialMethodCompletionProvider.cs +++ b/src/Features/Core/Portable/Completion/Providers/AbstractPartialMethodCompletionProvider.cs @@ -90,7 +90,7 @@ protected override async Task GenerateMemberAsync(ISymbol member, IName if (enclosingSymbol.TypeKind is not (TypeKind.Struct or TypeKind.Class)) return null; - // PROTOTYPE(partial-properties): should we also get partial property symbols here? + // https://github.com/dotnet/roslyn/issues/73772: should we also get partial property symbols here? var symbols = semanticModel.LookupSymbols(position, container: enclosingSymbol) .OfType() .Where(m => IsPartial(m) && m.PartialImplementationPart == null); diff --git a/src/Features/Core/Portable/Debugging/AbstractBreakpointResolver.cs b/src/Features/Core/Portable/Debugging/AbstractBreakpointResolver.cs index 1770938958278..15c1e9378350f 100644 --- a/src/Features/Core/Portable/Debugging/AbstractBreakpointResolver.cs +++ b/src/Features/Core/Portable/Debugging/AbstractBreakpointResolver.cs @@ -227,7 +227,7 @@ private async Task> GetAllTypesAsync(CancellationT return namespaces.GetAllTypes(cancellationToken); } - // PROTOTYPE(partial-properties): also do this for properties? + // https://github.com/dotnet/roslyn/issues/73772: also do this for properties? private static IMethodSymbol GetPartialImplementationPartOrNull(ISymbol symbol) => (symbol.Kind == SymbolKind.Method) ? ((IMethodSymbol)symbol).PartialImplementationPart : null; diff --git a/src/Features/Core/Portable/EditAndContinue/AbstractEditAndContinueAnalyzer.cs b/src/Features/Core/Portable/EditAndContinue/AbstractEditAndContinueAnalyzer.cs index 34954de3fa2bc..e84ff37a50ebf 100644 --- a/src/Features/Core/Portable/EditAndContinue/AbstractEditAndContinueAnalyzer.cs +++ b/src/Features/Core/Portable/EditAndContinue/AbstractEditAndContinueAnalyzer.cs @@ -3185,7 +3185,7 @@ IFieldSymbol or // The partial type needs to be specified in the following cases: // 1) partial method is updated (in case both implementation and definition are updated) // 2) partial type is updated - // PROTOTYPE(partial-properties): do we also need to check IPropertySymbol.PartialDefinitionPart here? + // https://github.com/dotnet/roslyn/issues/73772: do we also need to check IPropertySymbol.PartialDefinitionPart here? var partialType = editKind == SemanticEditKind.Update && symbol is IMethodSymbol { PartialDefinitionPart: not null } ? symbolCache.GetKey(symbol.ContainingType, cancellationToken) : IsPartialTypeEdit(oldSymbol, newSymbol, oldTree, newTree) diff --git a/src/Features/Core/Portable/EditAndContinue/Utilities/Extensions.cs b/src/Features/Core/Portable/EditAndContinue/Utilities/Extensions.cs index a883145ba013d..0d2226145bc2a 100644 --- a/src/Features/Core/Portable/EditAndContinue/Utilities/Extensions.cs +++ b/src/Features/Core/Portable/EditAndContinue/Utilities/Extensions.cs @@ -183,7 +183,7 @@ private static bool ParsePrimaryParameterBackingFieldName(string fieldName, [Not => (IMethodSymbol?)constructor.ContainingType.GetMembers(WellKnownMemberNames.DeconstructMethodName).FirstOrDefault( static (symbol, constructor) => symbol is IMethodSymbol method && HasDeconstructorSignature(method, constructor), constructor)?.PartialAsImplementation(); - // PROTOTYPE(partial-properties): does this helper need to be updated to use IPropertySymbol.PartialImplementationPart? + // https://github.com/dotnet/roslyn/issues/73772: does this helper need to be updated to use IPropertySymbol.PartialImplementationPart? public static ISymbol PartialAsImplementation(this ISymbol symbol) => symbol is IMethodSymbol { PartialImplementationPart: { } impl } ? impl : symbol; diff --git a/src/Features/TestUtilities/EditAndContinue/EditAndContinueTestVerifier.cs b/src/Features/TestUtilities/EditAndContinue/EditAndContinueTestVerifier.cs index 9bcbe6ea0965f..cf39e98564710 100644 --- a/src/Features/TestUtilities/EditAndContinue/EditAndContinueTestVerifier.cs +++ b/src/Features/TestUtilities/EditAndContinue/EditAndContinueTestVerifier.cs @@ -322,7 +322,7 @@ SymbolKey CreateSymbolKey(SemanticEditDescription edit) // Symbol key will happily resolve to a definition part that has no implementation, so we validate that // differently - // PROTOTYPE(partial-properties): what about deletion of partial property? + // https://github.com/dotnet/roslyn/issues/73772: what about deletion of partial property? if (expectedOldSymbol is IMethodSymbol { IsPartialDefinition: true } && symbolKey.Resolve(oldCompilation, ignoreAssemblyKey: true).Symbol is IMethodSymbol resolvedMethod) { diff --git a/src/Workspaces/CSharp/Portable/Rename/CSharpRenameRewriterLanguageService.cs b/src/Workspaces/CSharp/Portable/Rename/CSharpRenameRewriterLanguageService.cs index 5b95a5a37598e..a951ce51ed923 100644 --- a/src/Workspaces/CSharp/Portable/Rename/CSharpRenameRewriterLanguageService.cs +++ b/src/Workspaces/CSharp/Portable/Rename/CSharpRenameRewriterLanguageService.cs @@ -826,7 +826,7 @@ SymbolKind.Local or // If this is a parameter symbol for a partial method definition, be sure we visited // the implementation part's body. - // PROTOTYPE(partial-properties): also do this for properties + // https://github.com/dotnet/roslyn/issues/73772: also do this for properties if (renamedSymbol is IParameterSymbol renamedParameterSymbol && renamedSymbol.ContainingSymbol is IMethodSymbol methodSymbol && methodSymbol.PartialImplementationPart != null) diff --git a/src/Workspaces/Core/Portable/FindSymbols/FindReferences/Finders/OrdinaryMethodReferenceFinder.cs b/src/Workspaces/Core/Portable/FindSymbols/FindReferences/Finders/OrdinaryMethodReferenceFinder.cs index 9b1ebed7e10af..6813b72dd61ba 100644 --- a/src/Workspaces/Core/Portable/FindSymbols/FindReferences/Finders/OrdinaryMethodReferenceFinder.cs +++ b/src/Workspaces/Core/Portable/FindSymbols/FindReferences/Finders/OrdinaryMethodReferenceFinder.cs @@ -34,7 +34,7 @@ protected override ValueTask> DetermineCascadedSymbolsAs private static ImmutableArray GetOtherPartsOfPartial(IMethodSymbol symbol) { - // PROTOTYPE(partial-properties): define/use a similar helper for PropertySymbolReferenceFinder+PropertyAccessorSymbolReferenceFinder? + // https://github.com/dotnet/roslyn/issues/73772: define/use a similar helper for PropertySymbolReferenceFinder+PropertyAccessorSymbolReferenceFinder? if (symbol.PartialDefinitionPart != null) return [symbol.PartialDefinitionPart]; diff --git a/src/Workspaces/Core/Portable/FindSymbols/FindReferences/Finders/ParameterSymbolReferenceFinder.cs b/src/Workspaces/Core/Portable/FindSymbols/FindReferences/Finders/ParameterSymbolReferenceFinder.cs index 022e2ce5a131f..93978ac446a97 100644 --- a/src/Workspaces/Core/Portable/FindSymbols/FindReferences/Finders/ParameterSymbolReferenceFinder.cs +++ b/src/Workspaces/Core/Portable/FindSymbols/FindReferences/Finders/ParameterSymbolReferenceFinder.cs @@ -241,7 +241,7 @@ private static void CascadeBetweenPartialMethodParameters( IParameterSymbol parameter, ArrayBuilder results) { - // PROTOTYPE(partial-properties): also cascade partial indexer parameters + // https://github.com/dotnet/roslyn/issues/73772: also cascade partial indexer parameters if (parameter.ContainingSymbol is IMethodSymbol method) { var ordinal = parameter.Ordinal; diff --git a/src/Workspaces/Core/Portable/Rename/ConflictEngine/DeclarationConflictHelpers.cs b/src/Workspaces/Core/Portable/Rename/ConflictEngine/DeclarationConflictHelpers.cs index 7c6a90c72b4aa..7e17a0ca24a75 100644 --- a/src/Workspaces/Core/Portable/Rename/ConflictEngine/DeclarationConflictHelpers.cs +++ b/src/Workspaces/Core/Portable/Rename/ConflictEngine/DeclarationConflictHelpers.cs @@ -55,7 +55,7 @@ private static ImmutableArray GetConflictLocations(ISymbol renamedMemb { if (signatureToConflictingMember.TryGetValue(signature, out var conflictingSymbol)) { - // PROTOTYPE(partial-properties): add other partial property part as conflicting symbol + // https://github.com/dotnet/roslyn/issues/73772: add other partial property part as conflicting symbol if (isMethod && conflictingSymbol is IMethodSymbol conflictingMethod && renamedMember is IMethodSymbol renamedMethod) { if (!(conflictingMethod.PartialDefinitionPart != null && Equals(conflictingMethod.PartialDefinitionPart, renamedMethod)) &&