Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

Incorrect processing of awaited brackets #2017

Open
charsleysa opened this issue Jun 10, 2021 · 0 comments
Open

Incorrect processing of awaited brackets #2017

charsleysa opened this issue Jun 10, 2021 · 0 comments

Comments

@charsleysa
Copy link
Contributor

charsleysa commented Jun 10, 2021

Using the await keyword on the result of code inside brackets produces the wrong output.

Example:

declare const a: boolean;
declare function gl(): Promise<void>;
declare function bg(): Promise<void>;

async () => {
    await (a != true ? gl() : bg());
}

produces

(async () => {
  await a != true ? gl() : bg();
});

Expected:

(async () => {
  await (a != true ? gl() : bg());
});

EDIT: possible related to #1996

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant