mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 04:22:20 +02:00
Fixed globalVar flag handling in const resolve
This commit is contained in:
parent
28a03fcc4b
commit
8d6a29c16a
1 changed files with 2 additions and 2 deletions
|
@ -202,8 +202,8 @@ BfTypedValue BfConstResolver::Resolve(BfExpression* expr, BfType* wantType, BfCo
|
|||
if (isConst)
|
||||
{
|
||||
auto constant = mModule->mBfIRBuilder->GetConstant(mResult.mValue);
|
||||
if ((constant->mConstType == BfConstType_GlobalVar) && ((mBfEvalExprFlags & BfConstResolveFlag_AllowGlobalVariable) != 0))
|
||||
isConst = false;
|
||||
if ((constant->mConstType == BfConstType_GlobalVar) && ((flags & BfConstResolveFlag_AllowGlobalVariable) == 0))
|
||||
isConst = false;
|
||||
}
|
||||
|
||||
if ((!isConst) && ((mBfEvalExprFlags & BfEvalExprFlags_AllowNonConst) == 0))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue