Skip to content

string interpolation simple cases are not optimized (such as: string s1 = $"hello") #76

@dzeitlin

Description

@dzeitlin

string s1 = $"hello"; emits string s1= string.Format("hello", new object[0]);
instead of simple: s1 = "hello";

also consider to optimize cases such as:
$"hello" + $" " + $"world" to constant expression evaluation (or at least one string.Format() call, not 3 in this case)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions