fix mergeAttrsWithFunc (also merge in names which are only in the snd attrs)

svn path=/nixpkgs/trunk/; revision=17406
This commit is contained in:
Marc Weber 2009-09-24 18:22:33 +00:00
parent 4d41884f8e
commit 15afc2fa04

View file

@ -264,7 +264,7 @@ rec {
fold (n: set : if (__hasAttr n set)
then setAttr set n (f (__getAttr n set) (__getAttr n set2))
else set )
set1 (__attrNames set2);
(set2 // set1) (__attrNames set2);
# merging two attribute set concatenating the values of same attribute names
# eg { a = 7; } { a = [ 2 3 ]; } becomes { a = [ 7 2 3 ]; }