Skip to content

Commit 036492c

Browse files
authored
Fix method overwrite warning when loading the package (#255)
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.
1 parent a8e64d4 commit 036492c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/problems.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ mutable struct Problem
2929
solution::Solution
3030

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

0 commit comments

Comments
 (0)