Skip to content

Commit

Permalink
Merge 041c7cb into ca0692e
Browse files Browse the repository at this point in the history
  • Loading branch information
HarrisonGrodin committed May 14, 2019
2 parents ca0692e + 041c7cb commit c4052b6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/utils.jl
Expand Up @@ -2,6 +2,7 @@ using MacroTools


function Base.convert(::Type{Expression}, ex::Expr)
ex.head === :if && (ex = Expr(:call, ifelse, ex.args...))
ex.head === :call || throw(ArgumentError("internal representation does not support non-call Expr"))

op = eval(ex.args[1]) # HACK
Expand Down
2 changes: 2 additions & 0 deletions test/variable_parsing.jl
Expand Up @@ -32,3 +32,5 @@ D1 = Differential(t)

@test @macroexpand(@parameters x, y, z(t)) == @macroexpand(@parameters x y z(t))
@test @macroexpand(@variables x, y, z(t)) == @macroexpand(@variables x y z(t))

convert(Expression, :($x == 0 ? $y : $x))

0 comments on commit c4052b6

Please sign in to comment.