From ea87d72ba9068d3e932edc1605a3e24a241d419f Mon Sep 17 00:00:00 2001 From: Andrew Hall Date: Wed, 10 Apr 2019 12:30:44 -0700 Subject: [PATCH] Write a better comment :) --- .../SyncNamespace/AbstractChangeNamespaceService.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Features/Core/Portable/CodeRefactorings/SyncNamespace/AbstractChangeNamespaceService.cs b/src/Features/Core/Portable/CodeRefactorings/SyncNamespace/AbstractChangeNamespaceService.cs index ea45c013ee3..f1d91c38e89 100644 --- a/src/Features/Core/Portable/CodeRefactorings/SyncNamespace/AbstractChangeNamespaceService.cs +++ b/src/Features/Core/Portable/CodeRefactorings/SyncNamespace/AbstractChangeNamespaceService.cs @@ -554,7 +554,9 @@ private static async Task> FindReferencesAsync( Debug.Assert(containersToAddImports.Length > 0); // Need to import all containing namespaces of old namespace and add them to the document (if it's not global namespace) - // as well as the new namespace in case it's needed + // Include the new namespace in case there are multiple namespace declarations in + // the declaring document. They may need a using statement added to correctly keep + // references to the type inside it's new namespace var namesToImport = GetAllNamespaceImportsForDeclaringDocument(oldNamespace, newNamespace); var optionSet = await document.GetOptionsAsync(cancellationToken).ConfigureAwait(false); -- GitLab