Skip to content

Parser: cast of await #9877

@ghost

Description

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptFixedA PR has been merged for this issue

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions