dotnet/roslyn
View on GitHubConstant folding isn't done when interpolated string contains at least one variable
Open
#65,636 opened on Nov 28, 2022
Area-Compilershelp wanted
Repository metrics
- Stars
- (20,414 stars)
- PR merge metrics
- (Avg merge 6d 17h) (256 merged PRs in 30d)
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