about summary refs log tree commit diff
path: root/tvix/eval/src/compiler/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/eval/src/compiler/mod.rs')
-rw-r--r--tvix/eval/src/compiler/mod.rs11
1 files changed, 2 insertions, 9 deletions
diff --git a/tvix/eval/src/compiler/mod.rs b/tvix/eval/src/compiler/mod.rs
index 450799d683d1..43dab506c5ed 100644
--- a/tvix/eval/src/compiler/mod.rs
+++ b/tvix/eval/src/compiler/mod.rs
@@ -950,15 +950,8 @@ impl Compiler<'_> {
 
                 self.patch_jump(jump_to_default);
 
-                // Thunk the default expression, but only if it is something
-                // other than an identifier.
-                if let ast::Expr::Ident(_) = &default_expr {
-                    self.compile(*idx, default_expr);
-                } else {
-                    self.thunk(*idx, &self.span_for(&default_expr), move |c, s| {
-                        c.compile(s, default_expr)
-                    });
-                }
+                // Does not need to thunked since compile() already does so when necessary
+                self.compile(*idx, default_expr);
 
                 self.patch_jump(jump_over_default);
             } else {