-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Description
Test plan: #73090
Issue referenced in source
IDE
roslyn/src/Analyzers/CSharp/CodeFixes/Nullable/CSharpDeclareAsNullableCodeFixProvider.cs
Lines 234 to 240 in f242061
| var symbol = model.GetSymbolInfo(invocation.Expression, cancellationToken).Symbol; | |
| if (symbol is not IMethodSymbol method || method.PartialImplementationPart is not null) | |
| { | |
| // 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; | |
| } |
roslyn/src/Features/Core/Portable/Completion/Providers/AbstractPartialMethodCompletionProvider.cs
Lines 93 to 96 in f242061
| // https://github.com/dotnet/roslyn/issues/73772: should we also get partial property symbols here? | |
| var symbols = semanticModel.LookupSymbols(position, container: enclosingSymbol) | |
| .OfType<IMethodSymbol>() | |
| .Where(m => IsPartial(m) && m.PartialImplementationPart == null); |
roslyn/src/Workspaces/CSharp/Portable/Rename/CSharpRenameRewriterLanguageService.cs
Lines 827 to 833 in f242061
| // If this is a parameter symbol for a partial method definition, be sure we visited | |
| // the implementation part's body. | |
| // 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) | |
| { |
roslyn/src/Workspaces/Core/Portable/Rename/ConflictEngine/DeclarationConflictHelpers.cs
Lines 58 to 66 in f242061
| // 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)) && | |
| !(conflictingMethod.PartialImplementationPart != null && Equals(conflictingMethod.PartialImplementationPart, renamedMethod))) | |
| { | |
| builder.AddRange(conflictingSymbol.Locations); | |
| } | |
| } |
Lines 37 to 42 in f242061
| // https://github.com/dotnet/roslyn/issues/73772: define/use a similar helper for PropertySymbolReferenceFinder+PropertyAccessorSymbolReferenceFinder? | |
| if (symbol.PartialDefinitionPart != null) | |
| return [symbol.PartialDefinitionPart]; | |
| if (symbol.PartialImplementationPart != null) | |
| return [symbol.PartialImplementationPart]; |
Lines 244 to 253 in f242061
| // https://github.com/dotnet/roslyn/issues/73772: also cascade partial indexer parameters | |
| if (parameter.ContainingSymbol is IMethodSymbol method) | |
| { | |
| var ordinal = parameter.Ordinal; | |
| if (ordinal < method.PartialDefinitionPart?.Parameters.Length) | |
| results.Add(method.PartialDefinitionPart.Parameters[ordinal]); | |
| if (ordinal < method.PartialImplementationPart?.Parameters.Length) | |
| results.Add(method.PartialImplementationPart.Parameters[ordinal]); | |
| } |