Skip to content

Commit

Permalink
Fix method overwrite warning when loading the package (#255)
Browse files Browse the repository at this point in the history
This was caused by providing a default value of `nothing` for the
`model` argument in the `Problem` constructor, which ends up creating a
two-argument method that is also created further down by virtue of using
default values.

By simply removing the default value for `model`, we remain at feature
parity with the methods prior to the change and we don't overwrite
anything.
  • Loading branch information
ararslan committed Dec 17, 2018
1 parent a8e64d4 commit 036492c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/problems.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ mutable struct Problem
solution::Solution

function Problem(head::Symbol, objective::AbstractExpr,
model::Union{MathProgBase.AbstractConicModel, Nothing}=nothing,
model::Union{MathProgBase.AbstractConicModel, Nothing},
constraints::Array=Constraint[])
if sign(objective)== Convex.ComplexSign()
error("Objective can not be a complex expression")
Expand Down

0 comments on commit 036492c

Please sign in to comment.