From 90afedddfdd24a1d5db475ddd61600a81f3d512a Mon Sep 17 00:00:00 2001 From: Romfos Date: Mon, 13 Jul 2026 17:44:06 +0200 Subject: [PATCH] Make Arg.Is not nullable predocate --- src/NSubstitute/Arg.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/NSubstitute/Arg.cs b/src/NSubstitute/Arg.cs index 6d0fc49d..7cfd4000 100644 --- a/src/NSubstitute/Arg.cs +++ b/src/NSubstitute/Arg.cs @@ -39,18 +39,18 @@ public static ref T Is(T value) /// Match argument that satisfies . /// If the throws an exception for an argument it will be treated as non-matching. /// - public static ref T Is(Expression> predicate) + public static ref T Is(Expression> predicate) { - return ref ArgumentMatcher.Enqueue(new ExpressionArgumentMatcher(predicate)); + return ref ArgumentMatcher.Enqueue(new ExpressionArgumentMatcher(predicate!)); } /// /// Match argument that satisfies . /// If the throws an exception for an argument it will be treated as non-matching. /// - public static ref T Is(Expression> predicate) where T : AnyType + public static ref T Is(Expression> predicate) where T : AnyType { - return ref ArgumentMatcher.Enqueue(new ExpressionArgumentMatcher(predicate)); + return ref ArgumentMatcher.Enqueue(new ExpressionArgumentMatcher(predicate!)); } ///