Skip to content

Commit e9edd32

Browse files
committed
Change SemanticVersion's PreReleaseTag and BuildMetaData to a non-nullable type
To avoid warning CS8602: Dereference of a possibly null reference.
1 parent 4d510b2 commit e9edd32

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/GitVersion.Core/VersionCalculation/SemanticVersioning/SemanticVersion.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ public class SemanticVersion : IFormattable, IComparable<SemanticVersion>, IEqua
2121
public long Major;
2222
public long Minor;
2323
public long Patch;
24-
public SemanticVersionPreReleaseTag? PreReleaseTag;
25-
public SemanticVersionBuildMetaData? BuildMetaData;
24+
public SemanticVersionPreReleaseTag PreReleaseTag;
25+
public SemanticVersionBuildMetaData BuildMetaData;
2626

2727
public bool HasPreReleaseTagWithLabel => PreReleaseTag?.HasTag() == true;
2828

0 commit comments

Comments
 (0)