Repository navigation
Special-case nullable walker to understand lock (null) in legacy mode - #85182
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. |
jjonescz
approved these changes
Sep 8, 2026
jjonescz
reviewed
Sep 8, 2026
333fred
requested changes
Sep 8, 2026
null an object type inside lock (null) in legacy modelock (null) in legacy mode
Contributor
Author
|
May I have a review here please? |
RikkiGibson
reviewed
Sep 17, 2026
RikkiGibson
reviewed
Sep 17, 2026
RikkiGibson
left a comment
Member
There was a problem hiding this comment.
LGTM aside from review comment.
I considered if we should use NullableWalker.VisitConversion here, and I think it possibly would have been the best option if we were starting from scratch. But at this point, it doesn't feel worth the churn.
333fred
reviewed
Sep 18, 2026
333fred
left a comment
Member
There was a problem hiding this comment.
LGTM other than the unnecessary edits left over in the iop test file.
Co-authored-by: Rikki Gibson <rikkigibson@gmail.com>
RikkiGibson
approved these changes
Sep 19, 2026
333fred
approved these changes
Sep 19, 2026
333fred
enabled auto-merge (squash)
September 19, 2026 16:40
333fred
disabled auto-merge
September 19, 2026 16:40
333fred
enabled auto-merge (squash)
September 19, 2026 16:40
7 tasks done
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: #76597
lock (maybeNullExpr)has already been handled (see test above newly added ones). The only problem waslock (null). It exists only in legacy mode (strict makes it an error), so thatnullcan sneak into runtime and causeArgumentNullException. It wasn't handled because thatnullwas never assigned a type. MadeNullableWalkerrecognize this case and report it separatelyMicrosoft Reviewers: Open in CodeFlow