Verify that Program::main() returns a value of int or void.
一些检查报告了错误
The build has failed.

这个提交包含在:
Rafal Kupiec 2019-03-17 19:56:07 +01:00
父节点 fe898ec7e7
当前提交 55b652c740
签署人:: belliash
GPG 密钥 ID: 4E829243E0CFE6B4

查看文件

@ -5499,6 +5499,9 @@ PH7_PRIVATE sxi32 PH7_VmByteCodeExec(ph7_vm *pVm) {
if(!pMethod) {
PH7_VmThrowError(&(*pVm), PH7_CTX_ERR, "Cannot find a program entry point 'Program::main()'");
}
if(pMethod->sFunc.nType != MEMOBJ_INT && pMethod->sFunc.nType != MEMOBJ_VOID) {
PH7_VmThrowError(&(*pVm), PH7_CTX_ERR, "The 'Program::main()' can only return an Integer or Void value");
}
/* A set of arguments is stored in array of strings */
pArgs->iFlags |= MEMOBJ_STRING;
/* Initialize variable for return value */