Skip to content

Commit

Permalink
small fix for addtoexpr
Browse files Browse the repository at this point in the history
  • Loading branch information
mlubin committed Jun 14, 2016
1 parent 1ea8781 commit 2724661
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/parseExpr_staged.jl
Expand Up @@ -58,7 +58,7 @@ end

addtoexpr(ex::Number, c::Variable, x::Variable) = QuadExpr([c],[x],[1.0],zero(AffExpr))

function addtoexpr(ex::Number, c::GenericAffExpr, x::GenericAffExpr)
function addtoexpr{T<:GenericAffExpr}(ex::Number, c::T, x::T)
q = c*x
q.aff.constant += ex
q
Expand Down

0 comments on commit 2724661

Please sign in to comment.