Repository navigation
Change a default value of C# Conversion - #84628
Merged
Merged
Conversation
|
Azure Pipelines: Successfully started running 1 pipeline(s). 1 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
default(Conversion) be Exists == falseConversion
DoctorKrolic
marked this pull request as ready for review
August 1, 2026 11:51
|
Azure Pipelines: Successfully started running 2 pipeline(s). There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
Author
|
@333fred I assume a breaking API change follows a similar process to an API proposal. If so, may you please schedule this one for a review session? Tagged you specificly since you are the person who seem to be usually doing it |
Member
|
Not sure that a bugfix really qualifies as a breaking change. I'll send an email about it though; feel free to tag me again if I haven't gotten back you in a week. |
Member
|
Compat council approved the general concept. Will try to review soon. |
jjonescz
reviewed
Aug 14, 2026
Co-authored-by: Jan Jones <jan.jones.cz@gmail.com>
jjonescz
approved these changes
Aug 17, 2026
333fred
reviewed
Aug 17, 2026
333fred
left a comment
Member
There was a problem hiding this comment.
Couple of wording changes for the breaking change doc. Also needs a review from @dotnet/roslyn-ide.
Co-authored-by: Fred Silberberg <fred@silberberg.xyz>
Co-authored-by: Fred Silberberg <fred@silberberg.xyz>
333fred
approved these changes
Aug 18, 2026
333fred
left a comment
Member
There was a problem hiding this comment.
Still needs a review from @dotnet/roslyn-ide.
jasonmalinowski
approved these changes
Aug 18, 2026
Member
|
Thanks @DoctorKrolic! |
This was referenced Aug 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes: #35918
During foreach binding if the collection is an error type binder returned
default(ForEachStatementInfo), which includedCurrentConversionandElementConversion. However due to the fact that a default value of internalConversionKindwasUnsetConversionKind, which, I guess, was meant for internal use inside the compiler, the default value ofConversionstruct hadExistsandIsReferenceproperties returntrue. As it turned out, that internal kind isn't used anymore and all existing usages can becomeNoConversionwithout issues. So I removed the internal kind makingNoConversiona new default. This is a breaking API change and I documented it as one, but I believe this is a correct way to go forward. There was only one place inside the whole roslyn that relied on this quirk