scoped should set ref escape scope to current block#64093
Merged
cston merged 4 commits intodotnet:mainfrom Sep 20, 2022
Merged
Conversation
AlekseyTs
reviewed
Sep 16, 2022
| private readonly LocalDeclarationKind _declarationKind; | ||
| private readonly DeclarationScope _scope; | ||
| private readonly uint _localScopeDepth; | ||
|
|
Contributor
There was a problem hiding this comment.
It doesn't look like we need to store this value, we have _scopeBinder readily available #Closed
AlekseyTs
reviewed
Sep 16, 2022
Contributor
|
Done with review pass (commit 2) |
Contributor
Author
|
@dotnet/roslyn-compiler please review, thanks. |
RikkiGibson
approved these changes
Sep 20, 2022
jaredpar
pushed a commit
to jaredpar/runtime
that referenced
this pull request
Sep 30, 2022
dotnet/roslyn#64093 This change enforced that `scoped` on a local set the escape scope to the current block where previously it was incorrectly setting to the containing method.
jaredpar
pushed a commit
to jaredpar/runtime
that referenced
this pull request
Sep 30, 2022
dotnet/roslyn#64093 This change enforced that `scoped` on a local set the escape scope to the current block where previously it was incorrectly setting to the containing method.
jaredpar
added a commit
to dotnet/runtime
that referenced
this pull request
Oct 3, 2022
* Patches for scoped locals dotnet/roslyn#64093 This change enforced that `scoped` on a local set the escape scope to the current block where previously it was incorrectly setting to the containing method. * Make return and out equivalent for ref safety dotnet/roslyn#64318 This change allows anything returnable from a method to be assigned to an `out` parameter. In several places had to add `scoped` to `ref` to inform compiler they could not be captured in an `out` parameter. * Warnings on managed pointer types dotnet/roslyn#64294 Compiler now issues warnings for pointer operations involving managed types * Update compiler version * PR feedback * Ref safety rules attribute Co-authored-by: Charles Stoner <10732005+cston@users.noreply.github.com>
carlossanlop
pushed a commit
to dotnet/runtime
that referenced
this pull request
Oct 4, 2022
* Patches for scoped locals dotnet/roslyn#64093 This change enforced that `scoped` on a local set the escape scope to the current block where previously it was incorrectly setting to the containing method. * Make return and out equivalent for ref safety dotnet/roslyn#64318 This change allows anything returnable from a method to be assigned to an `out` parameter. In several places had to add `scoped` to `ref` to inform compiler they could not be captured in an `out` parameter. * Warnings on managed pointer types dotnet/roslyn#64294 Compiler now issues warnings for pointer operations involving managed types * Update compiler version * Fixup * Ref safety rules attribute Co-authored-by: Charles Stoner <10732005+cston@users.noreply.github.com>
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.
scopedshould set ref escape scope to the current block rather than the current method.Fixes #64009.