Skip to content

Incorrect await behavior? #3894

@zealotds

Description

@zealotds
JerryScript revision

commit: cae6cd0

Build platform

Debian GNU/Linux 10 (buster) (Linux 4.19.0-8-amd64 x86_64)

Build steps

python tools/build.py --profile=es2015-subset

Test case

Run following code with the CLI bin/jerry:

async function foo (promise) { let v = await promise; print('value:', v); }
let r = null
let bar = new Promise(resolver => r = resolver)
foo(bar)
Output

value: [object Promise]

Expected behavior

It should not print until r('some value')

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions