diff --git a/hphp/runtime/vm/bytecode.cpp b/hphp/runtime/vm/bytecode.cpp index 7c85672cf..41130b191 100644 --- a/hphp/runtime/vm/bytecode.cpp +++ b/hphp/runtime/vm/bytecode.cpp @@ -6702,7 +6702,7 @@ VMExecutionContext::createContinuation(ActRec* fp, Class* cls = frameStaticClass(fp); if (origFunc->isClosureBody()) { - genFunc = genFunc->cloneAndSetClass(cls); + genFunc = genFunc->cloneAndSetClass(fp->m_func->cls()); } if (obj.get()) {