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!)); } ///