mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-11 04:52:21 +02:00
Called ReturnValueDiscarded after string interpolation
This commit is contained in:
parent
f2c9c889ef
commit
8567072eef
1 changed files with 2 additions and 0 deletions
|
@ -3854,6 +3854,7 @@ void BfExprEvaluator::Visit(BfStringInterpolationExpression* stringInterpolation
|
||||||
auto stringType = mModule->ResolveTypeDef(mModule->mCompiler->mStringTypeDef);
|
auto stringType = mModule->ResolveTypeDef(mModule->mCompiler->mStringTypeDef);
|
||||||
if (stringType != NULL)
|
if (stringType != NULL)
|
||||||
{
|
{
|
||||||
|
SetAndRestoreValue<bool> prevUsedAsStatement(mUsedAsStatement, true);
|
||||||
SizedArray<BfExpression*, 2> argExprs;
|
SizedArray<BfExpression*, 2> argExprs;
|
||||||
argExprs.Add(stringInterpolationExpression);
|
argExprs.Add(stringInterpolationExpression);
|
||||||
BfSizedArray<BfExpression*> sizedArgExprs(argExprs);
|
BfSizedArray<BfExpression*> sizedArgExprs(argExprs);
|
||||||
|
@ -3883,6 +3884,7 @@ void BfExprEvaluator::Visit(BfStringInterpolationExpression* stringInterpolation
|
||||||
BfTypedValue newString = mResult;
|
BfTypedValue newString = mResult;
|
||||||
BF_ASSERT(newString);
|
BF_ASSERT(newString);
|
||||||
|
|
||||||
|
SetAndRestoreValue<bool> prevUsedAsStatement(mUsedAsStatement, true);
|
||||||
SizedArray<BfExpression*, 2> argExprs;
|
SizedArray<BfExpression*, 2> argExprs;
|
||||||
argExprs.Add(stringInterpolationExpression);
|
argExprs.Add(stringInterpolationExpression);
|
||||||
BfSizedArray<BfExpression*> sizedArgExprs(argExprs);
|
BfSizedArray<BfExpression*> sizedArgExprs(argExprs);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue