Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/NSubstitute/Arg.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,18 @@ public static ref T Is<T>(T value)
/// Match argument that satisfies <paramref name="predicate"/>.
/// If the <paramref name="predicate"/> throws an exception for an argument it will be treated as non-matching.
/// </summary>
public static ref T Is<T>(Expression<Predicate<T?>> predicate)
public static ref T Is<T>(Expression<Predicate<T>> predicate)
{
return ref ArgumentMatcher.Enqueue<T>(new ExpressionArgumentMatcher<T>(predicate));
return ref ArgumentMatcher.Enqueue<T>(new ExpressionArgumentMatcher<T>(predicate!));
}

/// <summary>
/// Match argument that satisfies <paramref name="predicate"/>.
/// If the <paramref name="predicate"/> throws an exception for an argument it will be treated as non-matching.
/// </summary>
public static ref T Is<T>(Expression<Predicate<object?>> predicate) where T : AnyType
public static ref T Is<T>(Expression<Predicate<object>> predicate) where T : AnyType
{
return ref ArgumentMatcher.Enqueue<T>(new ExpressionArgumentMatcher<object>(predicate));
return ref ArgumentMatcher.Enqueue<T>(new ExpressionArgumentMatcher<object>(predicate!));
}

/// <summary>
Expand Down
Loading