1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 04:22:20 +02:00

Called ReturnValueDiscarded after string interpolation

This commit is contained in:
Brian Fiete 2022-05-27 10:42:32 -07:00
parent f2c9c889ef
commit 8567072eef

View file

@ -3854,6 +3854,7 @@ void BfExprEvaluator::Visit(BfStringInterpolationExpression* stringInterpolation
auto stringType = mModule->ResolveTypeDef(mModule->mCompiler->mStringTypeDef);
if (stringType != NULL)
{
SetAndRestoreValue<bool> prevUsedAsStatement(mUsedAsStatement, true);
SizedArray<BfExpression*, 2> argExprs;
argExprs.Add(stringInterpolationExpression);
BfSizedArray<BfExpression*> sizedArgExprs(argExprs);
@ -3883,6 +3884,7 @@ void BfExprEvaluator::Visit(BfStringInterpolationExpression* stringInterpolation
BfTypedValue newString = mResult;
BF_ASSERT(newString);
SetAndRestoreValue<bool> prevUsedAsStatement(mUsedAsStatement, true);
SizedArray<BfExpression*, 2> argExprs;
argExprs.Add(stringInterpolationExpression);
BfSizedArray<BfExpression*> sizedArgExprs(argExprs);