call() on generator must return 2 to yield to callSimple

This commit is contained in:
K. Lange 2021-03-17 08:06:50 +09:00
parent 3123a3eb40
commit 14af8bb8f3

View File

@ -756,7 +756,7 @@ _finishKwarg:
KrkInstance * gen = krk_buildGenerator(closure, krk_currentThread.stackTop - argCount, argCount);
krk_currentThread.stackTop = krk_currentThread.stackTop - argCount - extra;
krk_push(OBJECT_VAL(gen));
return 1;
return 2;
}
if (krk_currentThread.frameCount == KRK_CALL_FRAMES_MAX) {
krk_runtimeError(vm.exceptions->baseException, "Too many call frames.");