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

Specify when record struct synthesized members are 'readonly' #4890

Merged
merged 4 commits into from
Aug 10, 2021

Conversation

RikkiGibson
Copy link
Contributor

No description provided.

@jcouv
Copy link
Member

jcouv commented Jun 29, 2021

I must have gotten confused. The note that I'd taken to test plan was this:
"LDM: Emitting GetHashCode and Equals as readonly (conditionally) (answer: let's not do anything special)"
Does that differ from LDM notes?

Resolved: LDM revisited this decision by mail.

Copy link
Member

@Youssef1313 Youssef1313 left a comment

Choose a reason for hiding this comment

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

Can't PrintMembers and Deconstruct be always readonly? I don't get why there is a restriction. Those methods aren't supposed to write to fields/properties.
Anything I'm missing?

@svick
Copy link
Contributor

svick commented Jul 18, 2021

@Youssef1313 I think the problematic case is when you have a property with a non-readonly getter.

@RikkiGibson RikkiGibson marked this pull request as ready for review July 19, 2021 23:48
@RikkiGibson RikkiGibson requested a review from a team as a code owner July 19, 2021 23:48
proposals/record-structs.md Outdated Show resolved Hide resolved
Copy link
Member

@jcouv jcouv left a comment

Choose a reason for hiding this comment

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

Done with review pass (iteration 1)

Copy link
Member

@jcouv jcouv left a comment

Choose a reason for hiding this comment

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

LGTM Thanks (iteration 2)

@jcouv
Copy link
Member

jcouv commented Jul 20, 2021

Do we want to hold off this PR until we're ready to make the corresponding implementation change?

@RikkiGibson
Copy link
Contributor Author

Do we want to hold off this PR until we're ready to make the corresponding implementation change?

Yeah, I think we should just merge it in sync with the implementation change.

@RikkiGibson
Copy link
Contributor Author

It was a bogus conflict (GitHub found a conflict, but local git reported no conflicts upon merge).

@RikkiGibson RikkiGibson merged commit 815cb69 into main Aug 10, 2021
@RikkiGibson RikkiGibson deleted the readonly-record-struct-members branch August 10, 2021 21:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants