Skip to content

Commit e15c9d9

Browse files
amontoisontmigot
andauthored
Update src/sparsity_pattern.jl
Co-authored-by: Tangi Migot <[email protected]>
1 parent 4991e76 commit e15c9d9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/sparsity_pattern.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,8 @@ function get_sparsity_pattern(model::AbstractADNLSModel, ::Val{:hessian_residual
123123
SparseMatrixCSC(n, n, colptr, rowval, nzval)
124124
end
125125

126-
function validate_sparse_backend(backend::ADBackend, expected_type, derivative_name::String)
126+
function validate_sparse_backend(backend::B, expected_type, derivative_name::String) where {B <: ADBackend}
127127
if !(backend isa expected_type)
128-
B = typeof(backend)
129128
error("The current backend $B doesn't compute a sparse $derivative_name.")
130129
end
131130
end

0 commit comments

Comments
 (0)