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

Fix regression in definite assignment analysis for out parameters in presence of local functions. #70563

Merged
merged 2 commits into from
Oct 26, 2023

Conversation

AlekseyTs
Copy link
Contributor

Fixes #69775.

@AlekseyTs AlekseyTs requested a review from a team as a code owner October 26, 2023 00:06
@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged Issues and PRs which have not yet been triaged by a lead label Oct 26, 2023
@AlekseyTs
Copy link
Contributor Author

@dotnet/roslyn-compiler For the second review.

@cston
Copy link
Member

cston commented Oct 26, 2023

"));

Why is x considered assigned on entry? #Resolved


Refers to: src/Compilers/CSharp/Test/Emit2/FlowAnalysis/RegionAnalysisTests.cs:10787 in 474e087. [](commit_id = 474e087, deletion_comment = False)

@AlekseyTs
Copy link
Contributor Author

"));

Why is x considered assigned on entry?

The code is outside of the constructor and x is a constructor parameter. Assuming constructor has been executed, all its parameters are assigned. Besides, this is an error scenario, ref parameters cannot be used outside of the constructor.


In reply to: 1781333890


Refers to: src/Compilers/CSharp/Test/Emit2/FlowAnalysis/RegionAnalysisTests.cs:10787 in 474e087. [](commit_id = 474e087, deletion_comment = False)

@AlekseyTs AlekseyTs enabled auto-merge (squash) October 26, 2023 16:11
@AlekseyTs AlekseyTs merged commit 833906b into dotnet:main Oct 26, 2023
25 checks passed
@ghost ghost added this to the Next milestone Oct 26, 2023
AlekseyTs added a commit to AlekseyTs/roslyn that referenced this pull request Oct 27, 2023
@jjonescz jjonescz modified the milestones: Next, 17.9 P1 Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Compilers untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
Development

Successfully merging this pull request may close these issues.

C# out param is not reported as an error in visual studio if a local function is called.
3 participants