From 947ddc45c8a00f1a975830cffc46f487476a67c9 Mon Sep 17 00:00:00 2001 From: Yuichi Nishiwaki Date: Wed, 23 Oct 2013 15:46:18 +0900 Subject: [PATCH] bugfix: lambda must use new_scope to gen body code --- src/codegen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/codegen.c b/src/codegen.c index 7241183a..a29e181a 100644 --- a/src/codegen.c +++ b/src/codegen.c @@ -458,7 +458,7 @@ pic_gen_lambda(pic_state *pic, pic_value obj, struct pic_scope *scope) /* body */ body = pic_cdr(pic, pic_cdr(pic, obj)); for (v = body; ! pic_nil_p(v); v = pic_cdr(pic, v)) { - pic_gen(pic, irep, pic_car(pic, v), scope); + pic_gen(pic, irep, pic_car(pic, v), new_scope); irep->code[irep->clen].insn = OP_POP; irep->clen++; }