diff --git a/src/FsCheck/ReflectArbitrary.fs b/src/FsCheck/ReflectArbitrary.fs index 6409f66c..3fb3f28d 100644 --- a/src/FsCheck/ReflectArbitrary.fs +++ b/src/FsCheck/ReflectArbitrary.fs @@ -191,7 +191,7 @@ module internal ReflectArbitrary = else fun _ -> [] - let private reflectShrinkObj getShrink o (t:Type) = + let private reflectShrinkObj (getShrink:Type->obj->seq) o (t:Type) = //assumes that l contains at least one element. let split3 l = let rec split3' front m back = @@ -311,4 +311,4 @@ module internal ReflectArbitrary = else Seq.empty - let reflectShrink getShrink (a:'a) = reflectShrinkObj getShrink a (typeof<'a>) |> Seq.map (unbox<'a>) \ No newline at end of file + let reflectShrink<'T> (getShrink: Type -> obj -> seq) (a:'T) = reflectShrinkObj getShrink a (typeof<'T>) |> Seq.map (unbox<'T>) \ No newline at end of file diff --git a/src/FsCheck/TypeClass.fs b/src/FsCheck/TypeClass.fs index c6cdf3ae..8e611fea 100644 --- a/src/FsCheck/TypeClass.fs +++ b/src/FsCheck/TypeClass.fs @@ -51,11 +51,11 @@ module TypeClass = Array <| arr | prim -> Primitive prim - let private getMethods (t: Type) = + let private getMethods (t: Type) : seq = #if NETSTANDARD1_0 t.GetRuntimeMethods() #else - t.GetMethods(BindingFlags.Static ||| BindingFlags.Public ||| BindingFlags.FlattenHierarchy ||| BindingFlags.NonPublic ||| BindingFlags.Instance) + upcast t.GetMethods(BindingFlags.Static ||| BindingFlags.Public ||| BindingFlags.FlattenHierarchy ||| BindingFlags.NonPublic ||| BindingFlags.Instance) #endif //returns a dictionary of generic types to methodinfo, a catch all, and array types in a list by rank