Skip to content

Clarify in docs that @field may be used as an lvalue #2941

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

Closed
daurnimator opened this issue Jul 24, 2019 · 1 comment · Fixed by #3172
Closed

Clarify in docs that @field may be used as an lvalue #2941

daurnimator opened this issue Jul 24, 2019 · 1 comment · Fixed by #3172
Labels
contributor friendly This issue is limited in scope and/or knowledge of Zig internals. docs
Milestone

Comments

@daurnimator
Copy link
Contributor

daurnimator commented Jul 24, 2019

I was surprised (but happy) to find out that @field can be used as an lvalue (see #1099 (comment)).
The docs currently say "access", which to me only implies readability.

As part of solving this issue, an example of using @field as an lvalue should be added to the documentation.

@andrewrk andrewrk added the docs label Jul 24, 2019
@andrewrk andrewrk added this to the 0.6.0 milestone Jul 24, 2019
@andrewrk andrewrk added the contributor friendly This issue is limited in scope and/or knowledge of Zig internals. label Jul 24, 2019
@vegai
Copy link
Contributor

vegai commented Sep 3, 2019

It seems to me that an example would highlight it the best. I'll make a PR soonish.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor friendly This issue is limited in scope and/or knowledge of Zig internals. docs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants