Install $parent & $this only if there is class instantiated.
所有检查均成功
The build was successful.

这个提交包含在:
2019-06-02 19:46:56 +02:00
父节点 3689a0239a
当前提交 5f90f3e8e1

查看文件

@@ -4679,7 +4679,7 @@ static sxi32 VmByteCodeExec(
/* Raise exception: Out of memory */
PH7_VmMemoryError(&(*pVm));
}
if(pVmFunc->iFlags & VM_FUNC_CLASS_METHOD) {
if(pThis && pVmFunc->iFlags & VM_FUNC_CLASS_METHOD) {
/* Install the '$parent' variable */
static const SyString sParent = { "parent", sizeof("parent") - 1 };
pObj = VmCreateMemObj(&(*pVm), &sParent, TRUE);