Skip to content

Commit

Permalink
Fix points pointed out and refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
tats-u committed Jul 31, 2024
1 parent f46613f commit 4c3fac4
Show file tree
Hide file tree
Showing 3 changed files with 332 additions and 117 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,7 @@ public BoundExpression VisitBinaryOperator(BoundBinaryOperator node, BoundUnaryO
Debug.Assert(node.Type.SpecialType == SpecialType.System_String, "Non-string binary addition should have been handled by VisitConversion or VisitArguments");
ImmutableArray<BoundExpression> parts = CollectBinaryOperatorInterpolatedStringParts(node);
// We do not have to consider custom handlers or formatters here thanks to the above Debug.Assert, so now we have only to take expression trees into account.
var canHideOptimization = !_inExpressionLambda;
return LowerPartsToString(data, parts, node.Syntax, node.Type, canHideOptimization);
return LowerPartsToString(data, parts, node.Syntax, node.Type, usingDirectlyAsString: !_inExpressionLambda);
}

if (node.OperatorKind is BinaryOperatorKind.Utf8Addition)
Expand Down
Loading

0 comments on commit 4c3fac4

Please sign in to comment.