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

Additional tests for ref fields #64707

Merged
merged 1 commit into from
Oct 18, 2022
Merged

Additional tests for ref fields #64707

merged 1 commit into from
Oct 18, 2022

Conversation

cston
Copy link
Member

@cston cston commented Oct 13, 2022

From test plan #59194:

  • field must be declared readonly ref in readonly ref struct
  • readonly ref emitted as initonly
  • ref readonly emitted with System.Runtime.CompilerServices.IsReadOnlyAttribute
  • ScopedRefAttribute changes scoped default when targeting:
    • ...
    • ref to ref struct parameters
  • cannot make an anonymous type with ref members
  • classification for scoped

@cston cston marked this pull request as ready for review October 17, 2022 22:41
@cston cston requested review from a team as code owners October 17, 2022 22:41
@cston cston merged commit 2d874d2 into dotnet:main Oct 18, 2022
@cston cston deleted the rf-tests branch October 18, 2022 04:33
@ghost ghost added this to the Next milestone Oct 18, 2022
}
.class public sealed S extends [mscorlib]System.ValueType
{
.field public int32 F2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't understand why a by-value field is used in this scenario. Could you please clarify?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, this should be int32& F2. I'll update in a subsequent PR.

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.

3 participants