mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 20:42:21 +02:00
Fixed constant string adding
This commit is contained in:
parent
cad0b10aae
commit
90d4b84d95
1 changed files with 7 additions and 0 deletions
|
@ -20002,6 +20002,13 @@ void BfExprEvaluator::PerformBinaryOperation(BfAstNode* leftExpression, BfAstNod
|
|||
}
|
||||
}
|
||||
|
||||
if ((binaryOp == BfBinaryOp_Add) && (resultType->IsInstanceOf(mModule->mCompiler->mStringTypeDef)))
|
||||
{
|
||||
// Allow failover to constant string addition
|
||||
if ((leftValue.mValue.IsConst()) && (rightValue.mValue.IsConst()))
|
||||
skipOpOverload = true;
|
||||
}
|
||||
|
||||
if (!skipOpOverload)
|
||||
{
|
||||
BfBinaryOp findBinaryOp = binaryOp;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue