Skip to content

Conversation

Zzzen
Copy link
Contributor

@Zzzen Zzzen commented Aug 5, 2022

Fixes #50123

@typescript-bot typescript-bot added the For Backlog Bug PRs that fix a backlog bug label Aug 5, 2022
Copy link
Member

@gabritto gabritto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! ✨

@gabritto
Copy link
Member

Worth noting here that, as discussed in the original issue (#50123 (comment)), with this fix we will now allow (valid) cases like:

const promise = (async () => {
  await foo();
  promise;
})()

but also invalid ones like:

const promise = (async () => {
  promise;
  await foo();
})()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
For Backlog Bug PRs that fix a backlog bug
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Incorrect use-before-declaration error in async IIFE initializer
4 participants