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:
parent
94944082eb
commit
ab93fb83a4
1 changed files with 5 additions and 1 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue