diff --git a/stdlib/LinearAlgebra/src/tridiag.jl b/stdlib/LinearAlgebra/src/tridiag.jl index 13f6a1bb70756..174b368a8615a 100644 --- a/stdlib/LinearAlgebra/src/tridiag.jl +++ b/stdlib/LinearAlgebra/src/tridiag.jl @@ -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