about summary refs log tree commit diff
path: root/tests/lang/parse-fail-dup-attrs-7.nix
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2010-04-22T11·02+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2010-04-22T11·02+0000
commitebade9ff8b8557bdae7cdaf9f70c12ceeb3dc02c (patch)
tree32a2ea8441ed340fd2a0b3b8ab29f5e51950480f /tests/lang/parse-fail-dup-attrs-7.nix
parent2d7636529f782b552b634497fd8ac876aae72fcc (diff)
* Check for duplicate attribute names / function arguments. `make
  check' now succeeds :-)
* An attribute set such as `{ foo = { enable = true; };
  foo.port = 23; }' now parses.  It was previously rejected, but I'm
  too lazy to implement the check.  (The only reason to reject it is
  that the reverse, `{ foo.port = 23; foo = { enable = true; }; }', is
  rejected, which is kind of ugly.)

Diffstat (limited to 'tests/lang/parse-fail-dup-attrs-7.nix')
-rw-r--r--tests/lang/parse-fail-dup-attrs-7.nix9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/lang/parse-fail-dup-attrs-7.nix b/tests/lang/parse-fail-dup-attrs-7.nix
new file mode 100644
index 000000000000..bbc3eb08c0f6
--- /dev/null
+++ b/tests/lang/parse-fail-dup-attrs-7.nix
@@ -0,0 +1,9 @@
+rec {
+
+  x = 1;
+
+  as = {
+    inherit x;
+    inherit x;
+  };
+}
\ No newline at end of file