From ce89dd9c2fee8786cbf96cba5808633a5229522a Mon Sep 17 00:00:00 2001 From: Bob Nystrom Date: Fri, 29 Nov 2013 16:17:43 -0800 Subject: [PATCH] Fix compiling constructors. --- src/wren_compiler.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wren_compiler.c b/src/wren_compiler.c index 8ca7e27d..ce387393 100644 --- a/src/wren_compiler.c +++ b/src/wren_compiler.c @@ -1447,8 +1447,8 @@ void method(Compiler* compiler, Code instruction, SignatureFn signature) // The receiver is always stored in the first local slot. // TODO(bob): Will need to do something different to handle functions // enclosed in methods. - emit(compiler, CODE_LOAD_LOCAL); - emit(compiler, 0); + emit(&methodCompiler, CODE_LOAD_LOCAL); + emit(&methodCompiler, 0); } emit(&methodCompiler, CODE_END);