dotnet/roslyn

Constant folding isn't done when interpolated string contains at least one variable

Open

#65 636 ouverte le 28 nov. 2022

Voir sur GitHub
 (2 commentaires) (0 réactions) (0 assignés)C# (4 257 forks)batch import
Area-Compilershelp wanted

Métriques du dépôt

Stars
 (20 414 stars)
Métriques de merge PR
 (Merge moyen 6j 17h) (256 PRs mergées en 30 j)

Description

Version Used: Not sure, whatever sharplab/Default is at.

Steps to Reproduce:

Explained in this sharplab snippet

Expected Behavior:

The left side of the string is constant folded in the optimized version.

Actual Behavior:

The left side of the string is not constant folded in the optimized version, generating InterpolatedStringHandler operations for what are constant strings

Guide contributeur