-
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
Disallow using ScopedRef in source #63046
Conversation
@dotnet/roslyn-compiler for second review. Thanks |
@@ -771,7 +771,8 @@ protected override void DecodeWellKnownAttributeImpl(ref DecodeWellKnownAttribut | |||
ReservedAttributes.IsByRefLikeAttribute | | |||
ReservedAttributes.TupleElementNamesAttribute | | |||
ReservedAttributes.NullableAttribute | | |||
ReservedAttributes.NativeIntegerAttribute)) |
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.
What about on method/return?
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.
[ScopedRef]
is not expected on methods or returns. I'll add a test for [return: ScopedRef]
(in a subsequent PR) since it looks like that case is untested.
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.
Added [return: ScopedRef]
test to AttributeTests_ScopedRef.ExplicitAttribute_ReferencedInSource_02()
in #62886.
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.
Done review pass (commit 1)
Fixes #62124
Relates to test plan #59194