Skip to content

Commit 6fbb043

Browse files
committed
Fix modelingtoolkitize_expr
1 parent 748eecb commit 6fbb043

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/utils.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ function modelingtoolkitize_expr(ex::Expr,vars,curmod)
2222
ex.head === :if && (ex = Expr(:call, ifelse, ex.args...))
2323
ex.head === :call || throw(ArgumentError("internal representation does not support non-call Expr"))
2424
op = ex.args[1] names ? vars[findfirst(x->ex.args[1] == tosymbol(x),vars)] : getproperty(curmod,ex.args[1]) # HACK
25-
args = [modelingtoolkitize_expr(x,vars,curmod) for x in ex.args[2:end]]
26-
return Term(op, args)
25+
return op((modelingtoolkitize_expr(x,vars,curmod) for x in ex.args[2:end])...)
2726
end
2827

2928
function modelingtoolkitize_expr(ex::Sym,vars,curmod)

0 commit comments

Comments
 (0)