Error in async
function/block produces errors for valid unrelated expressions
#66634
Labels
A-async-await
Area: Async & Await
A-diagnostics
Area: Messages for errors, warnings, and lints
A-inference
Area: Type inference
AsyncAwait-Triaged
Async-await issues that have been triaged during a working group meeting.
C-bug
Category: This is a bug.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Code (Playground)
produces following errors:
Errors
However, if we remove line
, it will become valid. Error on this line affects unrelated
and produces
cannot infer type for {integer}
error for valid expression. This behaviour could seem not so bad, but imagine largeasync
function with many lines (you can simply copy-paste first line several times and look to the output).The text was updated successfully, but these errors were encountered: