diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2010-04-22 11:02:24 +0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2010-04-22 11:02:24 +0000 |
commit | ebade9ff8b8557bdae7cdaf9f70c12ceeb3dc02c (patch) | |
tree | 32a2ea8441ed340fd2a0b3b8ab29f5e51950480f /tests | |
parent | 2d7636529f782b552b634497fd8ac876aae72fcc (diff) | |
download | guix-ebade9ff8b8557bdae7cdaf9f70c12ceeb3dc02c.tar.gz |
* 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')
-rw-r--r-- | tests/lang/eval-okay-context.exp | 2 | ||||
-rw-r--r-- | tests/lang/parse-fail-dup-attrs-7.nix | 9 | ||||
-rw-r--r-- | tests/lang/parse-okay-dup-attrs-5.nix (renamed from tests/lang/parse-fail-dup-attrs-5.nix) | 0 |
3 files changed, 10 insertions, 1 deletions
diff --git a/tests/lang/eval-okay-context.exp b/tests/lang/eval-okay-context.exp index 95a9936542..2f535bdbc4 100644 --- a/tests/lang/eval-okay-context.exp +++ b/tests/lang/eval-okay-context.exp @@ -1 +1 @@ -Str("foo eval-okay-context.nix bar",[]) +"foo eval-okay-context.nix bar" 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 0000000000..bbc3eb08c0 --- /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 diff --git a/tests/lang/parse-fail-dup-attrs-5.nix b/tests/lang/parse-okay-dup-attrs-5.nix index f4b9efd0c5..f4b9efd0c5 100644 --- a/tests/lang/parse-fail-dup-attrs-5.nix +++ b/tests/lang/parse-okay-dup-attrs-5.nix |