From eeae65e2845ac1b8fc1142dd99a3f21d9bdc992b Mon Sep 17 00:00:00 2001 From: Michael Simons Date: Thu, 2 May 2024 18:16:57 -0500 Subject: [PATCH] Expanding roslyn patch to address all issues (#19651) --- .../roslyn/0001-ambiguous-call-site.patch | 33 ++++++++++++++++--- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/src/SourceBuild/patches/roslyn/0001-ambiguous-call-site.patch b/src/SourceBuild/patches/roslyn/0001-ambiguous-call-site.patch index 85ed8034b..ed342cd31 100644 --- a/src/SourceBuild/patches/roslyn/0001-ambiguous-call-site.patch +++ b/src/SourceBuild/patches/roslyn/0001-ambiguous-call-site.patch @@ -1,12 +1,35 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Viktor Hofer -Date: Thu, 2 May 2024 17:22:41 +0000 +From: Michael Simons +Date: Thu, 2 May 2024 21:52:54 +0000 Subject: [PATCH] Avoid ambiguous call site --- - .../Workspace/Core/CodeGeneration/CodeGenerationHelpers.cs | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + .../GenerateType/AbstractGenerateTypeService.Editor.cs | 4 ++-- + .../Workspace/Core/CodeGeneration/CodeGenerationHelpers.cs | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) +diff --git a/src/Features/Core/Portable/GenerateType/AbstractGenerateTypeService.Editor.cs b/src/Features/Core/Portable/GenerateType/AbstractGenerateTypeService.Editor.cs +index 8adaaeda551..b099e092c7b 100644 +--- a/src/Features/Core/Portable/GenerateType/AbstractGenerateTypeService.Editor.cs ++++ b/src/Features/Core/Portable/GenerateType/AbstractGenerateTypeService.Editor.cs +@@ -525,7 +525,7 @@ private async Task> GetGenerateIntoContainin + AddFoldersToNamespaceContainers(containerList, folders); + + containers = [.. containerList]; +- includeUsingsOrImports = string.Join(".", [.. containerList]); ++ includeUsingsOrImports = string.Join(".", containerList); + } + + // Case 4 : If the type is generated into the same VB project or +@@ -539,7 +539,7 @@ private async Task> GetGenerateIntoContainin + // Populate the ContainerList + AddFoldersToNamespaceContainers(containerList, folders); + containers = [.. containerList]; +- includeUsingsOrImports = string.Join(".", [.. containerList]); ++ includeUsingsOrImports = string.Join(".", containerList); + if (!string.IsNullOrWhiteSpace(rootNamespaceOfTheProjectGeneratedInto)) + { + includeUsingsOrImports = string.IsNullOrEmpty(includeUsingsOrImports) diff --git a/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/Core/CodeGeneration/CodeGenerationHelpers.cs b/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/Core/CodeGeneration/CodeGenerationHelpers.cs index 3839eb370eb..8d272db6b1b 100644 --- a/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/Core/CodeGeneration/CodeGenerationHelpers.cs @@ -14,7 +37,7 @@ index 3839eb370eb..8d272db6b1b 100644 @@ -71,7 +71,7 @@ internal static class CodeGenerationHelpers break; } - + - name = string.Join(".", [.. names]); + name = string.Join(".", names); }