Skip to content

Commit

Permalink
Fix incorrectly typed method for _vec_mul_arguments (#350)
Browse files Browse the repository at this point in the history
* Constrain

* test
  • Loading branch information
DanielVandH authored Nov 27, 2024
1 parent fb78647 commit 600d257
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "LazyArrays"
uuid = "5078a376-72f3-5289-bfd5-ec5146d43c02"
version = "2.2.2"
version = "2.2.3"

[deps]
ArrayLayouts = "4c555306-a7a7-4459-81d9-ec55ddd5c99a"
Expand Down
2 changes: 1 addition & 1 deletion src/linalg/mul.jl
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ _vec_mul_view(a...) = view(a...)
_vec_mul_view(a::AbstractVector, kr, ::Colon) = view(a, kr)

# this is a vector view of a MulVector
function _vec_mul_arguments(args, (kr,))
function _vec_mul_arguments(args, (kr,)::Tuple{Any})
kjr = intersect.(_mul_args_rows(kr, args...), _mul_args_cols(Base.OneTo(1), reverse(args)...))
_vec_mul_view.(args, (kr, kjr...), (kjr..., :))
end
Expand Down
3 changes: 3 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,9 @@ end
@test bc.args[2] == 3
end

@testset "_vec_mul_arguments method" begin
@test_throws "MethodError: no method matching _vec_mul_arguments" LazyArrays._vec_mul_arguments(2, [])
end

include("blocktests.jl")
include("bandedtests.jl")
Expand Down

0 comments on commit 600d257

Please sign in to comment.