Skip to content

Commit 666ad1b

Browse files
committed
fix: destructuring syntax for Julia 1.6
1 parent 327c8d2 commit 666ad1b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ext/DynamicExpressionsOptimExt.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ function wrap_func(
4242
f::F, tree::N, refs
4343
) where {F<:Function,T,N<:Union{AbstractExpressionNode{T},AbstractExpression{T}}}
4444
function wrapped_f(args::Vararg{Any,M}) where {M}
45-
(first_args..., x) = args
45+
first_args = args[begin:end-1]
46+
x = args[end]
4647
set_constants!(tree, x, refs)
4748
return @inline(f(first_args..., tree))
4849
end

0 commit comments

Comments
 (0)