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

Treat init-only properties as cannot write #1730

Merged
merged 1 commit into from
Sep 4, 2024

Conversation

hez2010
Copy link
Contributor

@hez2010 hez2010 commented Sep 2, 2024

We cannot write to init-only properties after initialized, treat them as cannot write to avoid compilation error.

Alternatives: generate an UnsafeAccessor to mutate the property.

@manodasanW
Copy link
Member

Good catch, I think this is the right fix for this given this isn't a write property if it is specified as init only.

@manodasanW manodasanW merged commit 5ad543d into microsoft:master Sep 4, 2024
1 check passed
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

Successfully merging this pull request may close these issues.

2 participants