Skip to content

Commit

Permalink
correction in Base.isassigned with Tridiagonal boundscheck error (#…
Browse files Browse the repository at this point in the history
…50488)

See #49827 (comment)

(cherry picked from commit e2e34f6)
  • Loading branch information
longemen3000 authored and KristofferC committed Jul 11, 2023
1 parent 7401107 commit d6eaa7c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion stdlib/LinearAlgebra/src/tridiag.jl
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ function diag(M::Tridiagonal{T}, n::Integer=0) where T
end

@inline function Base.isassigned(A::Tridiagonal, i::Int, j::Int)
@boundscheck checkbounds(A, i, j)
@boundscheck checkbounds(Bool, A, i, j) || return false
if i == j
return @inbounds isassigned(A.d, i)
elseif i == j + 1
Expand Down

0 comments on commit d6eaa7c

Please sign in to comment.