Mark DebugTools.AssertNotNull as [NotNull]

This means C# nullable analysis actually recognizes it.
This commit is contained in:
PJB3005
2026-01-18 02:42:14 +01:00
parent 627856e207
commit a417a8fd99
2 changed files with 4 additions and 2 deletions

View File

@@ -47,7 +47,7 @@ END TEMPLATE-->
### Other
*None yet*
* `DebugTools.AssertNotNull()` has been marked with `[NotNull]`, making C# nullable analysis recognize it.
### Internal

View File

@@ -223,7 +223,9 @@ namespace Robust.Shared.Utility
/// <param name="message">Exception message.</param>
[Conditional("DEBUG")]
[AssertionMethod]
public static void AssertNotNull([AssertionCondition(AssertionConditionType.IS_NOT_NULL)]
public static void AssertNotNull(
[AssertionCondition(AssertionConditionType.IS_NOT_NULL)]
[System.Diagnostics.CodeAnalysis.NotNull]
object? arg,
string? message = null)
{