Skip to content

Commit

Permalink
Fix the type of the length-1 vector of functions
Browse files Browse the repository at this point in the history
  • Loading branch information
kagalenko-m-b authored and kagalenko-m-b committed Sep 8, 2024
1 parent e8f7f8f commit c057684
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/problem_compiler.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ macro problemset(set_name, set_body)
end
quote
$(esc(set_body))
$(esc(set_name)) = [$([:($(esc(prob))) for prob in prob_names]...)]
$(esc(set_name)) = $(esc(:Function))[$([:($(esc(prob))) for prob in prob_names]...)]
end
end

Expand Down
7 changes: 4 additions & 3 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,10 @@ end
pr_set = macroexpand( @__MODULE__, problem_set, recursive=:false);
Base.remove_linenums!(pr_set)
@test length(pr_set.args) == 2
@test pr_set.args[2] == :(test_problem_set = [test_problem_set_sub_add,
test_problem_set_sub,
test_problem_set_add])
@test pr_set.args[2] == :(test_problem_set = Function[
test_problem_set_sub_add,
test_problem_set_sub,
test_problem_set_add])
end

@testset "Problem selection" begin
Expand Down

0 comments on commit c057684

Please sign in to comment.