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

Make struct types readonly in Microsoft.CodeAnalysis.Features #34478

Merged
merged 1 commit into from Mar 28, 2019

Conversation

Projects
None yet
3 participants
@sharwell
Copy link
Member

sharwell commented Mar 26, 2019

No description provided.

@sharwell sharwell requested review from dotnet/roslyn-compiler as code owners Mar 26, 2019

@sharwell sharwell added the Area-IDE label Mar 26, 2019

@jaredpar
Copy link
Member

jaredpar left a comment

My review here was readonly, no comments were written.

@jasonmalinowski
Copy link
Member

jasonmalinowski left a comment

@jaredpar I assume there's no crazy way that adding 'readonly' is an API breaking change?

@sharwell

This comment has been minimized.

Copy link
Member Author

sharwell commented Mar 27, 2019

@jasonmalinowski removing it would be, but adding shouldn't cause problems

@jasonmalinowski

This comment has been minimized.

Copy link
Member

jasonmalinowski commented Mar 27, 2019

@sharwell: I'm just always paranoid because I've had the compiler team tell me things are safe, only to then be broken by them. 😄

@jaredpar

This comment has been minimized.

Copy link
Member

jaredpar commented Mar 27, 2019

In short this change is fine and should be merged. More generally though the rule of thumb is the following:

If I can add readonly to my struct definition and the code compiles there are no compat concerns

@sharwell sharwell force-pushed the sharwell:readonly-structs branch from 26a7b45 to 2f96377 Mar 27, 2019

@sharwell sharwell merged commit 99771f5 into dotnet:master Mar 28, 2019

1 check passed

license/cla All CLA requirements met.
Details

@sharwell sharwell deleted the sharwell:readonly-structs branch Mar 28, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.