Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ impl<'a> ExplicitResourceManagement<'a, '_> {

let Some(using_ctx) = using_ctx else { return };

let block_stmt_sid = ctx.create_child_scope(ctx.current_scope_id(), ScopeFlags::empty());
let block_stmt_sid = ctx.create_child_scope_of_current(ScopeFlags::empty());

ctx.scoping_mut().change_scope_parent_id(switch_stmt_scope_id, Some(block_stmt_sid));

Expand All @@ -585,7 +585,7 @@ impl<'a> ExplicitResourceManagement<'a, '_> {
ctx.ast.block_statement_with_scope_id(SPAN, vec, block_stmt_sid)
};

let catch = Self::create_catch_clause(&using_ctx, ctx.current_scope_id(), ctx);
let catch = Self::create_catch_clause(&using_ctx, current_scope_id, ctx);
let finally = Self::create_finally_block(&using_ctx, current_scope_id, needs_await, ctx);
*stmt = ctx.ast.statement_try(SPAN, block, Some(catch), Some(finally));
}
Expand Down