add test for inherit-from semantics
(cherry picked from commit 8669c02468994887be91072ac58b1ee43380d354)
Change-Id: If8513316bf4b4b559c5bb63842c856f016816802
This commit is contained in:
parent
7c882a5075
commit
0c19e6b56c
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