diff --git a/.github/workflows/Downstream.yml b/.github/workflows/Downstream.yml index 6c4ec7b41..1c6f9f700 100644 --- a/.github/workflows/Downstream.yml +++ b/.github/workflows/Downstream.yml @@ -46,6 +46,8 @@ jobs: repository: ${{ matrix.package.user }}/${{ matrix.package.repo }} path: downstream - name: Load this and run the downstream tests + env: + JULIA_PKG_PRECOMPILE_AUTO: 0 shell: julia --color=yes --project=downstream {0} run: | using Pkg diff --git a/src/polyform.jl b/src/polyform.jl index dbc6578e5..a42569169 100644 --- a/src/polyform.jl +++ b/src/polyform.jl @@ -418,7 +418,9 @@ function quick_mulmul(x::S, y::S)::Tuple{S, S} where {T <: SymVariant, S <: Basi return xx, yy end - _ => _unreachable() + # Not `_unreachable` since `adjoint(vec) * vec` can end up here, and we just want + # to ignore it. + _ => (x, y) end end diff --git a/test/misc.jl b/test/misc.jl index d5097b074..dd35c9b94 100644 --- a/test/misc.jl +++ b/test/misc.jl @@ -311,3 +311,10 @@ end # Test getmetadata with default @test SymbolicUtils.getmetadata(x, Float64, "default") == "default" end + +@testset "`quick_cancel` handles `adjoint(vec) * vec`" begin + @syms x[1:3] + num = x[1] * x[2] + den = x'x + @test isequal(quick_cancel(num, den), (num, den)) +end