summaryrefslogtreecommitdiff
path: root/src/eval/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/eval/mod.rs')
-rw-r--r--src/eval/mod.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/eval/mod.rs b/src/eval/mod.rs
index f30ee7a7..17620161 100644
--- a/src/eval/mod.rs
+++ b/src/eval/mod.rs
@@ -401,7 +401,8 @@ impl Eval for ExprClosure {
visitor.finish()
};
- Value::Func(ValueFunc::new(None, move |ctx, args| {
+ let name = self.name.as_ref().map(|id| id.to_string());
+ Value::Func(ValueFunc::new(name, move |ctx, args| {
// Don't leak the scopes from the call site. Instead, we use the
// scope of captured variables we collected earlier.
let prev = std::mem::take(&mut ctx.scopes);