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

support for records #13

Open
vmachacek opened this issue Feb 1, 2023 · 3 comments
Open

support for records #13

vmachacek opened this issue Feb 1, 2023 · 3 comments

Comments

@vmachacek
Copy link

please add support for records,

now this wont do anything

[Cloneable.Cloneable]
public partial record Foo(string Bar);
@Spoomer
Copy link

Spoomer commented Feb 10, 2023

I don't know, if you know this, but you can copy records with the with keyword:

Foo with {}

@vmachacek
Copy link
Author

yes, i figured this after i posted this, but that will only do shallow copy, correct?

@Spoomer
Copy link

Spoomer commented Feb 21, 2023

Correct! Records should be optimally immutable - so this should be ok, if you don't use mutable classes as properties..

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