Spec doesn't specify what happens to ??= with async expressions. #24508
Labels
area-specification (deprecated)
Deprecated: use area-language and a language- label.
type-bug
Incorrect behavior (everything from a crash to more subtle misbehavior)
The spec says
This translation is not correct if
e
contains anawait
expression.In that case, the translation might want to not use a function expression, and be something like:
((x = v) == null ? v = e : x)
where
x
still fresh and declared somewhere.This retains the synchronous execution in the non-null case that the expression suggests (if
v
is not null, the expression, including the await, is not executed).The text was updated successfully, but these errors were encountered: