mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-11 04:52:21 +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)
|
if (isConst)
|
||||||
{
|
{
|
||||||
auto constant = mModule->mBfIRBuilder->GetConstant(mResult.mValue);
|
auto constant = mModule->mBfIRBuilder->GetConstant(mResult.mValue);
|
||||||
if ((constant->mConstType == BfConstType_GlobalVar) && ((mBfEvalExprFlags & BfConstResolveFlag_AllowGlobalVariable) != 0))
|
if ((constant->mConstType == BfConstType_GlobalVar) && ((flags & BfConstResolveFlag_AllowGlobalVariable) == 0))
|
||||||
isConst = false;
|
isConst = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((!isConst) && ((mBfEvalExprFlags & BfEvalExprFlags_AllowNonConst) == 0))
|
if ((!isConst) && ((mBfEvalExprFlags & BfEvalExprFlags_AllowNonConst) == 0))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue