mirror of
https://github.com/NixOS/nix
synced 2025-07-07 18:31:49 +02:00
Fold dynamic binds handling into addAttr
Since addAttr has to iterate through the AttrPath we pass it, it makes more sense to just iterate through the AttrNames in addAttr instead. As an added bonus, this allows attrsets where two dynamic attribute paths have the same static leading part (see added test case for an example that failed previously). Signed-off-by: Shea Levy <shea@shealevy.com>
This commit is contained in:
parent
18fefacf7d
commit
6f3a51809a
3 changed files with 37 additions and 55 deletions
1
tests/lang/eval-okay-dynamic-attrs-2.exp
Normal file
1
tests/lang/eval-okay-dynamic-attrs-2.exp
Normal file
|
@ -0,0 +1 @@
|
|||
true
|
1
tests/lang/eval-okay-dynamic-attrs-2.nix
Normal file
1
tests/lang/eval-okay-dynamic-attrs-2.nix
Normal file
|
@ -0,0 +1 @@
|
|||
{ a."${"b"}" = true; a."${"c"}" = false; }.a.b
|
Loading…
Add table
Add a link
Reference in a new issue