diff options
Diffstat (limited to 'clox/src/vm.c')
-rw-r--r-- | clox/src/vm.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/clox/src/vm.c b/clox/src/vm.c index 4b0fe48..6b15a3a 100644 --- a/clox/src/vm.c +++ b/clox/src/vm.c @@ -110,6 +110,7 @@ static bool callValue(Value callee, int argCount) { switch (OBJ_TYPE(callee)) { case OBJ_BOUND_METHOD: { ObjBoundMethod *bound = AS_BOUND_METHOD(callee); + vm.stackTop[-argCount - 1] = bound->receiver; return call(bound->method, argCount); } case OBJ_CLASS: { |