You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -1118,7 +1118,7 @@ Given an expression `E` and a type `T`, `E` ***exactly matches*** `T` if one of
1118
1118
- `E` is an anonymous function, `T` is either a delegate type `D` or an expression tree type `Expression<D>` and one of the following holds:
1119
1119
- An inferred return type `X` exists for `E` in the context of the parameter list of `D` ([§12.6.3.12](expressions.md#126312-fixing)), andanidentityconversionexistsfrom `X` tothereturntypeof `D`
1120
1120
- `E` isan `async` lambdawithnoreturnvalue, and `D` hasareturntypewhichisanon-generic `«TaskType»`
1121
-
- Either `E` isnon-asyncand `D` hasareturntype `Y` or `E` isasyncand `D` hasareturntype `«TaskType»<Y>`([§15.15.1](classes.md#15151-general)), andoneofthefollowingholds:
1121
+
- Either `E` isnon-asyncand `D` hasareturntype `Y` or `E` isasyncand `D` hasareturntype `«TaskType»<Y>`([§15.14.1](classes.md#15141-general)), andoneofthefollowingholds:
@@ -1127,8 +1127,8 @@ Given an expression `E` and a type `T`, `E` ***exactly matches*** `T` if one of
1127
1127
Giventwotypes `T₁` and `T₂`, `T₁` isa ***betterconversiontarget*** than `T₂` ifoneofthefollowingholds:
1128
1128
1129
1129
-Animplicitconversionfrom `T₁` to `T₂` existsandnoimplicitconversionfrom `T₂` to `T₁` exists
1130
-
- `T₁` is `«TaskType»<S₁>`([§15.15.1](classes.md#15151-general)), `T₂` is `«TaskType»<S₂>`, and `S₁` isabetterconversiontargetthan `S₂`
1131
-
- `T₁` is `«TaskType»<S₁>`([§15.15.1](classes.md#15151-general)), `T₂` is `«TaskType»<S₂>`, and `T₁` ismorespecializedthan `T₂`
1130
+
- `T₁` is `«TaskType»<S₁>`([§15.14.1](classes.md#15141-general)), `T₂` is `«TaskType»<S₂>`, and `S₁` isabetterconversiontargetthan `S₂`
1131
+
- `T₁` is `«TaskType»<S₁>`([§15.14.1](classes.md#15141-general)), `T₂` is `«TaskType»<S₂>`, and `T₁` ismorespecializedthan `T₂`
1132
1132
- `T₁` is `S₁` or `S₁?` where `S₁` isasignedintegraltype, and `T₂` is `S₂` or `S₂?` where `S₂` isanunsignedintegraltype. Specifically:
1133
1133
- `S₁` is `sbyte` and `S₂` is `byte`, `ushort`, `uint`, or `ulong`
1134
1134
- `S₁` is `short` and `S₂` is `ushort`, `uint`, or `ulong`
@@ -2347,7 +2347,7 @@ A *this_access* is permitted only in the *block* of an instance constructor, an
2347
2347
- If the constructor declaration has no constructor initializer, the `this` variable behaves exactly the same as an output parameter of the struct type. In particular, this means that the variable shall be definitely assigned in every execution path of the instance constructor.
2348
2348
- Otherwise, the `this` variable behaves exactly the same as a `ref` parameter of the struct type. In particular, this means that the variable is considered initially assigned.
2349
2349
- When `this` is used in a *primary_expression* within an instance method or instance accessor of a struct, it is classified as a variable. The type of the variable is the instance type ([§15.3.2](classes.md#1532-the-instance-type)) of the struct within which the usage occurs.
2350
-
- If the method or accessor is not an iterator ([§15.14](classes.md#1514-iterators)) or async function ([§15.15](classes.md#1515-async-functions)), the `this` variable represents the struct for which the method or accessor was invoked.
2350
+
- If the method or accessor is not an iterator ([§15.15](classes.md#1515-synchronous-and-asynchronous-iterators)) or async function ([§15.14](classes.md#1514-async-functions)), the `this` variable represents the struct for which the method or accessor was invoked.
2351
2351
- If the struct is a `readonly struct`, the `this` variable behaves exactly the same as an input parameter of the struct type
2352
2352
- Otherwise the `this` variable behaves exactly the same as a `ref` parameter of the struct type
2353
2353
- If the method or accessor is an iterator or async function, the `this` variable represents a *copy* of the struct for which the method or accessor was invoked, and behaves exactly the same as a *value* parameter of the struct type.
@@ -3655,7 +3655,7 @@ await_expression
3655
3655
;
3656
3656
```
3657
3657
3658
-
An *await_expression* is only allowed in the body of an async function ([§15.15](classes.md#1515-async-functions)). Within the nearest enclosing async function, an *await_expression* shall not occur in these places:
3658
+
An *await_expression* is only allowed in the body of an async function ([§15.14](classes.md#1514-async-functions)). Within the nearest enclosing async function, an *await_expression* shall not occur in these places:
3659
3659
3660
3660
- Inside a nested (non-async) anonymous function
3661
3661
- Inside the block of a *lock_statement*
@@ -3696,7 +3696,7 @@ At run-time, the expression `await t` is evaluated as follows:
3696
3696
3697
3697
- An awaiter `a` is obtained by evaluating the expression `(t).GetAwaiter()`.
3698
3698
- A `bool``b` is obtained by evaluating the expression `(a).IsCompleted`.
3699
-
- If `b` is `false` then evaluation depends on whether `a` implements the interface `System.Runtime.CompilerServices.ICriticalNotifyCompletion` (hereafter known as `ICriticalNotifyCompletion` for brevity). This check is done at binding time; i.e., at run-time if `a` has the compile-time type `dynamic`, and at compile-time otherwise. Let `r` denote the resumption delegate ([§15.15](classes.md#1515-async-functions)):
3699
+
- If `b` is `false` then evaluation depends on whether `a` implements the interface `System.Runtime.CompilerServices.ICriticalNotifyCompletion` (hereafter known as `ICriticalNotifyCompletion` for brevity). This check is done at binding time; i.e., at run-time if `a` has the compile-time type `dynamic`, and at compile-time otherwise. Let `r` denote the resumption delegate ([§15.14](classes.md#1514-async-functions)):
3700
3700
- If `a` does not implement `ICriticalNotifyCompletion`, then the expression
3701
3701
`((a) as INotifyCompletion).OnCompleted(r)` is evaluated.
3702
3702
- If `a` does implement `ICriticalNotifyCompletion`, then the expression
@@ -5094,7 +5094,7 @@ When recognising an *anonymous_function_body* if both the *null_conditional_invo
5094
5094
5095
5095
The `=>` operatorhasthesameprecedenceasassignment (`=`) andisright-associative.
Copy file name to clipboardExpand all lines: standard/portability-issues.md
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -61,9 +61,9 @@ A conforming implementation is required to document its choice of behavior in ea
61
61
1. The layout of arrays, except in an unsafe context ([§12.8.17.4](expressions.md#128174-array-creation-expressions)).
62
62
1. Whether there is any way to execute the *block* of an anonymous function other than through evaluation and invocation of the *lambda_expression* or *anonymous_method-expression* ([§12.19.3](expressions.md#12193-anonymous-function-bodies)).
63
63
1. The exact timing of static field initialization ([§15.5.6.2](classes.md#15562-static-field-initialization)).
64
-
1. The result of invoking `MoveNext` when an enumerator object is running ([§15.14.5.2](classes.md#151452-the-movenext-method)).
65
-
1. The result of accessing `Current` when an enumerator object is in the before, running, or after states ([§15.14.5.3](classes.md#151453-the-current-property)).
66
-
1. The result of invoking `Dispose` when an enumerator object is in the running state ([§15.14.5.4](classes.md#151454-the-dispose-method)).
64
+
1. The result of invoking `MoveNext` when an enumerator object is running ([§15.15.5.2](classes.md#151552-advance-the-enumerator)).
65
+
1. The result of accessing `Current` when an enumerator object is in the before, running, or after states ([§15.15.5.3](classes.md#151553-retrieve-the-current-value)).
66
+
1. The result of invoking `Dispose` when an enumerator object is in the running state ([§15.15.5.4](classes.md#151554-dispose-of-resources)).
67
67
1. The attributes of a type declared in multiple parts are determined by combining, in an unspecified order, the attributes of each of its parts ([§22.3](attributes.md#223-attribute-specification)).
68
68
1. The order in which members are packed into a struct ([§23.6.9](unsafe-code.md#2369-the-sizeof-operator)).
69
69
1. An exception occurs during finalizer execution, and that exception is not caught ([§21.4](exceptions.md#214-how-exceptions-are-handled)).
0 commit comments