diff --git a/stdlib/LinearAlgebra/src/diagonal.jl b/stdlib/LinearAlgebra/src/diagonal.jl index 2f02ec77b80b3..9a81bcdfaa1c2 100644 --- a/stdlib/LinearAlgebra/src/diagonal.jl +++ b/stdlib/LinearAlgebra/src/diagonal.jl @@ -407,7 +407,7 @@ end _has_matching_storage(out::UpperOrUnitUpperTriangular, A::UpperOrUnitUpperTriangular) = true _has_matching_storage(out::LowerOrUnitLowerTriangular, A::LowerOrUnitLowerTriangular) = true _has_matching_storage(out, A) = false -function _rowrange_tri_stored(B::UpperOrUpperTriangular, col) +function _rowrange_tri_stored(B::UpperOrUnitUpperTriangular, col) isunit = B isa UnitUpperTriangular 1:min(col-isunit, size(B,1)) end