1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-22 09:38:01 +02:00

Fixed issue with untargeted scope allocations in initializer blocks

This commit is contained in:
Brian Fiete 2025-01-07 08:08:15 -08:00
parent be3f688576
commit 5d694cc3c4

View file

@ -11740,6 +11740,7 @@ void BfExprEvaluator::Visit(BfInitializerExpression* initExpr)
if (initExpr->mInlineTypeRef != NULL) if (initExpr->mInlineTypeRef != NULL)
mModule->mCurMethodState->mPrivateTypeInstance = initValue.mType->ToTypeInstance(); mModule->mCurMethodState->mPrivateTypeInstance = initValue.mType->ToTypeInstance();
newScope.mAllowTargeting = false;
newScope.mInnerIsConditional = true; newScope.mInnerIsConditional = true;
newScope.mCloseNode = initExpr->mCloseBrace; newScope.mCloseNode = initExpr->mCloseBrace;
mModule->mCurMethodState->AddScope(&newScope); mModule->mCurMethodState->AddScope(&newScope);