aboutsummaryrefslogtreecommitdiffstats
path: root/clox/src/compiler.c
diff options
context:
space:
mode:
Diffstat (limited to 'clox/src/compiler.c')
-rw-r--r--clox/src/compiler.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/clox/src/compiler.c b/clox/src/compiler.c
index b1e4811..7500005 100644
--- a/clox/src/compiler.c
+++ b/clox/src/compiler.c
@@ -339,7 +339,7 @@ static void function(FunctionType type) {
block();
ObjFunction *function = endCompiler();
- emitBytes(OP_CONSTANT, makeConstant(OBJ_VAL(function)));
+ emitBytes(OP_CLOSURE, makeConstant(OBJ_VAL(function)));
}
static void markInitialized() {