Specification defines features in terms of function-literal applications which isn't always a valid rewrite in async contexts. #25858
Labels
area-specification (deprecated)
Deprecated: use area-language and a language- label.
type-bug
Incorrect behavior (everything from a crash to more subtle misbehavior)
Example,
o?.m(a1, . . . , an, xn+1 : an+1, . . . , xn+k : an+k)
is defined as equivalent to((x) => x == null?null : x.m(a1, . . . , an, xn+1 : an+1, . . . , xn+k : an+k))(o)
.This moves the expressions
a1
..an+k
into a new non-async function. If the original expression is in an async function and any of these expressions contain anawait
, the resulting rewrite is incorrect.The specification needs another way to introduce new expression-level bindings without resorting to function literals, perhaps
let x = e1 in e2
which wouldn't change the scope.The text was updated successfully, but these errors were encountered: