1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 12:32:20 +02:00

Improved "const" handling of local variable when referencing globals

This commit is contained in:
Brian Fiete 2025-05-22 06:03:18 +02:00
parent 989e8455e8
commit e7a966c1b5
3 changed files with 7 additions and 27 deletions

View file

@ -1714,10 +1714,10 @@ BfLocalVariable* BfModule::HandleVariableDeclaration(BfVariableDeclaration* varD
localDef->mIsReadOnly = true;
if (initValue)
{
if ((initValue.mValue) && (initValue.mValue.IsConst()))
if (mBfIRBuilder->IsConstValue(initValue.mValue))
{
isConst = true;
}
}
}
}
}