Fix error message when propagating invalid function parameter to const
This commit is contained in:
parent
7f31ee9c71
commit
1abdd1476e
|
@ -759,7 +759,7 @@ Declaration* GlobalOptimizer::Analyze(Expression* exp, Declaration* procDec, uin
|
||||||
}
|
}
|
||||||
if (!(pdec->mFlags & DTF_FPARAM_UNUSED) && !(pdec->mOptFlags & OPTF_VAR_NOCONST))
|
if (!(pdec->mFlags & DTF_FPARAM_UNUSED) && !(pdec->mOptFlags & OPTF_VAR_NOCONST))
|
||||||
{
|
{
|
||||||
if (pex->mType == EX_CONSTANT && pdec->mBase->IsSimpleType())
|
if (pex->mType == EX_CONSTANT && pdec->mBase->IsSimpleType() && pdec->mBase->CanAssign(pex->mDecType))
|
||||||
{
|
{
|
||||||
if (pdec->mOptFlags & OPTF_VAR_CONST)
|
if (pdec->mOptFlags & OPTF_VAR_CONST)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue