Skip to content

Commit

Permalink
fix build warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
BillWagner committed Apr 3, 2022
1 parent abbc3bc commit 2436d93
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 17 deletions.
2 changes: 1 addition & 1 deletion standard/basic-concepts.md
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ The types `object` and `dynamic` are not distinguished when comparing signatures
> }
> ```
>
> Note that any `in`, `out`, and `ref` parameter modifiers ([§1456.2](classes.md#1462-method-parameters)) are part of a signature. Thus, `F(int)`, `F(in int)`, `F(out int)` , and `F(ref int)` are all unique signatures. However, `F(in int)`, `F(out int)` , and `F(ref int)` cannot be declared within the same interface because their signatures differ solely by `in`, `out`, and `ref`. Also, note that the return type and the `params` modifier are not part of a signature, so it is not possible to overload solely based on return type or on the inclusion or exclusion of the `params` modifier. As such, the declarations of the methods `F(int)` and `F(params string[])` identified above, result in a compile-time error. *end example*
> Note that any `in`, `out`, and `ref` parameter modifiers ([§14.6.2](classes.md#1462-method-parameters)) are part of a signature. Thus, `F(int)`, `F(in int)`, `F(out int)` , and `F(ref int)` are all unique signatures. However, `F(in int)`, `F(out int)` , and `F(ref int)` cannot be declared within the same interface because their signatures differ solely by `in`, `out`, and `ref`. Also, note that the return type and the `params` modifier are not part of a signature, so it is not possible to overload solely based on return type or on the inclusion or exclusion of the `params` modifier. As such, the declarations of the methods `F(int)` and `F(params string[])` identified above, result in a compile-time error. *end example*
## 7.7 Scopes
Expand Down
4 changes: 2 additions & 2 deletions standard/classes.md
Original file line number Diff line number Diff line change
Expand Up @@ -741,7 +741,7 @@ A *class_declaration* creates a new declaration space ([§7.3](basic-concepts.md
> *Note*: Since the fully qualified name of a type declaration encodes the number of type parameters, two distinct types may share the same name as long as they have different number of type parameters. *end note*
- The name of a constant, field, property, or event shall differ from the names of all other members declared in the same class.
- The name of a method shall differ from the names of all other non-methods declared in the same class. In addition, the signature ([7.6](basic-concepts.md#76-signatures-and-overloading)) of a method shall differ from the signatures of all other methods declared in the same class, and two methods declared in the same class shall not have signatures that differ solely by `in`, `out`, and `ref`.
- The name of a method shall differ from the names of all other non-methods declared in the same class. In addition, the signature ([§7.6](basic-concepts.md#76-signatures-and-overloading)) of a method shall differ from the signatures of all other methods declared in the same class, and two methods declared in the same class shall not have signatures that differ solely by `in`, `out`, and `ref`.

- The signature of an instance constructor shall differ from the signatures of all other instance constructors declared in the same class, and two constructors declared in the same class shall not have signatures that differ solely by `ref` and `out`.

Expand Down Expand Up @@ -2064,7 +2064,7 @@ A method declared as an iterator ([§14.14](classes.md#1414-iterators)) may not
In a method that takes reference parameters, it is possible for multiple names to represent the same storage location.
#### 15.6.2.3 Reference parameters
#### 14.6.2.3 Reference parameters
A parameter declared with a `ref` modifier is a reference parameter. Unlike a value parameter, a reference parameter does not create a new storage location. Instead, a reference parameter represents the same storage location as the variable given as the argument in the method invocation.
Expand Down
4 changes: 2 additions & 2 deletions standard/conversions.md
Original file line number Diff line number Diff line change
Expand Up @@ -846,10 +846,10 @@ An implicit conversion exists from a method group ([§11.2](expressions.md#112-e

The compile-time application of the conversion from a method group `E` to a delegate type `D` is described in the following. Note that the existence of an implicit conversion from `E` to `D` does not guarantee that the compile-time application of the conversion will succeed without error.

- A single method `M` is selected corresponding to a method invocation ([§11.7.6.2](expressions.md#11762-method-invocations)) of the form `E(A)`, with the following modifications:
- A single method `M` is selected corresponding to a method invocation ([§11.7.8.2](expressions.md#11782-method-invocations)) of the form `E(A)`, with the following modifications:
- The argument list `A` is a list of expressions, each classified as a variable and with the type and modifier (`in`, `out`, or `ref`) of the corresponding parameter in the *formal_parameter_list* of `D` --- excepting parameters of type `dynamic`, where the corresponding expression has the type `object` instead of `dynamic`.
- The candidate methods considered are only those methods that are applicable in their normal form and do not omit any optional parameters ([§11.6.4.2](expressions.md#11642-applicable-function-member)). Thus, candidate methods are ignored if they are applicable only in their expanded form, or if one or more of their optional parameters do not have a corresponding parameter in `D`.
- A conversion is considered to exist if the algorithm of [§11.7.6.2](expressions.md#11762-method-invocations) produces a single best method `M` having the same number of parameters as `D`.
- A conversion is considered to exist if the algorithm of [§11.7.8.2](expressions.md#11782-method-invocations) produces a single best method `M` having the same number of parameters as `D`.
- Even if the conversion exists, a compile-time error occurs if the selected method `M` is not compatible ([§19.4](delegates.md#194-delegate-compatibility)) with the delegate type `D`.
- If the selected method `M` is an instance method, the instance expression associated with `E` determines the target object of the delegate.
- If the selected method `M` is an extension method which is denoted by means of a member access on an instance expression, that instance expression determines the target object of the delegate.
Expand Down
2 changes: 1 addition & 1 deletion standard/delegates.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ Except for instantiation, any operation that can be applied to a class or class
A method or delegate type `M` is ***compatible*** with a delegate type `D` if all of the following are true:
- `D` and `M` have the same number of parameters, and each parameter in `D` has the same `in`, `out`, or `ref` modifiers as the corresponding parameter in `M`.
- For each value parameter, an identity conversion ([§10.2.2](conversions.md#1022-identity-conversion)) or implicit reference conversion ([§10.2.7](conversions.md#1027-implicit-reference-conversions)) exists from the parameter type in `D` to the corresponding parameter type in `M`.
- For each value parameter, an identity conversion ([§10.2.2](conversions.md#1022-identity-conversion)) or implicit reference conversion ([§10.2.8](conversions.md#1028-implicit-reference-conversions)) exists from the parameter type in `D` to the corresponding parameter type in `M`.
- For each `in`, `out`, or `ref` parameter, the parameter type in `D` is the same as the parameter type in `M`.
- An identity or implicit reference conversion exists from the return type of `M` to the return type of `D`.
Expand Down
6 changes: 0 additions & 6 deletions standard/documentation-comments.md
Original file line number Diff line number Diff line change
Expand Up @@ -636,15 +636,9 @@ The documentation generator observes the following rules when it generates the I
- The second part of the string is the fully qualified name of the element, starting at the root of the namespace. The name of the element, its enclosing type(s), and namespace are separated by periods. If the name of the item itself has periods, they are replaced by \# (U+0023) characters. (It is assumed that no element has this character in its name.)
- For methods and properties with arguments, the argument list follows, enclosed in parentheses. For those without arguments, the parentheses are omitted. The arguments are separated by commas. The encoding of each argument is the same as a CLI signature, as follows:
- Arguments are represented by their documentation name, which is based on their fully qualified name, modified as follows:
<<<<<<< HEAD
- Arguments that represent generic types have an appended “`'`” character followed by the number of type parameters
- Arguments having the `in`, `out` or `ref` modifier have an `@` following their type name. Arguments passed by value or via `params` have no special notation.
- Arguments that are arrays are represented as `[` *lowerbound* `:` *size* `,``,` *lowerbound* `:` *size* `]` where the number of commas is the rank less one, and the lower bounds and size of each dimension, if known, are represented in decimal. If a lower bound or size is not specified, it is omitted. If the lower bound and size for a particular dimension are omitted, the “`:`” is omitted as well. Jagged arrays are represented by one “`[]`” per level.
=======
- Arguments that represent generic types have an appended "`'`" character followed by the number of type parameters
- Arguments having the `in`, `out`, or `ref` modifier have an `@` following their type name. Arguments passed by value or via `params` have no special notation.
- Arguments that are arrays are represented as `[` *lowerbound* `:` *size* `,` ... `,` *lowerbound* `:` *size* `]` where the number of commas is the rank less one, and the lower bounds and size of each dimension, if known, are represented in decimal. If a lower bound or size is not specified, it is omitted. If the lower bound and size for a particular dimension are omitted, the "`:`" is omitted as well. Jagged arrays are represented by one "`[]`" per level.
>>>>>>> e98bcde (Update documentation-comments.md)
- Arguments that have pointer types other than `void` are represented using a `*` following the type name. A `void` pointer is represented using a type name of `System.Void`.
- Arguments that refer to generic type parameters defined on types are encoded using the “`` ` ``” character followed by the zero-based index of the type parameter.
- Arguments that use generic type parameters defined in methods use a double-backtick “``` `` ```” instead of the “`` ` ``” used for types.
Expand Down
6 changes: 3 additions & 3 deletions standard/expressions.md
Original file line number Diff line number Diff line change
Expand Up @@ -987,9 +987,9 @@ For a function member that includes a parameter array, if the function member is
- The expanded form is constructed by replacing the parameter array in the function member declaration with zero or more value parameters of the element type of the parameter array such that the number of arguments in the argument list `A` matches the total number of parameters. If `A` has fewer arguments than the number of fixed parameters in the function member declaration, the expanded form of the function member cannot be constructed and is thus not applicable.
- Otherwise, the expanded form is applicable if for each argument in `A`, one of the following is true:
- the parameter-passing mode of the argument is identical to the parameter-passing mode of the corresponding parameter, and
- for a fixed value parameter or a value parameter created by the expansion, an implicit conversion ([§11.2](conversions.md#112-implicit-conversions)) exists from the argument expression to the type of the corresponding parameter, or
- for a fixed value parameter or a value parameter created by the expansion, an implicit conversion ([§10.2](conversions.md#102-implicit-conversions)) exists from the argument expression to the type of the corresponding parameter, or
- for `in`, `out`, or `ref` parameter, the type of the argument expression is identical to the type of the corresponding parameter.
- the parameter-passing mode of the argument is value, and the parameter-passing mode of the corresponding parameter is input, and an implicit conversion ([§11.2](conversions.md#112-implicit-conversions)) exists from the argument expression to the type of the corresponding parameter
- the parameter-passing mode of the argument is value, and the parameter-passing mode of the corresponding parameter is input, and an implicit conversion ([§10.2](conversions.md#102-implicit-conversions)) exists from the argument expression to the type of the corresponding parameter
> *Example*: Given the following declarations and method calls:
>
Expand Down Expand Up @@ -1049,7 +1049,7 @@ public static void M1(int p1) { … }
public static void M1(in int p1) { … }
```
Given `int i = 10;`, according to [§12.6.4.2](expressions.md#12642-applicable-function-member), the calls `M1(i)` and `M1(i + 5)` result in both overloads being applicable. In such cases, the method with the parameter-passing mode of value is the ***better parameter-passing mode choice***.
Given `int i = 10;`, according to [§11.6.4.2](expressions.md#11642-applicable-function-member), the calls `M1(i)` and `M1(i + 5)` result in both overloads being applicable. In such cases, the method with the parameter-passing mode of value is the ***better parameter-passing mode choice***.

> *Note*: No such choice need exist for arguments of input, output, or reference passing modes, as those arguments only match the exact same parameter passing modes. *end note*
Expand Down
4 changes: 2 additions & 2 deletions standard/variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,10 @@ An input parameter does not create a new storage location. Instead, an input par
The following definite assignment rules apply to input parameters.
- A variable shall be definitely assigned ([§10.4](variables.md#104-definite-assignment)) before it can be passed as an input parameter in a function member or delegate invocation.
- A variable shall be definitely assigned ([§9.4](variables.md#94-definite-assignment)) before it can be passed as an input parameter in a function member or delegate invocation.
- Within a function member, anonymous function, or local function an input parameter is considered initially assigned.
For a `struct` type, within an instance method or instance accessor ([§12.2.1](expressions.md#1221-general)) or instance constructor with a constructor initializer, the `this` keyword behaves exactly as an input parameter of the struct type ([§12.7.8](expressions.md#1278-this-access)).
For a `struct` type, within an instance method or instance accessor ([§11.2.1](expressions.md#1121-general)) or instance constructor with a constructor initializer, the `this` keyword behaves exactly as an input parameter of the struct type ([§11.7.8](expressions.md#1178-this-access)).
### 9.2.8 Local variables
Expand Down

0 comments on commit 2436d93

Please sign in to comment.