mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-19 00:20:25 +02:00
Fixed var decl short circuiting check
This commit is contained in:
parent
fc0fcd103f
commit
3d4455d1f6
1 changed files with 1 additions and 1 deletions
|
@ -2742,7 +2742,7 @@ bool BfExprEvaluator::CheckVariableDeclaration(BfAstNode* checkNode, bool requir
|
||||||
}
|
}
|
||||||
else if ((binOpExpr->mOp == BfBinaryOp_ConditionalOr) && (!exprMustBeTrue))
|
else if ((binOpExpr->mOp == BfBinaryOp_ConditionalOr) && (!exprMustBeTrue))
|
||||||
{
|
{
|
||||||
if ((binOpExpr->mRight != NULL) & (binOpExpr->mRight->Contains(checkChild)))
|
if ((binOpExpr->mRight != NULL) && (binOpExpr->mRight->Contains(checkChild)))
|
||||||
{
|
{
|
||||||
return _Fail("Conditional short-circuiting may skip variable initialization", binOpExpr->mOpToken);
|
return _Fail("Conditional short-circuiting may skip variable initialization", binOpExpr->mOpToken);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue