about summary refs log tree commit diff
path: root/tvix
diff options
context:
space:
mode:
Diffstat (limited to 'tvix')
-rw-r--r--tvix/eval/src/compiler/mod.rs12
1 files changed, 10 insertions, 2 deletions
diff --git a/tvix/eval/src/compiler/mod.rs b/tvix/eval/src/compiler/mod.rs
index b3315ee9119e..8a2fb5eb97e2 100644
--- a/tvix/eval/src/compiler/mod.rs
+++ b/tvix/eval/src/compiler/mod.rs
@@ -367,8 +367,16 @@ impl Compiler {
 
     fn compile_attr(&mut self, slot: Option<LocalIdx>, node: ast::Attr) {
         match node {
-            ast::Attr::Dynamic(dynamic) => self.compile(slot, dynamic.expr().unwrap()),
-            ast::Attr::Str(s) => self.compile_str(slot, s),
+            ast::Attr::Dynamic(dynamic) => {
+                self.compile(slot, dynamic.expr().unwrap());
+                self.emit_force();
+            }
+
+            ast::Attr::Str(s) => {
+                self.compile_str(slot, s);
+                self.emit_force();
+            }
+
             ast::Attr::Ident(ident) => self.emit_literal_ident(&ident),
         }
     }