Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions standard/conversions.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 10 Conversions

## 10.1 General

Check warning on line 3 in standard/conversions.md

View workflow job for this annotation

GitHub Actions / word-converter

Markdown to Word Converter - MDC032

Line length 91 > maximum 83; Console.WriteLine(identity.Method.ReturnParameter.IsDefined(typeof(MarkAttribute), false));

Check warning on line 4 in standard/conversions.md

View workflow job for this annotation

GitHub Actions / word-converter

Markdown to Word Converter - MDC032

Line length 94 > maximum 83; Console.WriteLine(identity.Method.GetParameters()[0].IsDefined(typeof(MarkAttribute), false));
A ***conversion*** causes an expression to be converted to, or treated as being of, a particular type; in the former case a conversion may involve a change in representation. Conversions can be ***implicit*** or ***explicit***, and this determines whether an explicit cast is required.

Expand Down Expand Up @@ -1015,8 +1015,8 @@

- If `F` contains an *anonymous_function_signature*, then `D` and `F` have the same number of parameters.
- If `F` does not contain an *anonymous_function_signature*, then `D` may have zero or more parameters of any type, as long as no parameter of `D` is an output parameter.
- If `F` has an explicitly typed parameter list, each parameter in `D` has the same modifiers as the corresponding parameter in `F`, ignoring `params` modifiers and default values, and an identity conversion exists between the corresponding parameter in `F`.
- If `F` has an implicitly typed parameter list, `D` has no reference or output parameters.
- If `F` has an explicitly or implicitly typed parameter list, each parameter in `D` has the same modifiers as the corresponding parameter in `F`, ignoring `params` modifiers and default values.
- If `F` has an explicitly typed parameter list, an identity conversion shall exist between the type of each parameter in `F` and the type of the corresponding parameter in `D`.
- If `F` has an explicit return type, an identity conversion shall exist from the return type of `F` to the return type of `D`.
- If the body of `F` is an expression, and *either* `D` has a void return type *or* `F` is async and `D` has a `«TaskType»` return type ([§15.14.1](classes.md#15141-general)), then when each parameter of `F` is given the type of the corresponding parameter in `D`, the body of `F` is a valid expression (w.r.t [§12](expressions.md#12-expressions)) that would be permitted as a *statement_expression* ([§13.7](statements.md#137-expression-statements)).
- If the body of `F` is a block, and *either* `D` has a void return type *or* `F` is async and `D` has a `«TaskType»` return type , then when each parameter of `F` is given the type of the corresponding parameter in `D`, the body of `F` is a valid block (w.r.t [§13.3](statements.md#133-blocks)) in which no `return` statement specifies an expression.
Expand Down
2 changes: 1 addition & 1 deletion standard/expressions.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

### 12.2.1 General

The result of an expression is classified as one of the following:

Check warning on line 18 in standard/expressions.md

View workflow job for this annotation

GitHub Actions / word-converter

Markdown to Word Converter - MDC032

Line length 99 > maximum 83; Console.WriteLine(formattable.ToString(System.Globalization.CultureInfo.InvariantCulture));

- A value. Every value has an associated type.
- A variable. Unless otherwise specified, a variable is explicitly typed and has an associated type, namely the declared type of the variable. An implicitly typed variable has no associated type.
Expand Down Expand Up @@ -6086,7 +6086,7 @@
;

implicit_anonymous_function_parameter
: attributes? identifier
: attributes? parameter_modifier? identifier
;

anonymous_function_body
Expand Down
Loading