Skip to content

Commit 94f7ef1

Browse files
committed
Update Add constructor
1 parent ad6dff7 commit 94f7ef1

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/types.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -304,20 +304,20 @@ function _Term(f, args; kwargs...)
304304
_Term(_promote_symtype(f, args), f, args; kwargs...)
305305
end
306306

307-
function Add(::Type{T}, coeff, dict; metadata=NO_METADATA, kw...) where T
307+
function _Add(::Type{T}, coeff, dict; kwargs...) where {T}
308308
if isempty(dict)
309309
return coeff
310310
elseif _iszero(coeff) && length(dict) == 1
311-
k,v = first(dict)
311+
k, v = first(dict)
312312
if _isone(v)
313313
return k
314314
else
315315
coeff, dict = makemul(v, k)
316-
return Mul(T, coeff, dict)
316+
return _Mul(T, coeff, dict)
317317
end
318318
end
319-
320-
Add{T}(; coeff, dict, hash=Ref(UInt(0)), metadata, arguments=[], issorted=RefValue(false), kw...)
319+
impl = Add(; coeff, dict)
320+
BasicSymbolic{T}(; impl, kwargs...)
321321
end
322322

323323
function Mul(T, a, b; metadata=NO_METADATA, kw...)

0 commit comments

Comments
 (0)