1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-27 08:31:16 +02:00

* Implemented withs.

This commit is contained in:
Eelco Dolstra 2010-04-14 15:01:04 +00:00
parent 9985230c00
commit 110d155778
4 changed files with 38 additions and 15 deletions

View file

@ -72,7 +72,8 @@ void run(Strings args)
doTest(state, "let { x = 1; body = x; }");
doTest(state, "with { x = 1; }; x");
doTest(state, "let x = 2; in with { x = 1; }; x"); // => 2
doTest(state, "with { x = 1; }; with { x = 2; }; x"); // => 1
doTest(state, "with { x = 1; }; with { x = 2; }; x"); // => 2
doTest(state, "with { x = 1; }; with { y = 2; }; x"); // => 1
doTest(state, "[ 1 2 3 ]");
doTest(state, "[ 1 2 ] ++ [ 3 4 5 ]");
doTest(state, "123 == 123");