about summary refs log tree commit diff
path: root/tests/lang
diff options
context:
space:
mode:
authorShea Levy <shea@shealevy.com>2013-12-31T22·57-0500
committerShea Levy <shea@shealevy.com>2013-12-31T22·57-0500
commit6f3a51809a2603574a16573bd46b95e4ff5233bd (patch)
tree5b840b6156d4eff11781e2c12258f36fd4fddac5 /tests/lang
parent18fefacf7df570444b332a8a0c2dc4f9d98d4344 (diff)
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>
Diffstat (limited to 'tests/lang')
-rw-r--r--tests/lang/eval-okay-dynamic-attrs-2.exp1
-rw-r--r--tests/lang/eval-okay-dynamic-attrs-2.nix1
2 files changed, 2 insertions, 0 deletions
diff --git a/tests/lang/eval-okay-dynamic-attrs-2.exp b/tests/lang/eval-okay-dynamic-attrs-2.exp
new file mode 100644
index 000000000000..27ba77ddaf61
--- /dev/null
+++ b/tests/lang/eval-okay-dynamic-attrs-2.exp
@@ -0,0 +1 @@
+true
diff --git a/tests/lang/eval-okay-dynamic-attrs-2.nix b/tests/lang/eval-okay-dynamic-attrs-2.nix
new file mode 100644
index 000000000000..6d57bf854908
--- /dev/null
+++ b/tests/lang/eval-okay-dynamic-attrs-2.nix
@@ -0,0 +1 @@
+{ a."${"b"}" = true; a."${"c"}" = false; }.a.b