-
Notifications
You must be signed in to change notification settings - Fork 86
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
Remove use of "statement body" #999
base: draft-v8
Are you sure you want to change the base?
Conversation
Even though the precise context for the original definitions isn't applicable other times, it's simpler to just leave those as the sole definitions. The other uses are conceptually equivalent - it's not like we're actually defining different terms. Additionally, replace "statement body" with "block body" for both properties and indexers. Fixes dotnet#948. Fixes dotnet#877.
51204bf
to
065b8c4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This LGTM. Let's go ahead and
@@ -3168,15 +3168,15 @@ The *member_name* ([§15.6.1](classes.md#1561-general)) specifies the name of th | |||
|
|||
The *type* of a property shall be at least as accessible as the property itself ([§7.5.5](basic-concepts.md#755-accessibility-constraints)). | |||
|
|||
A *property_body* may either consist of a ***statement body*** or an ***expression body***. In a statement body, *accessor_declarations*, which shall be enclosed in “`{`” and “`}`” tokens, declare the accessors ([§15.7.3](classes.md#1573-accessors)) of the property. The accessors specify the executable statements associated with reading and writing the property. | |||
A *property_body* may either consist of a block body or an expression body. In a block body, *accessor_declarations*, which shall be enclosed in “`{`” and “`}`” tokens, declare the accessors ([§15.7.3](classes.md#1573-accessors)) of the property. The accessors specify the executable statements associated with reading and writing the property. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note in discussion: this isn't right, but we don't have a good term yet. "Accessor body", "accessor section" and "accessor list" are some options discussed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not merging now, as we want to improve this further.
Assigned to myself for further work, and splitting into "just stars" and "just terms". |
Note to correlate the use of block and "expression body" on static constructor, instance constructors, and finalizers. |
This is half of what dotnet#999 was trying to do; the rest requires some more work.
This is half of what #999 was trying to do; the rest requires some more work.
(I'm not really requesting a review - I just wanted to remove the "approved" bit.) |
(This was originally about both statement bodies and multiple definitions; the multiple definitions part has been done in #1019.)
Even though the precise context for the original definitions isn't applicable other times, it's simpler to just leave those as the sole definitions. The other uses are conceptually equivalent - it's not like we're actually defining different terms.
Additionally, replace "statement body" with "block body" for both properties and indexers.
Fixes #877.