Skip to content

Commit 6864a7a

Browse files
committed
change for Aqua
1 parent c0c6436 commit 6864a7a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/ModuleElts.jl

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,13 +464,19 @@ end
464464
"""
465465
`merge(f,m::ModuleElt,b)` does `v->f(v,b)` on the values of `m`.
466466
"""
467-
function Base.merge(f,m::$M{K,V},b)where {K,V}
467+
function Base.merge(f::Function,m::$M{K,V},b)where {K,V}
468468
# non-usable when iszero(m) and zero(V) not defined
469469
if iszero(m) return zero($M{K,typeof(f(zero(V),b))}) end
470470
p=(k=>f(v,b) for (k,v) in m)
471471
$M(p;check=any(x->iszero(last(x)),p))
472472
end
473473

474+
function Base.merge(f::Function,m::$M{K,V},b::AbstractDict)where {K,V}
475+
if iszero(m) return zero($M{K,typeof(f(zero(V),b))}) end
476+
p=(k=>f(v,b) for (k,v) in m)
477+
$M(p;check=any(x->iszero(last(x)),p))
478+
end
479+
474480
"""
475481
`merge(f,m::ModuleElt)` does `v->f(v)` on the values of `m`.
476482
"""

0 commit comments

Comments
 (0)