mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-22 14:06:16 +02:00
add test for inherit-from semantics
This commit is contained in:
parent
9d182e71fb
commit
8669c02468
3 changed files with 9 additions and 0 deletions
2
tests/functional/lang/eval-okay-inherit-from.err.exp
Normal file
2
tests/functional/lang/eval-okay-inherit-from.err.exp
Normal file
|
@ -0,0 +1,2 @@
|
|||
trace: used
|
||||
trace: used
|
1
tests/functional/lang/eval-okay-inherit-from.exp
Normal file
1
tests/functional/lang/eval-okay-inherit-from.exp
Normal file
|
@ -0,0 +1 @@
|
|||
[ 1 2 { __overrides = { y = { d = [ ]; }; }; c = [ ]; d = 4; x = { c = [ ]; }; y = «repeated»; } ]
|
6
tests/functional/lang/eval-okay-inherit-from.nix
Normal file
6
tests/functional/lang/eval-okay-inherit-from.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
let
|
||||
inherit (builtins.trace "used" { a = 1; b = 2; }) a b;
|
||||
x.c = 3;
|
||||
y.d = 4;
|
||||
in
|
||||
[ a b rec { x.c = []; inherit (x) c; inherit (y) d; __overrides.y.d = []; } ]
|
Loading…
Reference in a new issue