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:
parent
989e8455e8
commit
e7a966c1b5
3 changed files with 7 additions and 27 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue