mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 12:32:20 +02:00
Fix for literal int int expression block, fixed lifetime
This commit is contained in:
parent
723e2177fc
commit
484a0bf375
1 changed files with 3 additions and 1 deletions
|
@ -3409,7 +3409,9 @@ void BfModule::VisitCodeBlock(BfBlock* block)
|
|||
|
||||
if ((exprEvaluator->mResult) && (!exprEvaluator->mResult.mType->IsValuelessType()) && (!exprEvaluator->mResult.IsAddr()))
|
||||
{
|
||||
// We need to make sure we don't retain any values through the scope's ValueScopeHardEnd
|
||||
FixIntUnknown(exprEvaluator->mResult, exprEvaluator->mExpectingType);
|
||||
// We need to make sure we don't retain any values through the scope's ValueScopeHardEnd - and extend alloca through previous scope
|
||||
SetAndRestoreValue<BfScopeData*> prevScope(mCurMethodState->mCurScope, mCurMethodState->mCurScope->mPrevScope);
|
||||
exprEvaluator->mResult = MakeAddressable(exprEvaluator->mResult);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue