From 84cb3275df5699b358b768f4b0e4827e4bed0548 Mon Sep 17 00:00:00 2001 From: Peter Waldschmidt Date: Thu, 23 Oct 2025 10:42:49 -0400 Subject: [PATCH 1/2] Add back old DocumentSpan constructor --- src/Features/Core/Portable/DocumentSpan.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Features/Core/Portable/DocumentSpan.cs b/src/Features/Core/Portable/DocumentSpan.cs index d91a5102bf79e..a264681fc7bbb 100644 --- a/src/Features/Core/Portable/DocumentSpan.cs +++ b/src/Features/Core/Portable/DocumentSpan.cs @@ -10,4 +10,10 @@ namespace Microsoft.CodeAnalysis; /// Represents a location in a . /// internal readonly record struct DocumentSpan( - Document Document, TextSpan SourceSpan, bool IsGeneratedCode = false); + Document Document, TextSpan SourceSpan, bool IsGeneratedCode) +{ + public DocumentSpan(Document document, TextSpan sourceSpan) + : this(document, sourceSpan, false) + { + } +} From 9a8dd5699f0f49ebb10e29f665fba649d7cf4fce Mon Sep 17 00:00:00 2001 From: Peter Waldschmidt Date: Thu, 23 Oct 2025 11:12:11 -0400 Subject: [PATCH 2/2] Update src/Features/Core/Portable/DocumentSpan.cs Co-authored-by: Cyrus Najmabadi --- src/Features/Core/Portable/DocumentSpan.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Features/Core/Portable/DocumentSpan.cs b/src/Features/Core/Portable/DocumentSpan.cs index a264681fc7bbb..7ead307d2c655 100644 --- a/src/Features/Core/Portable/DocumentSpan.cs +++ b/src/Features/Core/Portable/DocumentSpan.cs @@ -13,7 +13,7 @@ internal readonly record struct DocumentSpan( Document Document, TextSpan SourceSpan, bool IsGeneratedCode) { public DocumentSpan(Document document, TextSpan sourceSpan) - : this(document, sourceSpan, false) + : this(document, sourceSpan, IsGeneratedCode: false) { } }