Skip to content

Commit 7053b34

Browse files
committed
Fix constructor redefinition issue (attempt the seecond, dispatch to the kwargs version edition)
1 parent 32c7c9f commit 7053b34

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/systems/callbacks.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ struct SymbolicContinuousCallback
112112
affect::Union{Vector{Equation}, FunctionalAffect}
113113
affect_neg::Union{Vector{Equation}, FunctionalAffect, Nothing}
114114
rootfind::SciMLBase.RootfindOpt
115-
function SymbolicContinuousCallback(eqs::Vector{Equation}, affect = NULL_AFFECT,
115+
function SymbolicContinuousCallback(; eqs::Vector{Equation}, affect = NULL_AFFECT,
116116
affect_neg = affect, rootfind = SciMLBase.LeftRootFind)
117117
new(eqs, make_affect(affect), make_affect(affect_neg), rootfind)
118118
end # Default affect to nothing
@@ -148,11 +148,11 @@ SymbolicContinuousCallback(p::Pair) = SymbolicContinuousCallback(p[1], p[2])
148148
SymbolicContinuousCallback(cb::SymbolicContinuousCallback) = cb # passthrough
149149
function SymbolicContinuousCallback(eqs::Equation, affect = NULL_AFFECT;
150150
affect_neg = affect, rootfind = SciMLBase.LeftRootFind)
151-
SymbolicContinuousCallback([eqs], affect, affect_neg, rootfind)
151+
SymbolicContinuousCallback(eqs=[eqs], affect=affect, affect_neg=affect_neg, rootfind=rootfind)
152152
end
153-
function SymbolicContinuousCallback(eqs::Vector{Equation}, affect;
153+
function SymbolicContinuousCallback(eqs::Vector{Equation}, affect = NULL_AFFECT;
154154
affect_neg = affect, rootfind = SciMLBase.LeftRootFind)
155-
SymbolicContinuousCallback(eqs, affect, affect_neg, rootfind)
155+
SymbolicContinuousCallback(eqs=eqs, affect=affect, affect_neg=affect_neg, rootfind=rootfind)
156156
end
157157

158158
SymbolicContinuousCallbacks(cb::SymbolicContinuousCallback) = [cb]

0 commit comments

Comments
 (0)