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();
})()

@gabritto gabritto merged commit 6017625 into microsoft:main Nov 2, 2022
@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 22, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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