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

Tweak/correct partial types and methods #1271

Merged
merged 8 commits into from
Feb 20, 2025

Conversation

RexJaeschke
Copy link
Contributor

While looking at the spec for the (V13) feature that adds partial properties and indexers, I had need to review the current spec for partial types and members. When doing so, I came up with some improvements and corrections to that, which this PR addresses.

Here's what this PR does:

  1. Changes w.r.t to uses of can/must/may/shall.
  2. Changes the title of 15.2.7, "Partial declarations" to "Partial type declarations" as that section is only about partial types and not at all about partial methods.
  3. Corrects 15.3 Class members, which currently forbids partial methods. As well as fixing the words, I added a partial method to the accompanying example.
  4. As the Documentation comments chapter said nothing about the handling of doc comments on partial elements, I added such text. Note than when multiple doc comments on an element are written to the document file, I've made their order unspecified. (They might be processed lexically within the same part, or lexically within multiple parts within in the same compilation unit, or who knows in what order if they span multiple compilation units.)

Note that V9 adds support for explicit accessor modifiers on partial members, and V13 adds support for partial properties and indexers. The edits proposed here will support (and not get in the way of) these future features.

@RexJaeschke RexJaeschke added type: bug The Standard does not describe the language as intended or implemented type: clarity While not technically incorrect, the Standard is potentially confusing meeting: discuss This issue should be discussed at the next TC49-TG2 meeting meeting: proposal There is an informal proposal in the issue, worth discussing in a meeting labels Feb 17, 2025
@RexJaeschke RexJaeschke added this to the Pre-C# 8.0 milestone Feb 17, 2025
@RexJaeschke RexJaeschke self-assigned this Feb 17, 2025
Copy link
Member

@BillWagner BillWagner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is close, but some of the comments require discussion

@BillWagner
Copy link
Member

2025/02/19 meeting: After Rex addresses remaining comments, this is ready to merge.

@RexJaeschke RexJaeschke removed meeting: discuss This issue should be discussed at the next TC49-TG2 meeting meeting: proposal There is an informal proposal in the issue, worth discussing in a meeting labels Feb 20, 2025
@RexJaeschke
Copy link
Contributor Author

@jskeet @BillWagner I think we're good to merge this.

Copy link
Member

@BillWagner BillWagner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM.

@BillWagner BillWagner merged commit a518e82 into dotnet:draft-v8 Feb 20, 2025
5 of 6 checks passed
@BillWagner BillWagner deleted the partial-types-and-methods branch February 20, 2025 22:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug The Standard does not describe the language as intended or implemented type: clarity While not technically incorrect, the Standard is potentially confusing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants