Skip to content

Commit 2f26a52

Browse files
[create-pull-request] automated change (#946)
Co-authored-by: jskeet <[email protected]>
1 parent b4266ba commit 2f26a52

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

standard/expressions.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1211,10 +1211,10 @@ The run-time processing of a function member invocation consists of the followin
12111211
- `M` is invoked.
12121212
- Otherwise, if the type of `E` is a value-type `V`, and `M` is declared or overridden in `V`:
12131213
- `E` is evaluated. If this evaluation causes an exception, then no further steps are executed. For an instance constructor, this evaluation consists of allocating storage (typically from an execution stack) for the new object. In this case `E` is classified as a variable.
1214-
- If `E` is not classified as a variable, or if `V` is not a readonly struct type16.2.2), and `E` is one of:
1215-
- an input parameter15.6.2.3), or
1216-
- a `readonly` field15.5.3), or
1217-
- a `readonly` reference variable or return9.7),
1214+
- If `E` is not classified as a variable, or if `V` is not a readonly struct type ([§16.2.2](structs.md#1622-struct-modifiers)), and `E` is one of:
1215+
- an input parameter ([§15.6.2.3](classes.md#15623-input-parameters)), or
1216+
- a `readonly` field ([§15.5.3](classes.md#1553-readonly-fields)), or
1217+
- a `readonly` reference variable or return ([§9.7](variables.md#97-reference-variables-and-returns)),
12181218
12191219
then a temporary local variable of `E`’s type is created and the value of `E` is assigned to that variable. `E` is then reclassified as a reference to that temporary local variable. The temporary variable is accessible as `this` within `M`, but not in any other way. Thus, only when `E` can be written is it possible for the caller to observe the changes that `M` makes to `this`.
12201220
- The argument list is evaluated as described in [§12.6.2](expressions.md#1262-argument-lists).

standard/grammar.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1556,7 +1556,7 @@ constant_declarator
15561556
// Source: §13.6.4 Local function declarations
15571557
local_function_declaration
15581558
: local_function_modifier* return_type local_function_header local_function_body
1559-
| ref_kind ref_return_type local_function_header ref_local_function_body
1559+
| ref_local_function_modifier* ref_kind ref_return_type local_function_header ref_local_function_body
15601560
;
15611561
15621562
local_function_header
@@ -1565,8 +1565,12 @@ local_function_header
15651565
;
15661566
15671567
local_function_modifier
1568-
: 'async'
1569-
| unsafe_modifier // unsafe code support
1568+
: ref_local_function_modifier
1569+
| 'async'
1570+
;
1571+
1572+
ref_local_function_modifier
1573+
: unsafe_modifier // unsafe code support
15701574
;
15711575
15721576
local_function_body
@@ -2010,7 +2014,6 @@ method_header
20102014
method_modifier
20112015
: ref_method_modifier
20122016
| 'async'
2013-
| unsafe_modifier // unsafe code support
20142017
;
20152018
20162019
ref_method_modifier
@@ -2025,6 +2028,7 @@ ref_method_modifier
20252028
| 'override'
20262029
| 'abstract'
20272030
| 'extern'
2031+
| unsafe_modifier // unsafe code support
20282032
;
20292033
20302034
return_type
@@ -2539,7 +2543,7 @@ enum_member_declaration
25392543
// Source: §20.2 Delegate declarations
25402544
delegate_declaration
25412545
: attributes? delegate_modifier* 'delegate' return_type delegate_header
2542-
| attributes? ref_delegate_modifier* 'delegate' ref_kind ref_return_type delegate_header
2546+
| attributes? delegate_modifier* 'delegate' ref_kind ref_return_type delegate_header
25432547
;
25442548
25452549
delegate_header
@@ -2548,16 +2552,12 @@ delegate_header
25482552
;
25492553
25502554
delegate_modifier
2551-
: ref_delegate_modifier
2552-
| unsafe_modifier // unsafe code support
2553-
;
2554-
2555-
ref_delegate_modifier
25562555
: 'new'
25572556
| 'public'
25582557
| 'protected'
25592558
| 'internal'
25602559
| 'private'
2560+
| unsafe_modifier // unsafe code support
25612561
;
25622562
25632563
// Source: §22.3 Attribute specification

0 commit comments

Comments
 (0)