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

Verify change to ConstantValueToStringTest01 test #60767

Closed
dibarbet opened this issue Apr 15, 2022 · 3 comments
Closed

Verify change to ConstantValueToStringTest01 test #60767

dibarbet opened this issue Apr 15, 2022 · 3 comments
Labels
Area-Compilers Resolution-By Design The behavior reported in the issue matches the current design

Comments

@dibarbet
Copy link
Member

A change was made to the ConstantValueToStringTest01 as part of the .net7 upgrade. This change needs to be verified for correctness.
3c25e89#diff-fa3e4d702687221608839d749b02eae5fc7fff1aac1467cd089c473e36449c19R195

Original PR - #60523

@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged Issues and PRs which have not yet been triaged by a lead label Apr 15, 2022
@Youssef1313
Copy link
Member

Youssef1313 commented Apr 15, 2022

Note: This most likely relates to converting this enum member to string:

Nothing,
Null = Nothing,

@stephentoub Is it dotnet/runtime#57973 causing this change?

I see https://docs.microsoft.com/en-us/dotnet/api/system.enum.tostring?view=net-6.0 says:

If multiple enumeration members have the same underlying value and you attempt to retrieve the string representation of an enumeration member's name based on its underlying value, your code should not make any assumptions about which name the method will return.

But do you think it's still worth documenting this as a breaking change in dotnet/docs? cc @gewarren

@stephentoub
Copy link
Member

But do you think it's still worth documenting this as a breaking change in dotnet/docs?

I don't. Every bug fix has the potential to break someone somewhere, and this is a bug-fix-level difference.

@jcouv
Copy link
Member

jcouv commented Apr 27, 2022

Based on information above (thanks @Youssef1313 @stephentoub), the test change is expected and correct. Closing

@jcouv jcouv closed this as completed Apr 27, 2022
@jcouv jcouv added Resolution-By Design The behavior reported in the issue matches the current design and removed untriaged Issues and PRs which have not yet been triaged by a lead labels Apr 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Compilers Resolution-By Design The behavior reported in the issue matches the current design
Projects
None yet
Development

No branches or pull requests

4 participants