From 6f3a51809a2603574a16573bd46b95e4ff5233bd Mon Sep 17 00:00:00 2001 From: Shea Levy Date: Tue, 31 Dec 2013 17:57:10 -0500 Subject: 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 --- tests/lang/eval-okay-dynamic-attrs-2.exp | 1 + tests/lang/eval-okay-dynamic-attrs-2.nix | 1 + 2 files changed, 2 insertions(+) create mode 100644 tests/lang/eval-okay-dynamic-attrs-2.exp create mode 100644 tests/lang/eval-okay-dynamic-attrs-2.nix (limited to 'tests') 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 -- cgit 1.4.1