From 600d2577188dad8065a2bd252f122a40c9e331e6 Mon Sep 17 00:00:00 2001 From: Daniel VandenHeuvel <95613936+DanielVandH@users.noreply.github.com> Date: Wed, 27 Nov 2024 22:58:52 +0000 Subject: [PATCH] Fix incorrectly typed method for `_vec_mul_arguments` (#350) * Constrain * test --- Project.toml | 2 +- src/linalg/mul.jl | 2 +- test/runtests.jl | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Project.toml b/Project.toml index 65675d58..306d55c6 100644 --- a/Project.toml +++ b/Project.toml @@ -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" diff --git a/src/linalg/mul.jl b/src/linalg/mul.jl index 39afb862..57cfffba 100644 --- a/src/linalg/mul.jl +++ b/src/linalg/mul.jl @@ -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 diff --git a/test/runtests.jl b/test/runtests.jl index 55b1abc8..e6ee0a84 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -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")