-
-
Notifications
You must be signed in to change notification settings - Fork 15.1k
Typecheck error in body of async fn reported at point-of-use #73737
Copy link
Copy link
Closed as duplicate of#64552
Closed as duplicate of#64552
Copy link
Labels
A-async-awaitArea: Async & AwaitArea: Async & AwaitAsyncAwait-TriagedAsync-await issues that have been triaged during a working group meeting.Async-await issues that have been triaged during a working group meeting.C-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-async-awaitArea: Async & AwaitArea: Async & AwaitAsyncAwait-TriagedAsync-await issues that have been triaged during a working group meeting.Async-await issues that have been triaged during a working group meeting.C-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
I tried this code:
I expected to see this happen: A diagnostic would be issued at the line with the .forward call (or not at all).
Instead, this happened:
As you can see, this is reporting a typecheck error occurring in the implementation of forwarder, at the point of use of the async fn (where its implementation should be opaque).
Meta
Tested on the playground with both stable and nightly.