diff options
author | Vincent Ambo <mail@tazj.in> | 2022-08-14T11·34+0300 |
---|---|---|
committer | tazjin <tazjin@tvl.su> | 2022-08-30T17·13+0000 |
commit | cfe37d36f7977f93dd5b8441d691811bf2b6997b (patch) | |
tree | 761bb85c7b333e6d6739490a7e6f655c7c098ace /tvix/eval/src/tests/tvix_tests/eval-okay-or-operator-non-set.nix | |
parent | 76846fe22032546661cdf8649b8f898fc36e5270 (diff) |
fix(tvix/eval): `or` should handle non-attrset values, too r/4543
If a nested attrpath encounters a non-set value, the sentinel value denoting a lack of next values should be emitted. This mirrors the behaviour of Nix. Change-Id: Ia80443d5a11243cc6d98dcab1249a3f5fdf77e27 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6210 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/eval/src/tests/tvix_tests/eval-okay-or-operator-non-set.nix')
-rw-r--r-- | tvix/eval/src/tests/tvix_tests/eval-okay-or-operator-non-set.nix | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-or-operator-non-set.nix b/tvix/eval/src/tests/tvix_tests/eval-okay-or-operator-non-set.nix new file mode 100644 index 000000000000..fd09bfee64c2 --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-or-operator-non-set.nix @@ -0,0 +1,2 @@ +# `or` operator should keep working if it encounters a non-set type. +{ a.b = 42; }.a.b.c or "works fine" |