Skip to content

Grammar rule *parameter_modifier* disallows valid V7 constructs #1209

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

Open
wants to merge 3 commits into
base: draft-v8
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion standard/classes.md
Original file line number Diff line number Diff line change
Expand Up @@ -2130,7 +2130,7 @@ default_argument

parameter_modifier
: parameter_mode_modifier
| 'this'
| 'this' parameter_mode_modifier?
;

parameter_mode_modifier
Expand Down Expand Up @@ -3056,6 +3056,7 @@ When the first parameter of a method includes the `this` modifier, that method i

- It may only be an input parameter if it has a value type
- It may only be a reference parameter if it has a value type or has a generic type constrained to struct
- It shall not be an output parameter.
- It shall not be a pointer type.

> *Example*: The following is an example of a static class that declares two extension methods:
Expand Down
Loading