Skip to content

Commit

Permalink
Fix two compilation constants for .NET 8 (dotnet#81775)
Browse files Browse the repository at this point in the history
  • Loading branch information
stephentoub authored Feb 7, 2023
1 parent 613da8d commit dce07a8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ private NamespaceDataBuilder SynthesizeNamespaceData(string fullName, NamespaceD
{
Debug.Assert(realChild.HasFullName);

#if NET8_OR_GREATER
#if NET8_0_OR_GREATER
int numberOfSegments = fullName.AsSpan().Count('.');
#else
int numberOfSegments = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public static (int, int) CountNewLines(ReadOnlySpan<byte> data)
{
newLines = 1;
data = data.Slice(0, lastLineFeedIndex);
#if NET8_OR_GREATER
#if NET8_0_OR_GREATER
newLines += data.Count(JsonConstants.LineFeed);
#else
int pos;
Expand Down

0 comments on commit dce07a8

Please sign in to comment.