tvl-depot/tvix/eval/src
Vincent Ambo 3a67f91228 fix(tvix/eval): ? operator should use OpAttrsOrNotFound
Using `OpAttrSelect`, the ? operator will fail when encountering a
nested value that is not an attribute set.

This however breaks valid code, such as:

  { bs = 42; } ? bs.a.b

The fix is simply to use the same operator used in the `or` statement,
which leaves a sentinal on the stack if a field is not found or the
value is not an attribute set.

Change-Id: Ib28fc8a96e6d592b4cdbc3e65ba129ad8faecd66
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6211
Reviewed-by: grfn <grfn@gws.fyi>
Tested-by: BuildkiteCI
2022-08-30 17:13:27 +00:00
..
tests fix(tvix/eval): ? operator should use OpAttrsOrNotFound 2022-08-30 17:13:27 +00:00
value fix(tvix/eval): allow use of ? operator on non-set types 2022-08-30 17:13:27 +00:00
chunk.rs feat(tvix/eval): implement chunk disassembler output 2022-08-30 16:53:40 +00:00
compiler.rs fix(tvix/eval): ? operator should use OpAttrsOrNotFound 2022-08-30 17:13:27 +00:00
disassembler.rs feat(tvix/eval): implement chunk disassembler output 2022-08-30 16:53:40 +00:00
errors.rs refactor(tvix/eval): remove Error::InvalidKeyType 2022-08-30 17:13:27 +00:00
eval.rs fix(tvix/eval): address various clippy lints 2022-08-30 16:53:40 +00:00
lib.rs feat(tvix/eval): implement optional runtime tracing 2022-08-30 16:53:40 +00:00
main.rs fix(tvix/eval): address various clippy lints 2022-08-30 16:53:40 +00:00
opcode.rs feat(tvix/eval): add local identifier access 2022-08-28 17:50:34 +00:00
vm.rs fix(tvix/eval): or should handle non-attrset values, too 2022-08-30 17:13:27 +00:00
warnings.rs docs(tvix/eval): Use correct syntax for module doc comments 2022-08-30 17:13:27 +00:00