add test for inherit-from semantics

This commit is contained in:
pennae 2024-01-27 16:33:34 +01:00
parent 9d182e71fb
commit 8669c02468
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 = []; } ]