proposal-async-do-expressions icon indicating copy to clipboard operation
proposal-async-do-expressions copied to clipboard

Is new.target and arguments accessible inside the async do expression?

Open Jack-Works opened this issue 4 years ago • 2 comments

function x(a) {
    return async do {
        await sleep(2000)
        arguments[0] = 1
    }
}

Jack-Works avatar Mar 28 '21 15:03 Jack-Works

It should be, since it’s not a function so it doesn’t shadow the binding.

ljharb avatar Mar 28 '21 15:03 ljharb

Ditto for super.method when within a method-type function.

Jamesernator avatar Apr 07 '21 05:04 Jamesernator