-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Closed
Description
Mentioned here: https://docs.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-7#generalized-async-return-types
And mentioned here, with the incorrect statement that any type can be used as an async return type so long as it has a public GetAwaiter method: https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/concepts/async/async-return-types#generalized-async-return-types-and-valuetasktresult
This is not true. The AsyncMethodBuilder attribute and a valid builder type is required. I was hoping to look at the spec to see some documentation of the actual requirements of the async method builder type.
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
- ID: 2e3f3f52-86a5-4cc9-ab1f-874cad72b821
- Version Independent ID: f69dc2c8-79bc-300c-5804-e1f7aa5c8352
- Content: Pattern matching - C# 7.0 specification proposals
- Content Source: proposals/csharp-7.0/pattern-matching.md
- Product: dotnet-csharp
- Technology: csharp-spec
- GitHub Login: @dotnet-bot
- Microsoft Alias: wiwagn