about summary refs log tree commit diff
path: root/tvix
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2022-09-13T13·13+0300
committertazjin <tazjin@tvl.su>2022-09-13T14·41+0000
commit6fdf55a9757905884ccb5eb09e862b9455bdce8b (patch)
tree1ec8ce2dd2b2309a9dd6199d1d012cbb54c56f44 /tvix
parent477015cfe38b4f51d0e4e579b547c506dcea0d44 (diff)
fix(tvix/eval): use fragment span for OpAttrsSelect r/4844
Pointed out by sterni in cl/6389

Change-Id: I648056a760266a8cfd7adcdc478c7ff2132991f7
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6568
Reviewed-by: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
Diffstat (limited to 'tvix')
-rw-r--r--tvix/eval/src/compiler/attrs.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/tvix/eval/src/compiler/attrs.rs b/tvix/eval/src/compiler/attrs.rs
index 649cdf37f0..bb48ffbb09 100644
--- a/tvix/eval/src/compiler/attrs.rs
+++ b/tvix/eval/src/compiler/attrs.rs
@@ -147,8 +147,8 @@ impl Compiler<'_, '_> {
         // TODO: multi-select instruction to avoid re-pushing attrs on
         // nested selects.
         for fragment in path.attrs() {
-            self.compile_attr(slot, fragment);
-            self.push_op(OpCode::OpAttrsSelect, &node);
+            self.compile_attr(slot, fragment.clone());
+            self.push_op(OpCode::OpAttrsSelect, &fragment);
         }
     }