Skip to content

Commit

Permalink
Fix markdown lint errors, which included a missed conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
BillWagner committed Apr 1, 2022
1 parent 022cbcf commit e066350
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
10 changes: 3 additions & 7 deletions standard/expressions.md
Original file line number Diff line number Diff line change
Expand Up @@ -551,11 +551,11 @@ The *argument_value* can take one of the following forms:
- An *expression*, indicating that the argument is passed as a value parameter ([§14.6.2.2](classes.md#14622-value-parameters)).
- The keyword `ref` followed by a *variable_reference* ([§9.5](variables.md#95-variable-references)), indicating that the argument is passed as a reference parameter ([§14.6.2.3](classes.md#14623-reference-parameters)). A variable shall be definitely assigned ([§9.4](variables.md#94-definite-assignment)) before it can be passed as a reference parameter.
- The keyword `out`, optionally followed by *local_variable_type* ([§12.6.2](statements.md#1262-local-variable-declarations)), followed by a *variable_reference* ([§9.5](variables.md#105-variable-references)), indicating that the argument is passed as an output parameter ([§14.6.2.4](classes.md#15624-output-parameters)). If *variable_reference* is not a discard, the variable it designates is considered definitely assigned ([§9.4](variables.md#94-definite-assignment)) following a function member invocation in which the variable is passed as an output parameter. In this context, the variable designated by *variable_reference* is known as an *out variable*.
- The keyword `out`, optionally followed by *local_variable_type* ([§12.6.2](statements.md#1262-local-variable-declarations)), followed by a *variable_reference* ([§9.5](variables.md#95-variable-references)), indicating that the argument is passed as an output parameter ([§14.6.2.4](classes.md#14624-output-parameters)). If *variable_reference* is not a discard, the variable it designates is considered definitely assigned ([§9.4](variables.md#94-definite-assignment)) following a function member invocation in which the variable is passed as an output parameter. In this context, the variable designated by *variable_reference* is known as an *out variable*.
If an out variable has no *local_variable_type* and its *variable_reference* is not `_`, its *variable_reference* shall designate an in-scope variable whose type is the same as that of the corresponding parameter in the signature of the method selected by overload resolution.
If *local_variable_type* is present and its *variable_reference* is not `_`, the out variable is declared as a local variable. If *local_variable_type* is `var`, the local variable is implicitly typed to that of the corresponding parameter in the signature of the method selected by overload resolution. Otherwise, the local variable is explicitly typed, and that type shall be the same as that of the corresponding parameter in the signature of the method selected by overload resolution.
If *local_variable_type* is present and its *variable_reference* is not `_`, the out variable is declared as a local variable. If *local_variable_type* is `var`, the local variable is implicitly typed to that of the corresponding parameter in the signature of the method selected by overload resolution. Otherwise, the local variable is explicitly typed, and that type shall be the same as that of the corresponding parameter in the signature of the method selected by overload resolution.
The local variables scope is the same as for a local variable created by a patternpatterns-new-clause). Within that scope, it is an error to refer to that local variable in a textual position that precedes its declaration. It is also an error to reference an implicitly typed out variable in the same argument list that immediately contains its declaration.
Expand Down Expand Up @@ -6093,11 +6093,7 @@ assignment_operator

The left operand of an assignment shall be an expression classified as a variable, a property access, an indexer access, or an event access.

<<<<<<< HEAD
The `=` operator is called the ***simple assignment operator***. It assigns the value of the right operand to the variable, property, or indexer element given by the left operand. The left operand of the simple assignment operator shall not be an event access (except as described in [§14.8.2](classes.md#1482-field-like-events)). The simple assignment operator is described in [§11.18.2](expressions.md#11182-simple-assignment).
=======
The `=` operator is called the ***simple assignment operator***. When the left operand is not a discarddiscards-new-clause), this operator assigns the value of the right operand to the variable, property, or indexer element given by the left operand. Otherwise, the right operand is evaluated with its value going unused. The left operand of the simple assignment operator shall not be an event access (except as described in [§15.8.2](classes.md#1582-field-like-events)). The simple assignment operator is described in [§12.18.2](expressions.md#12182-simple-assignment).
>>>>>>> b72ebbb (Update expressions.md)
The `=` operator is called the ***simple assignment operator***. When the left operand is not a discarddiscards-new-clause), this operator assigns the value of the right operand to the variable, property, or indexer element given by the left operand. Otherwise, the right operand is evaluated with its value going unused. The left operand of the simple assignment operator shall not be an event access (except as described in [§14.8.2](classes.md#1482-field-like-events)). The simple assignment operator is described in [§11.18.2](expressions.md#11182-simple-assignment).

The assignment operators other than the `=` operator are called the ***compound assignment operators***. These operators perform the indicated operation on the two operands, and then assign the resulting value to the variable, property, or indexer element given by the left operand. The compound assignment operators are described in [§11.18.3](expressions.md#11183-compound-assignment).

Expand Down
2 changes: 1 addition & 1 deletion standard/lexical-structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ The productions for *simple_name* ([§11.7.4](expressions.md#1174-simple-names))
If a sequence of tokens can be parsed (in context) as a *simple_name* ([§11.7.4](expressions.md#1174-simple-names)), *member_access* ([§11.7.6](expressions.md#1176-member-access)), or *pointer_member_access* ([§22.6.3](unsafe-code.md#2263-pointer-member-access)) ending with a *type_argument_list* ([§8.4.2](types.md#842-type-arguments)), the token immediately following the closing `>token is examined. If it is one of the following:
` ( ) ] : ; , . ? == !=` *identifier*
`( ) ] : ; , . ? == !=` *identifier*
then the *type_argument_list* is retained as part of the *simple_name*, *member_access*, or *pointer_member_access* and any other possible parse of the sequence of tokens is discarded. Otherwise, the *type_argument_list* is not considered part of the *simple_name*, *member_access*, or *pointer_member_access*, even if there is no other possible parse of the sequence of tokens.
Expand Down
4 changes: 2 additions & 2 deletions standard/variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,9 @@ A local variable introduced by a *local_variable_declaration* is not automatical
### §discards-new-clause Discards
In certain contexts, a programmer is required to define a variable whose value they don't care about and don't intend to use. Discards simplify the code in such situations. A *discard*, which is represented by the identifier `_`, is a predefined variable that is never definitely assigned ([§10.4](variables.md#104-definite-assignment)) and need not occupy any storage. Multiple discards may exist in the same scope, with each having the same or different types, or no type at all. With some restrictions, a discard may be used in the same scope as an explicitly declared variable named `_`.
In certain contexts, a programmer is required to define a variable whose value they don't care about and don't intend to use. Discards simplify the code in such situations. A *discard*, which is represented by the identifier `_`, is a predefined variable that is never definitely assigned ([§9.4](variables.md#94-definite-assignment)) and need not occupy any storage. Multiple discards may exist in the same scope, with each having the same or different types, or no type at all. With some restrictions, a discard may be used in the same scope as an explicitly declared variable named `_`.
For details of using discards when deconstructing tuples, see §deconstruction-expressions-new-clause. When calling methods with `out` parameters, see15.6.2.4](classes.md#15624-output-parameters). In a pattern matching operation with the `is` and `switch` statements, see12.11.11](121111-the-is-operator) and13.8.3](1383statements.md#the-switch-statement). As the left operand of a simple assignment, see12.1.8.2](expressions.md#12182-simple-assignment).
For details of using discards when deconstructing tuples, see §deconstruction-expressions-new-clause. When calling methods with `out` parameters, see14.6.2.4](classes.md#14624-output-parameters). In a pattern matching operation with the `is` and `switch` statements, see11.11.11](expressions.md#111111-the-is-operator) and12.8.3](statements.md#1283-the-switch-statement). As the left operand of a simple assignment, see11.18.2](expressions.md#11182-simple-assignment).
## 9.3 Default values
Expand Down

0 comments on commit e066350

Please sign in to comment.