Skip to content

Disallow using ScopedRef in source#63046

Merged
cston merged 1 commit intodotnet:mainfrom
jcouv:scopedref-source
Aug 9, 2022
Merged

Disallow using ScopedRef in source#63046
cston merged 1 commit intodotnet:mainfrom
jcouv:scopedref-source

Conversation

@jcouv
Copy link
Member

@jcouv jcouv commented Jul 29, 2022

Fixes #62124

Relates to test plan #59194

@jcouv jcouv self-assigned this Jul 29, 2022
@ghost ghost added the Area-Compilers label Jul 29, 2022
@jcouv jcouv added the Blocked label Jul 29, 2022
@jcouv jcouv force-pushed the scopedref-source branch from cf4a98a to 3a13a15 Compare August 5, 2022 15:52
@jcouv jcouv marked this pull request as ready for review August 5, 2022 16:04
@jcouv jcouv requested a review from a team as a code owner August 5, 2022 16:04
@jcouv jcouv requested a review from cston August 5, 2022 16:04
@jcouv
Copy link
Member Author

jcouv commented Aug 5, 2022

@dotnet/roslyn-compiler for second review. Thanks

ReservedAttributes.IsByRefLikeAttribute |
ReservedAttributes.TupleElementNamesAttribute |
ReservedAttributes.NullableAttribute |
ReservedAttributes.NativeIntegerAttribute))
Copy link
Member

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?

Copy link
Contributor

@cston cston Aug 8, 2022

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.

Copy link
Contributor

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.

Copy link
Member

@333fred 333fred left a 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)

@cston cston merged commit c59aa66 into dotnet:main Aug 9, 2022
@ghost ghost added this to the Next milestone Aug 9, 2022
@dibarbet dibarbet modified the milestones: Next, 17.4 P2 Sep 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Report error if ScopedRefAttribute is used directly in source

4 participants