Skip to content

Commit fc82d47

Browse files
committed
Seal private nested classes
1 parent 2b81d60 commit fc82d47

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/Build/ElementLocation/ElementLocation.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ internal static ElementLocation Create(string? file, int line, int column)
208208
/// <summary>
209209
/// Rarer variation for when the line and column won't each fit in a ushort.
210210
/// </summary>
211-
private class RegularElementLocation(string file, int line, int column) : ElementLocation
211+
private sealed class RegularElementLocation(string file, int line, int column) : ElementLocation
212212
{
213213
/// <inheritdoc />
214214
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
@@ -232,7 +232,7 @@ private class RegularElementLocation(string file, int line, int column) : Elemen
232232
/// A "very small" variation that used two bytes (or halves of a short) would fit about half of them
233233
/// and save 4 more bytes each, but the CLR packs each field to 4 bytes, so it isn't actually any smaller.
234234
/// </summary>
235-
private class SmallElementLocation : ElementLocation
235+
private sealed class SmallElementLocation : ElementLocation
236236
{
237237
/// <summary>
238238
/// Packs both the line and column values into a single four-byte element.

0 commit comments

Comments
 (0)