diff --git a/src/onepass.jl b/src/onepass.jl index b1ff16a..630ca18 100644 --- a/src/onepass.jl +++ b/src/onepass.jl @@ -1382,7 +1382,7 @@ function def_fun(e; log=false) $p_ocp = $pref.PreModel() $code $pref.definition!($p_ocp, $ee) - $pref.time_dependence!($p_ocp; autonomous=$p.is_autonomous) # not $(p.xxxx) as this info is known statically + $pref.time_dependence!($p_ocp; autonomous=($p.is_autonomous)) # not $(p.xxxx) as this info is known statically end if is_active_backend(:exa) diff --git a/src/utils.jl b/src/utils.jl index 360593f..788901b 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -134,7 +134,7 @@ function subs2(e, x, y, j; k=__symgen(:k)) _ => f end end - expr_it(e, foo(x, y, j), x -> x) + return expr_it(e, foo(x, y, j), x -> x) end """ @@ -163,7 +163,7 @@ function subs3(e, x, y, i, j) _ => f end end - expr_it(e, foo(x, y, i, j), x -> x) + return expr_it(e, foo(x, y, i, j), x -> x) end """ @@ -210,7 +210,7 @@ function subs2m(e, x, y, j; k=__symgen(:k)) _ => f end end - expr_it(e, foo(x, y, j), x -> x) + return expr_it(e, foo(x, y, j), x -> x) end """ @@ -283,7 +283,7 @@ function replace_call(e, x::Vector{<:Union{Nothing,Symbol}}, t, y) _ => ee end end - expr_it(e, foo(x, t, y), x -> x) + return expr_it(e, foo(x, t, y), x -> x) end """ @@ -369,7 +369,7 @@ function has(e, x, t) end end end - expr_it(e, foo(x, t), x -> x) == :yes + return expr_it(e, foo(x, t), x -> x) == :yes end """