@@ -3509,11 +3509,11 @@ end
35093509struct MixedKeyDict{T<: Tuple } # <: AbstractDict{Any,Any}
35103510 dicts:: T
35113511end
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). .. )
35143514function _merge (f, res, d, others... )
35153515 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... )
35173517end
35183518_merge (f, res, :: Tuple{} , others... ) = _merge (f, res, others... )
35193519_merge (f, res, d) = MixedKeyDict ((res... , d... ))
@@ -3537,9 +3537,9 @@ _alloftype(ofdesiredtype, accumulated) = ofdesiredtype, Base.front(accumulated)
35373537let
35383538 d = MixedKeyDict ((Dict (1 => 3 ), Dict (4. => 2 )))
35393539 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 ))
35413541 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 ))
35433543end
35443544
35453545# Issue #31974
0 commit comments