Verify that Program::main() returns a value of int or void.
The build has failed.
Details
The build has failed.
Details
This commit is contained in:
parent
fe898ec7e7
commit
55b652c740
|
@ -5499,6 +5499,9 @@ PH7_PRIVATE sxi32 PH7_VmByteCodeExec(ph7_vm *pVm) {
|
||||||
if(!pMethod) {
|
if(!pMethod) {
|
||||||
PH7_VmThrowError(&(*pVm), PH7_CTX_ERR, "Cannot find a program entry point 'Program::main()'");
|
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 */
|
/* A set of arguments is stored in array of strings */
|
||||||
pArgs->iFlags |= MEMOBJ_STRING;
|
pArgs->iFlags |= MEMOBJ_STRING;
|
||||||
/* Initialize variable for return value */
|
/* Initialize variable for return value */
|
||||||
|
|
Loading…
Reference in New Issue