Skip to content

Commit 7820927

Browse files
Merge pull request #304 from adediego/expression_conversion
treat symbols symbolically when converting from expressions
2 parents ace121b + dd89e11 commit 7820927

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Base.convert(::Type{Expression}, x::Number) = Constant(x)
1212
Base.convert(::Type{Expression}, x::Bool) = Constant(x)
1313
Base.convert(::Type{Expression}, x::Variable) = convert(Operation,x)
1414
Base.convert(::Type{Expression}, x::Operation) = x
15-
Base.convert(::Type{Expression}, x::Symbol) = Base.convert(Expression,eval(x))
15+
Base.convert(::Type{Expression}, x::Symbol) = Operation(Variable(x),[])
1616
Expression(x::Bool) = Constant(x)
1717

1818
function build_expr(head::Symbol, args)

0 commit comments

Comments
 (0)