add test for inherit-from semantics

(cherry picked from commit 8669c02468994887be91072ac58b1ee43380d354)
Change-Id: If8513316bf4b4b559c5bb63842c856f016816802
This commit is contained in:
eldritch horrors 2024-03-08 09:50:55 +01:00
parent 7c882a5075
commit 0c19e6b56c
3 changed files with 9 additions and 0 deletions

View file

@ -0,0 +1,2 @@
trace: used
trace: used

View file

@ -0,0 +1 @@
[ 1 2 { __overrides = { y = { d = [ ]; }; }; c = [ ]; d = 4; x = { c = [ ]; }; y = «repeated»; } ]

View 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 = []; } ]