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

Fixed globalvar-derived const addr assigned to local variable

This commit is contained in:
Brian Fiete 2025-02-15 11:36:47 -08:00
parent 94944082eb
commit ab93fb83a4

View file

@ -1659,7 +1659,11 @@ BfLocalVariable* BfModule::HandleVariableDeclaration(BfVariableDeclaration* varD
auto _CheckConst = [&]
{
if (initValue.mValue.IsConst())
if (initValue.IsAddr())
{
isConst = false;
}
else if (initValue.mValue.IsConst())
{
auto constant = mBfIRBuilder->GetConstant(initValue.mValue);