Ver Fonte

Called ReturnValueDiscarded after string interpolation

Brian Fiete há 3 anos atrás
pai
commit
8567072eef
1 ficheiros alterados com 2 adições e 0 exclusões
  1. 2 0
      IDEHelper/Compiler/BfExprEvaluator.cpp

+ 2 - 0
IDEHelper/Compiler/BfExprEvaluator.cpp

@@ -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);