mirror of
https://github.com/NixOS/nix
synced 2025-06-27 04:21:16 +02:00
* Implemented `rec { inherit ...; }'.
This commit is contained in:
parent
4c53ca2692
commit
13c2adc897
2 changed files with 17 additions and 0 deletions
|
@ -73,6 +73,9 @@ void run(Strings args)
|
|||
doTest("map (x: __add 1 x) [ 1 2 3 ]");
|
||||
doTest("map (builtins.add 1) [ 1 2 3 ]");
|
||||
doTest("builtins.hasAttr \"x\" { x = 1; }");
|
||||
doTest("let x = 1; as = rec { inherit x; y = as.x; }; in as.y");
|
||||
doTest("let as = { x = 1; }; bs = rec { inherit (as) x; y = x; }; in bs.y");
|
||||
doTest("let as = rec { inherit (y) x; y = { x = 1; }; }; in as.x");
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue