Forráskód Böngészése

Called ReturnValueDiscarded after string interpolation

Brian Fiete 3 éve
szülő
commit
8567072eef
1 módosított fájl, 2 hozzáadás és 0 törlés
  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);
 			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);