mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 04:22:20 +02:00
Moved scope of 'if (Call(var X))' arguments into the if parent's scope
This commit is contained in:
parent
5b8d2ffee2
commit
965e2e2930
4 changed files with 79 additions and 0 deletions
|
@ -3527,6 +3527,7 @@ void BfModule::DoIfStatement(BfIfStatement* ifStmt, bool includeTrueStmt, bool i
|
|||
|
||||
BfScopeData newScope;
|
||||
newScope.mOuterIsConditional = true;
|
||||
newScope.mScopeKind = BfScopeKind_StatementTarget;
|
||||
if (ifStmt->mLabelNode != NULL)
|
||||
newScope.mLabelNode = ifStmt->mLabelNode->mLabel;
|
||||
mCurMethodState->AddScope(&newScope);
|
||||
|
@ -3548,6 +3549,8 @@ void BfModule::DoIfStatement(BfIfStatement* ifStmt, bool includeTrueStmt, bool i
|
|||
BfAutoParentNodeEntry autoParentNodeEntry(this, ifStmt);
|
||||
BfTypedValue condValue = CreateValueFromExpression(ifStmt->mCondition, boolType);
|
||||
|
||||
newScope.mScopeKind = BfScopeKind_Normal;
|
||||
|
||||
deferredLocalAssignData.mIsIfCondition = false;
|
||||
|
||||
// The "extend chain" is only valid for the conditional -- since that expression may contain unconditionally executed and
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue