diff options
Diffstat (limited to 'test/testdata/eval-okay-attrs2.nix')
-rw-r--r-- | test/testdata/eval-okay-attrs2.nix | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/testdata/eval-okay-attrs2.nix b/test/testdata/eval-okay-attrs2.nix new file mode 100644 index 0000000..9e06b83 --- /dev/null +++ b/test/testdata/eval-okay-attrs2.nix | |||
@@ -0,0 +1,10 @@ | |||
1 | let { | ||
2 | as = { x = 123; y = 456; } // { z = 789; } // { z = 987; }; | ||
3 | |||
4 | A = "a"; | ||
5 | Z = "z"; | ||
6 | |||
7 | body = if builtins.hasAttr A as | ||
8 | then builtins.getAttr A as | ||
9 | else assert builtins.hasAttr Z as; builtins.getAttr Z as; | ||
10 | } | ||