aboutsummaryrefslogtreecommitdiff
path: root/tests/functional
diff options
context:
space:
mode:
Diffstat (limited to 'tests/functional')
-rw-r--r--tests/functional/lang/eval-okay-inherit-from.err.exp2
-rw-r--r--tests/functional/lang/eval-okay-inherit-from.exp1
-rw-r--r--tests/functional/lang/eval-okay-inherit-from.nix6
3 files changed, 9 insertions, 0 deletions
diff --git a/tests/functional/lang/eval-okay-inherit-from.err.exp b/tests/functional/lang/eval-okay-inherit-from.err.exp
new file mode 100644
index 000000000..51881205b
--- /dev/null
+++ b/tests/functional/lang/eval-okay-inherit-from.err.exp
@@ -0,0 +1,2 @@
+trace: used
+trace: used
diff --git a/tests/functional/lang/eval-okay-inherit-from.exp b/tests/functional/lang/eval-okay-inherit-from.exp
new file mode 100644
index 000000000..43bd0e899
--- /dev/null
+++ b/tests/functional/lang/eval-okay-inherit-from.exp
@@ -0,0 +1 @@
+[ 1 2 { __overrides = { y = { d = [ ]; }; }; c = [ ]; d = 4; x = { c = [ ]; }; y = «repeated»; } ]
diff --git a/tests/functional/lang/eval-okay-inherit-from.nix b/tests/functional/lang/eval-okay-inherit-from.nix
new file mode 100644
index 000000000..d1fad7d69
--- /dev/null
+++ b/tests/functional/lang/eval-okay-inherit-from.nix
@@ -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 = []; } ]