@@ -3509,11 +3509,11 @@ end
3509
3509
struct MixedKeyDict{T<: Tuple } # <: AbstractDict{Any,Any}
3510
3510
dicts:: T
3511
3511
end
3512
- Base. merge (f:: Function , d:: MixedKeyDict , others:: MixedKeyDict... ) = _merge (f, (), d. dicts, (d-> d. dicts). (others). .. )
3513
- Base. merge (f, d:: MixedKeyDict , others:: MixedKeyDict... ) = _merge (f, (), d. dicts, (d-> d. dicts). (others). .. )
3512
+ Base. mergewith (f:: Function , d:: MixedKeyDict , others:: MixedKeyDict... ) = _merge (f, (), d. dicts, (d-> d. dicts). (others). .. )
3513
+ Base. mergewith (f, d:: MixedKeyDict , others:: MixedKeyDict... ) = _merge (f, (), d. dicts, (d-> d. dicts). (others). .. )
3514
3514
function _merge (f, res, d, others... )
3515
3515
ofsametype, remaining = _alloftype (Base. heads (d), ((),), others... )
3516
- return _merge (f, (res... , merge (f, ofsametype... )), Base. tail (d), remaining... )
3516
+ return _merge (f, (res... , mergewith (f, ofsametype... )), Base. tail (d), remaining... )
3517
3517
end
3518
3518
_merge (f, res, :: Tuple{} , others... ) = _merge (f, res, others... )
3519
3519
_merge (f, res, d) = MixedKeyDict ((res... , d... ))
@@ -3537,9 +3537,9 @@ _alloftype(ofdesiredtype, accumulated) = ofdesiredtype, Base.front(accumulated)
3537
3537
let
3538
3538
d = MixedKeyDict ((Dict (1 => 3 ), Dict (4. => 2 )))
3539
3539
e = MixedKeyDict ((Dict (1 => 7 ), Dict (5. => 9 )))
3540
- @test merge (+ , d, e). dicts == (Dict (1 => 10 ), Dict (4.0 => 2 , 5.0 => 9 ))
3540
+ @test mergewith (+ , d, e). dicts == (Dict (1 => 10 ), Dict (4.0 => 2 , 5.0 => 9 ))
3541
3541
f = MixedKeyDict ((Dict (2 => 7 ), Dict (5. => 11 )))
3542
- @test merge (+ , d, e, f). dicts == (Dict (1 => 10 , 2 => 7 ), Dict (4.0 => 2 , 5.0 => 20 ))
3542
+ @test mergewith (+ , d, e, f). dicts == (Dict (1 => 10 , 2 => 7 ), Dict (4.0 => 2 , 5.0 => 20 ))
3543
3543
end
3544
3544
3545
3545
# Issue #31974
0 commit comments