@@ -32,7 +32,7 @@ public static class Ref<TValue>
32
32
/// <summary>
33
33
/// Matches any value that is assignment-compatible with type <typeparamref name="TValue"/>.
34
34
/// </summary>
35
- public static TValue IsAny ;
35
+ public static TValue IsAny = default ( TValue ) ! ;
36
36
}
37
37
38
38
/// <summary>
@@ -64,7 +64,7 @@ public static TValue IsAny<TValue>()
64
64
}
65
65
}
66
66
67
- static readonly MethodInfo isAnyMethod = typeof ( It ) . GetMethod ( nameof ( It . IsAny ) , BindingFlags . Public | BindingFlags . Static ) ;
67
+ static readonly MethodInfo isAnyMethod = typeof ( It ) . GetMethod ( nameof ( It . IsAny ) , BindingFlags . Public | BindingFlags . Static ) ! ;
68
68
69
69
internal static MethodCallExpression IsAny ( Type genericArgument )
70
70
{
@@ -143,7 +143,7 @@ public static TValue Is<TValue>(Expression<Func<TValue, bool>> match)
143
143
throw new ArgumentException ( Resources . UseItIsOtherOverload , nameof ( match ) ) ;
144
144
}
145
145
146
- var thisMethod = ( MethodInfo ) MethodBase . GetCurrentMethod ( ) ;
146
+ var thisMethod = ( MethodInfo ) MethodBase . GetCurrentMethod ( ) ! ;
147
147
var compiledMatchMethod = match . CompileUsingExpressionCompiler ( ) ;
148
148
149
149
return Match . Create < TValue > (
@@ -165,9 +165,9 @@ public static TValue Is<TValue>(Expression<Func<TValue, bool>> match)
165
165
/// Allows the specification of a predicate to perform matching of method call arguments.
166
166
/// </remarks>
167
167
[ EditorBrowsable ( EditorBrowsableState . Advanced ) ]
168
- public static TValue Is < TValue > ( Expression < Func < object , Type , bool > > match )
168
+ public static TValue Is < TValue > ( Expression < Func < object ? , Type , bool > > match )
169
169
{
170
- var thisMethod = ( MethodInfo ) MethodBase . GetCurrentMethod ( ) ;
170
+ var thisMethod = ( MethodInfo ) MethodBase . GetCurrentMethod ( ) ! ;
171
171
var compiledMatchMethod = match . CompileUsingExpressionCompiler ( ) ;
172
172
173
173
return Match . Create < TValue > (
0 commit comments