Skip to content

[C# 8.0] 12.6.6.1 should not require a defensive copy to invoke a readonly member #928

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

Open
BillWagner opened this issue Sep 12, 2023 · 1 comment
Assignees
Milestone

Comments

@BillWagner
Copy link
Member

To fix #894, a defensive copy is required to an in parameter of a non-readonly struct type to invoke a member.

C# 8 adds readonly members to non-readonly structs. A defensive copy isn't required to invoke a readonly member.

See #927 (desccription)

@BillWagner
Copy link
Member Author

See #673 This change should be added to that PR.

@jskeet jskeet modified the milestones: Pre-C# 8.0, C# 8.0 Jan 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants