diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 8f049b2ad..55160ee26 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -20,7 +20,6 @@ jobs: - Downstream version: - '1' - - '1.6' steps: - uses: actions/checkout@v4 - uses: julia-actions/setup-julia@v1 diff --git a/src/utils.jl b/src/utils.jl index d013c9ac9..7f5f4b824 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -27,6 +27,8 @@ function numargs(f::RuntimeGeneratedFunctions.RuntimeGeneratedFunction{ (length(T),) end +numargs(f::ComposedFunction) = numargs(f.inner) + """ $(SIGNATURES) diff --git a/test/function_building_error_messages.jl b/test/function_building_error_messages.jl index 269985a39..924c342e5 100644 --- a/test/function_building_error_messages.jl +++ b/test/function_building_error_messages.jl @@ -7,10 +7,11 @@ function test_num_args() numpar = SciMLBase.numargs(f) # Should be [1,2] g = (x, y) -> x^2 numpar2 = SciMLBase.numargs(g) # [2] + numpar3 = SciMLBase.numargs(sqrt ∘ g) # [2] @show numpar, minimum(numpar) == 1, maximum(numpar) == 2 minimum(numpar) == 1 && maximum(numpar) == 2 && maximum(numpar2) == 2 && - minimum(numpar2) == 2 + only(numpar3) == 2 end @test test_num_args() @@ -614,7 +615,7 @@ bvjp(u, v, p, t) = [1.0] @test_throws SciMLBase.NonconformingFunctionsError BVPFunction(bfoop, bciip, vjp = bvjp) bvjp(du, u, v, p, t) = [1.0] BVPFunction(bfiip, bciip, vjp = bvjp) - + @test_throws SciMLBase.NonconformingFunctionsError BVPFunction(bfoop, bciip, vjp = bvjp) # IntegralFunction