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

§9.7.2.1: Reference §16.4.12 for clarity #901

Closed
KalleOlaviNiemitalo opened this issue Aug 17, 2023 · 0 comments · Fixed by #903
Closed

§9.7.2.1: Reference §16.4.12 for clarity #901

KalleOlaviNiemitalo opened this issue Aug 17, 2023 · 0 comments · Fixed by #903
Milestone

Comments

@KalleOlaviNiemitalo
Copy link
Contributor

In C# 7.x, it would be useful to add a note to §9.7.2.1 (Ref safe contexts / General):

Note: Safe context for expressions of ref struct type is defined in §16.4.12. end note

This would help a person reading the definition of ref-safe-context from §9.7.2 understand why the constraints are written as applying only to reference variables and not also to ref struct variables.

§16.4.12.1 (Safe context constraint / General) already has a link to §9.7.2:

There are three different safe-context values, the same as the ref-safe-context values defined for reference variables (§9.7.2): declaration-block, function-member, and caller-context.

Reformulated from #837 (comment)

jskeet added a commit to jskeet/csharpstandard that referenced this issue Aug 17, 2023
@jskeet jskeet added this to the C# 7.x milestone Aug 17, 2023
jskeet added a commit that referenced this issue Aug 17, 2023
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 a pull request may close this issue.

2 participants