Skip to content

Commit 468e3a0

Browse files
committed
fix GG scoping for scalar build_function
1 parent 794e0e3 commit 468e3a0

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

src/build_function.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ function _build_function(target::JuliaTarget, op::Operation, args...;
114114

115115
fname = gensym(:ModelingToolkitFunction)
116116
out_expr = conv(op)
117-
let_expr = Expr(:let, var_eqs, out_expr)
117+
let_expr = Expr(:let, var_eqs, Expr(:block, out_expr))
118118
bounds_block = checkbounds ? let_expr : :(@inbounds begin $let_expr end)
119119

120120
fargs = Expr(:tuple,argnames...)

test/reactionsystem.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@ for i = 1:14
123123
@test jumps[i].net_stoch == maj.net_stoch
124124
end
125125
for i = 15:18
126-
(i==16) && continue
127126
crj = MT.assemble_crj(js, js.eqs[i], statetoid)
128127
@test isapprox(crj.rate(u0,p,time), jumps[i].rate(u0,p,time))
129128
fake_integrator1 = (u=zeros(4),p=p,t=0); fake_integrator2 = deepcopy(fake_integrator1);

0 commit comments

Comments
 (0)