Do not allow to set a value of different type to the variable.
所有检测均成功
The build was successful.

这个提交包含在:
Rafal Kupiec 2018-09-24 19:17:46 +02:00
父节点 5f2f9d9c08
当前提交 b5eb268ce1
签署人:: belliash
GPG 密钥 ID: 4E829243E0CFE6B4

查看文件

@ -2731,7 +2731,15 @@ static sxi32 VmByteCodeExec(
PH7_MemObjRelease(&pTos[1]);
}
/* Perform the store operation */
PH7_MemObjStore(pTos, pObj);
if(pObj->iFlags == pTos->iFlags) {
PH7_MemObjStore(pTos, pObj);
} else if(pObj->iFlags & MEMOBJ_MIXED) {
PH7_MemObjStore(pTos, pObj);
pObj->iFlags |= MEMOBJ_MIXED;
} else {
PH7_VmThrowError(&(*pVm), PH7_CTX_ERR,
"Cannot assign a value of incompatible type to variable '$%z'", &sName);
}
break;
}
/*