feat(tvix/eval): Support builtins.getAttr
Support looking-up values from attrsets by their keys. Change-Id: Ib37a472a511dab145f99ebc849879b3494e8e89f Reviewed-on: https://cl.tvl.fyi/c/depot/+/6554 Reviewed-by: wpcarro <wpcarro@gmail.com> Reviewed-by: sterni <sternenseemann@systemli.org> Autosubmit: wpcarro <wpcarro@gmail.com> Tested-by: BuildkiteCI
This commit is contained in:
parent
059f4b964f
commit
61cce49a8a
3 changed files with 18 additions and 0 deletions
|
|
@ -0,0 +1 @@
|
|||
[ 1 2 3 { bar = { baz = 3; }; } ]
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
[
|
||||
(builtins.getAttr "foo" { foo = 1; bar = 2; baz = 3; })
|
||||
(builtins.getAttr "bar" { foo = 1; bar = 2; baz = 3; })
|
||||
(builtins.getAttr "baz" { foo = 1; bar = 2; baz = 3; })
|
||||
(builtins.getAttr "foo" { foo = { bar = { baz = 3; }; }; })
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue