Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interpolated String Concatenation in .NET 6 is incorrect #55809

Closed
jayendusharma opened this issue Aug 23, 2021 · 4 comments
Closed

Interpolated String Concatenation in .NET 6 is incorrect #55809

jayendusharma opened this issue Aug 23, 2021 · 4 comments
Labels
Area-Compilers Resolution-Duplicate The described behavior is tracked in another issue

Comments

@jayendusharma
Copy link

Description

Interpolated string concatenation output is different between .NET 5 and .NET 6 preview 7

Configuration

Regression?

yes

Other information

Running the following code snippet in .NET 5

using System;

int a = 0;
string b = nameof(a);
Console.WriteLine($"Name, " + $"Value {a} ," + $"Name {b} .");
Console.ReadLine();

gives the following output: "Name, Value 0 ,Name a ."

in .NET 6 the output is: "Name, ,0Value .aName".

This is incorrect and shouldn't change

@dotnet-issue-labeler
Copy link

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@ufcpp
Copy link
Contributor

ufcpp commented Aug 23, 2021

#55461 (comment)

@stephentoub
Copy link
Member

stephentoub commented Aug 23, 2021

Duplicate of #55461

@stephentoub stephentoub transferred this issue from dotnet/runtime Aug 23, 2021
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Compilers untriaged Issues and PRs which have not yet been triaged by a lead labels Aug 23, 2021
@stephentoub stephentoub marked this as a duplicate of #55461 Aug 23, 2021
@sharwell sharwell added the Resolution-Duplicate The described behavior is tracked in another issue label Aug 23, 2021
@jcouv
Copy link
Member

jcouv commented Aug 23, 2021

This was fixed in 17.0p4 by PR #55494. Thanks for reporting

@jcouv jcouv closed this as completed Aug 23, 2021
@jcouv jcouv removed the untriaged Issues and PRs which have not yet been triaged by a lead label Aug 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Compilers Resolution-Duplicate The described behavior is tracked in another issue
Projects
None yet
Development

No branches or pull requests

5 participants