mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 21:48:13 +00:00
LibJS: Propagate "contains await" flag to parent scope in ScopePusher
The flag indicating the presence of an await expression should be passed up to the parent scope until the nearest function scope is reached. This resolves several problems related to identifying top-level awaits, which are currently not recognized correctly when used within a nested scope.
This commit is contained in:
parent
a627c15b07
commit
75ae368896
1 changed files with 1 additions and 0 deletions
|
@ -244,6 +244,7 @@ public:
|
|||
if (m_parent_scope && !m_function_parameters.has_value()) {
|
||||
m_parent_scope->m_contains_access_to_arguments_object |= m_contains_access_to_arguments_object;
|
||||
m_parent_scope->m_contains_direct_call_to_eval |= m_contains_direct_call_to_eval;
|
||||
m_parent_scope->m_contains_await_expression |= m_contains_await_expression;
|
||||
}
|
||||
|
||||
VERIFY(m_parser.m_state.current_scope_pusher == this);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue