mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 12:32:20 +02:00
Fixed unreachable code warning with lambda dtor
This commit is contained in:
parent
fa9b0d2297
commit
503590cea5
1 changed files with 4 additions and 3 deletions
|
@ -11918,17 +11918,18 @@ void BfExprEvaluator::VisitLambdaBodies(BfAstNode* body, BfFieldDtorDeclaration*
|
|||
if (auto blockBody = BfNodeDynCast<BfBlock>(body))
|
||||
mModule->VisitChild(blockBody);
|
||||
else if (auto bodyExpr = BfNodeDynCast<BfExpression>(body))
|
||||
{
|
||||
{
|
||||
auto result = mModule->CreateValueFromExpression(bodyExpr);
|
||||
if ((result) && (mModule->mCurMethodState->mClosureState != NULL) &&
|
||||
(mModule->mCurMethodState->mClosureState->mReturnTypeInferState == BfReturnTypeInferState_Inferring))
|
||||
mModule->mCurMethodState->mClosureState->mReturnType = result.mType;
|
||||
mModule->mCurMethodState->mClosureState->mReturnType = result.mType;
|
||||
}
|
||||
|
||||
while (fieldDtor != NULL)
|
||||
{
|
||||
mModule->mCurMethodState->mLeftBlockUncond = false;
|
||||
mModule->VisitChild(fieldDtor->mBody);
|
||||
fieldDtor = fieldDtor->mNextFieldDtor;
|
||||
fieldDtor = fieldDtor->mNextFieldDtor;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue