Skip to content

Commit 0e69b5e

Browse files
authored
Fix overload resolution for non-returning async lambdas matching task-returning delegates (#1022)
Fixes #625.
1 parent 04e8816 commit 0e69b5e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

standard/expressions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1113,7 +1113,7 @@ Given an expression `E` and a type `T`, `E` ***exactly matches*** `T` if one of
11131113
- `E` has a type `S`, and an identity conversion exists from `S` to `T`
11141114
- `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:
11151115
- 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)), and an identity conversion exists from `X` to the return type of `D`
1116-
- `E` is an `async` lambda with no return value, and `S` is a non-genericTaskType»`
1116+
- `E` is an `async` lambda with no return value, and `D` has a return type which is a non-genericTaskType»`
11171117
- Either `E` is non-async and `D` has a return type `Y` or `E` is async and `D` has a return typeTaskType»<Y>`([§15.15.1](classes.md#15151-general)), and one of the following holds:
11181118
- The body of `E` is an expression that exactly matches `Y`
11191119
- The body of `E` is a block where every return statement returns an expression that exactly matches `Y`

0 commit comments

Comments
 (0)