Skip to content

Commit

Permalink
Seal private nested classes
Browse files Browse the repository at this point in the history
  • Loading branch information
drewnoakes committed Apr 18, 2024
1 parent 73caf13 commit 92e2897
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Build/ElementLocation/ElementLocation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ internal static ElementLocation Create(string? file, int line, int column)
/// <summary>
/// Rarer variation for when the line and column won't each fit in a ushort.
/// </summary>
private class RegularElementLocation(string file, int line, int column) : ElementLocation
private sealed class RegularElementLocation(string file, int line, int column) : ElementLocation
{
/// <inheritdoc />
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
Expand All @@ -233,7 +233,7 @@ private class RegularElementLocation(string file, int line, int column) : Elemen
/// A "very small" variation that used two bytes (or halves of a short) would fit about half of them
/// and save 4 more bytes each, but the CLR packs each field to 4 bytes, so it isn't actually any smaller.
/// </summary>
private class SmallElementLocation : ElementLocation
private sealed class SmallElementLocation : ElementLocation
{
/// <summary>
/// Packs both the line and column values into a single four-byte element.
Expand Down

0 comments on commit 92e2897

Please sign in to comment.