From e46d95c9a6757e58a0c81bbcfa557273025308cd Mon Sep 17 00:00:00 2001 From: Hendrik Ranocha Date: Fri, 7 Oct 2022 17:49:57 +0200 Subject: [PATCH] remove unused type variable I got a warning on Julia v1.8.2: ``` [ Info: Precompiling OrdinaryDiffEq [1dea7af3-3e70-54e6-95c3-0bf5283fa5ed] WARNING: method definition for TwiceDifferentiable at ~/.julia/packages/NLSolversBase/cfJrN/src/objective_types/incomplete.jl:96 declares type variable TH but does not use it. ``` Unused type variables can sometimes be bad, see JuliaLang/julia#29393 --- src/objective_types/incomplete.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/objective_types/incomplete.jl b/src/objective_types/incomplete.jl index f27facb..998a6d1 100644 --- a/src/objective_types/incomplete.jl +++ b/src/objective_types/incomplete.jl @@ -93,7 +93,7 @@ end const InPlaceFGH = InplaceObjective{<:Nothing,<:Nothing,TH,<:Nothing,<:Nothing} where {TH} const InPlaceFG_HV = InplaceObjective{<:Nothing,TFG,<:Nothing,THv,<:Nothing} where {TFG,THv} const InPlaceFGHV = InplaceObjective{<:Nothing,<:Nothing,<:Nothing,<:Nothing,TFGHv} where {TFGHv} -function TwiceDifferentiable(t::InPlaceFGH, x::AbstractArray, F::Real = real(zero(eltype(x))), G::AbstractArray = alloc_DF(x, F), H = alloc_H(x, F)) where {TH} +function TwiceDifferentiable(t::InPlaceFGH, x::AbstractArray, F::Real = real(zero(eltype(x))), G::AbstractArray = alloc_DF(x, F), H = alloc_H(x, F)) f = x -> t.fgh(F, nothing, nothing, x) df = (G, x) -> t.fgh(nothing, G, nothing, x) fdf = (G, x) -> t.fgh(F, G, nothing, x)