Skip to content

Parser: cast of await #9877

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ghost opened this issue Jul 21, 2016 · 0 comments
Closed

Parser: cast of await #9877

ghost opened this issue Jul 21, 2016 · 0 comments
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue

Comments

@ghost
Copy link

ghost commented Jul 21, 2016

TypeScript Version: nightly

Code

async function foo(): Promise<number> {
    return <number> await Promise.resolve(0);
}

Expected behavior:
No errors.

Actual behavior:
src/index.ts(2,21): error TS1109: Expression expected.

@DanielRosenwasser DanielRosenwasser added the Bug A bug in TypeScript label Jul 21, 2016
@mhegazy mhegazy added this to the TypeScript 2.1 milestone Jul 21, 2016
@mhegazy mhegazy assigned ghost Jul 21, 2016
@ghost ghost closed this as completed in #9890 Aug 19, 2016
@RyanCavanaugh RyanCavanaugh added the Fixed A PR has been merged for this issue label Aug 19, 2016
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue
Projects
None yet
Development

No branches or pull requests

3 participants