-
Notifications
You must be signed in to change notification settings - Fork 4k
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
scoped
should set ref escape scope to current block
#64093
Conversation
@@ -32,6 +32,7 @@ internal class SourceLocalSymbol : LocalSymbol | |||
private readonly RefKind _refKind; | |||
private readonly LocalDeclarationKind _declarationKind; | |||
private readonly DeclarationScope _scope; | |||
private readonly uint _localScopeDepth; | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't look like we need to store this value, we have _scopeBinder
readily available #Closed
Done with review pass (commit 2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM (commit 4)
@dotnet/roslyn-compiler please review, thanks. |
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.
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.
* 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>
* 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>
scoped
should set ref escape scope to the current block rather than the current method.Fixes #64009.