mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-23 18:18:00 +02:00
Fixed early-exit cases in ctor
This commit is contained in:
parent
687dde063f
commit
195a699af4
3 changed files with 33 additions and 3 deletions
|
@ -4891,7 +4891,11 @@ void BfModule::Visit(BfReturnStatement* returnStmt)
|
|||
}
|
||||
return;
|
||||
}
|
||||
checkScope = checkScope->mPrevScope;
|
||||
if (checkScope->mInInitBlock)
|
||||
{
|
||||
Fail("Initialization blocks cannot contain 'return' statements", returnStmt);
|
||||
}
|
||||
checkScope = checkScope->mPrevScope;
|
||||
}
|
||||
|
||||
auto checkLocalAssignData = mCurMethodState->mDeferredLocalAssignData;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue