From 79c15c8174735f86adfdd8245206c3d601b57784 Mon Sep 17 00:00:00 2001 From: Boshen Date: Tue, 29 Oct 2024 22:24:04 +0800 Subject: [PATCH] feat(transformer): transform object rest spread --- crates/oxc_ast/src/ast_impl/js.rs | 10 + .../oxc_transformer/examples/transformer.rs | 6 +- .../src/common/helper_loader.rs | 8 + .../src/common/statement_injector.rs | 1 - .../src/compiler_assumptions.rs | 2 - crates/oxc_transformer/src/context.rs | 5 +- crates/oxc_transformer/src/es2018/mod.rs | 54 +- .../src/es2018/object_rest_spread.rs | 1118 ++++++++++++++++- crates/oxc_transformer/src/jsx/jsx_impl.rs | 24 +- crates/oxc_transformer/src/jsx/mod.rs | 11 +- crates/oxc_transformer/src/lib.rs | 16 +- crates/oxc_transformer/src/options/env.rs | 7 +- tasks/coverage/snapshots/runtime.snap | 14 +- tasks/coverage/snapshots/semantic_babel.snap | 8 +- .../coverage/snapshots/semantic_test262.snap | 889 ++++++++++++- .../snapshots/semantic_typescript.snap | 714 +++++++---- .../snapshots/transformer_typescript.snap | 3 +- .../snapshots/babel.snap.md | 115 +- .../snapshots/babel_exec.snap.md | 161 +-- .../snapshots/oxc.snap.md | 14 +- tasks/transform_conformance/src/constants.rs | 5 + .../assignment-expression/input.js | 8 + .../assignment-expression/output.js | 13 + .../fixtures/object-rest/complex/input.js | 13 + .../fixtures/object-rest/complex/output.js | 7 + .../test/fixtures/object-rest/export/input.js | 2 + .../fixtures/object-rest/export/output.js | 2 + .../test/fixtures/object-rest/keys/input.js | 1 + .../test/fixtures/object-rest/keys/output.js | 1 + .../test/fixtures/object-rest/options.json | 3 + .../test/fixtures/object-rest/simple/input.js | 22 + .../fixtures/object-rest/simple/output.js | 31 + 32 files changed, 2634 insertions(+), 654 deletions(-) create mode 100644 tasks/transform_conformance/tests/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/assignment-expression/input.js create mode 100644 tasks/transform_conformance/tests/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/assignment-expression/output.js create mode 100644 tasks/transform_conformance/tests/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/complex/input.js create mode 100644 tasks/transform_conformance/tests/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/complex/output.js create mode 100644 tasks/transform_conformance/tests/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/export/input.js create mode 100644 tasks/transform_conformance/tests/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/export/output.js create mode 100644 tasks/transform_conformance/tests/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/keys/input.js create mode 100644 tasks/transform_conformance/tests/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/keys/output.js create mode 100644 tasks/transform_conformance/tests/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/options.json create mode 100644 tasks/transform_conformance/tests/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/simple/input.js create mode 100644 tasks/transform_conformance/tests/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/simple/output.js diff --git a/crates/oxc_ast/src/ast_impl/js.rs b/crates/oxc_ast/src/ast_impl/js.rs index c0d6a549452a37..1270ac5ae654c3 100644 --- a/crates/oxc_ast/src/ast_impl/js.rs +++ b/crates/oxc_ast/src/ast_impl/js.rs @@ -931,6 +931,16 @@ impl<'a> BindingPatternKind<'a> { matches!(self, Self::BindingIdentifier(_)) } + #[allow(missing_docs)] + pub fn is_object_pattern(&self) -> bool { + matches!(self, Self::ObjectPattern(_)) + } + + #[allow(missing_docs)] + pub fn is_array_pattern(&self) -> bool { + matches!(self, Self::ArrayPattern(_)) + } + #[allow(missing_docs)] pub fn is_assignment_pattern(&self) -> bool { matches!(self, Self::AssignmentPattern(_)) diff --git a/crates/oxc_transformer/examples/transformer.rs b/crates/oxc_transformer/examples/transformer.rs index d6153ac8b645ea..ee37ca3b75dc6e 100644 --- a/crates/oxc_transformer/examples/transformer.rs +++ b/crates/oxc_transformer/examples/transformer.rs @@ -6,7 +6,7 @@ use oxc_codegen::CodeGenerator; use oxc_parser::Parser; use oxc_semantic::SemanticBuilder; use oxc_span::SourceType; -use oxc_transformer::{EnvOptions, TransformOptions, Transformer}; +use oxc_transformer::{EnvOptions, HelperLoaderMode, TransformOptions, Transformer}; use pico_args::Arguments; // Instruction: @@ -55,7 +55,7 @@ fn main() { let (symbols, scopes) = ret.semantic.into_symbol_table_and_scope_tree(); - let transform_options = if let Some(query) = &targets { + let mut transform_options = if let Some(query) = &targets { TransformOptions { env: EnvOptions::from_browserslist_query(query).unwrap(), ..TransformOptions::default() @@ -66,6 +66,8 @@ fn main() { TransformOptions::enable_all() }; + transform_options.helper_loader.mode = HelperLoaderMode::External; + let ret = Transformer::new(&allocator, path, &transform_options).build_with_symbols_and_scopes( symbols, scopes, diff --git a/crates/oxc_transformer/src/common/helper_loader.rs b/crates/oxc_transformer/src/common/helper_loader.rs index a4ba256f342eb8..323154111b11bc 100644 --- a/crates/oxc_transformer/src/common/helper_loader.rs +++ b/crates/oxc_transformer/src/common/helper_loader.rs @@ -143,6 +143,10 @@ pub enum Helper { AsyncToGenerator, ObjectSpread2, WrapAsyncGenerator, + Extends, + ObjectDestructuringEmpty, + ObjectWithoutProperties, + ToPropertyKey, } impl Helper { @@ -154,6 +158,10 @@ impl Helper { Self::AsyncToGenerator => "asyncToGenerator", Self::ObjectSpread2 => "objectSpread2", Self::WrapAsyncGenerator => "wrapAsyncGenerator", + Self::Extends => "extends", + Self::ObjectDestructuringEmpty => "objectDestructuringEmpty", + Self::ObjectWithoutProperties => "objectWithoutProperties", + Self::ToPropertyKey => "toPropertyKey", } } } diff --git a/crates/oxc_transformer/src/common/statement_injector.rs b/crates/oxc_transformer/src/common/statement_injector.rs index 6b8ea5cdf02c5b..dbcd1f8bf42d7b 100644 --- a/crates/oxc_transformer/src/common/statement_injector.rs +++ b/crates/oxc_transformer/src/common/statement_injector.rs @@ -79,7 +79,6 @@ impl<'a> StatementInjectorStore<'a> { // The non-trivial inner functions are not marked `#[inline]` - compiler can decide whether to inline or not. impl<'a> StatementInjectorStore<'a> { /// Add a statement to be inserted immediately before the target statement. - #[expect(dead_code)] #[inline] pub fn insert_before(&self, target: &A, stmt: Statement<'a>) { self.insert_before_address(target.address(), stmt); diff --git a/crates/oxc_transformer/src/compiler_assumptions.rs b/crates/oxc_transformer/src/compiler_assumptions.rs index f37995fa930cd4..d878c399eb95f8 100644 --- a/crates/oxc_transformer/src/compiler_assumptions.rs +++ b/crates/oxc_transformer/src/compiler_assumptions.rs @@ -25,7 +25,6 @@ pub struct CompilerAssumptions { pub enumerable_module_meta: bool, #[serde(default)] - #[deprecated = "Not Implemented"] pub ignore_function_length: bool, #[serde(default)] @@ -61,7 +60,6 @@ pub struct CompilerAssumptions { pub no_uninitialized_private_field_access: bool, #[serde(default)] - #[deprecated = "Not Implemented"] pub object_rest_no_symbols: bool, #[serde(default)] diff --git a/crates/oxc_transformer/src/context.rs b/crates/oxc_transformer/src/context.rs index 12963d856dc1fb..03de53e06327ab 100644 --- a/crates/oxc_transformer/src/context.rs +++ b/crates/oxc_transformer/src/context.rs @@ -13,7 +13,7 @@ use crate::{ statement_injector::StatementInjectorStore, top_level_statements::TopLevelStatementsStore, var_declarations::VarDeclarationsStore, }, - Module, TransformOptions, + CompilerAssumptions, Module, TransformOptions, }; pub struct TransformCtx<'a> { @@ -31,6 +31,8 @@ pub struct TransformCtx<'a> { pub module: Module, + pub assumptions: CompilerAssumptions, + // Helpers /// Manage helper loading pub helper_loader: HelperLoaderStore<'a>, @@ -61,6 +63,7 @@ impl<'a> TransformCtx<'a> { source_type: SourceType::default(), source_text: "", module: options.env.module, + assumptions: options.assumptions, helper_loader: HelperLoaderStore::new(&options.helper_loader), module_imports: ModuleImportsStore::new(), var_declarations: VarDeclarationsStore::new(), diff --git a/crates/oxc_transformer/src/es2018/mod.rs b/crates/oxc_transformer/src/es2018/mod.rs index caeaf33a29e205..74af7d249bb76c 100644 --- a/crates/oxc_transformer/src/es2018/mod.rs +++ b/crates/oxc_transformer/src/es2018/mod.rs @@ -2,10 +2,11 @@ pub(crate) mod async_generator_functions; mod object_rest_spread; mod options; -use oxc_ast::ast::{Expression, ForOfStatement, Function, Statement}; +use oxc_ast::ast::*; use oxc_traverse::{Traverse, TraverseCtx}; use crate::context::TransformCtx; + use async_generator_functions::AsyncGeneratorFunctions; pub use object_rest_spread::{ObjectRestSpread, ObjectRestSpreadOptions}; pub use options::ES2018Options; @@ -32,6 +33,12 @@ impl<'a, 'ctx> ES2018<'a, 'ctx> { } impl<'a, 'ctx> Traverse<'a> for ES2018<'a, 'ctx> { + fn exit_program(&mut self, program: &mut oxc_ast::ast::Program<'a>, ctx: &mut TraverseCtx<'a>) { + if self.options.object_rest_spread.is_some() { + self.object_rest_spread.exit_program(program, ctx); + } + } + fn enter_expression(&mut self, expr: &mut Expression<'a>, ctx: &mut TraverseCtx<'a>) { if self.options.object_rest_spread.is_some() { self.object_rest_spread.enter_expression(expr, ctx); @@ -56,9 +63,34 @@ impl<'a, 'ctx> Traverse<'a> for ES2018<'a, 'ctx> { } } - fn enter_for_of_statement(&mut self, node: &mut ForOfStatement<'a>, ctx: &mut TraverseCtx<'a>) { + fn enter_for_in_statement(&mut self, stmt: &mut ForInStatement<'a>, ctx: &mut TraverseCtx<'a>) { + if self.options.object_rest_spread.is_some() { + self.object_rest_spread.enter_for_in_statement(stmt, ctx); + } + } + + fn enter_for_of_statement(&mut self, stmt: &mut ForOfStatement<'a>, ctx: &mut TraverseCtx<'a>) { if self.options.async_generator_functions { - self.async_generator_functions.enter_for_of_statement(node, ctx); + self.async_generator_functions.enter_for_of_statement(stmt, ctx); + } + if self.options.object_rest_spread.is_some() { + self.object_rest_spread.enter_for_of_statement(stmt, ctx); + } + } + + fn enter_arrow_function_expression( + &mut self, + arrow: &mut ArrowFunctionExpression<'a>, + ctx: &mut TraverseCtx<'a>, + ) { + if self.options.object_rest_spread.is_some() { + self.object_rest_spread.enter_arrow_function_expression(arrow, ctx); + } + } + + fn enter_function(&mut self, func: &mut Function<'a>, ctx: &mut TraverseCtx<'a>) { + if self.options.object_rest_spread.is_some() { + self.object_rest_spread.enter_function(func, ctx); } } @@ -67,4 +99,20 @@ impl<'a, 'ctx> Traverse<'a> for ES2018<'a, 'ctx> { self.async_generator_functions.exit_function(node, ctx); } } + + fn enter_variable_declaration( + &mut self, + decl: &mut VariableDeclaration<'a>, + ctx: &mut TraverseCtx<'a>, + ) { + if self.options.object_rest_spread.is_some() { + self.object_rest_spread.enter_variable_declaration(decl, ctx); + } + } + + fn enter_catch_clause(&mut self, clause: &mut CatchClause<'a>, ctx: &mut TraverseCtx<'a>) { + if self.options.object_rest_spread.is_some() { + self.object_rest_spread.enter_catch_clause(clause, ctx); + } + } } diff --git a/crates/oxc_transformer/src/es2018/object_rest_spread.rs b/crates/oxc_transformer/src/es2018/object_rest_spread.rs index 39963df9871864..c10c8358a15387 100644 --- a/crates/oxc_transformer/src/es2018/object_rest_spread.rs +++ b/crates/oxc_transformer/src/es2018/object_rest_spread.rs @@ -26,124 +26,1128 @@ //! * Babel plugin implementation: //! * Object rest/spread TC39 proposal: +use std::mem; + use serde::Deserialize; +use oxc_allocator::{CloneIn, GetAddress, Vec as ArenaVec}; use oxc_ast::{ast::*, NONE}; -use oxc_semantic::{ReferenceFlags, SymbolId}; -use oxc_span::SPAN; -use oxc_traverse::{Traverse, TraverseCtx}; +use oxc_diagnostics::OxcDiagnostic; +use oxc_ecmascript::{BoundNames, ToJsString}; +use oxc_semantic::{IsGlobalReference, ReferenceFlags, ScopeFlags, ScopeId, SymbolFlags}; +use oxc_span::{GetSpan, SPAN}; +use oxc_traverse::{Ancestor, MaybeBoundIdentifier, Traverse, TraverseCtx}; use crate::{common::helper_loader::Helper, TransformCtx}; #[derive(Debug, Default, Clone, Copy, Deserialize)] #[serde(default, rename_all = "camelCase")] pub struct ObjectRestSpreadOptions { - #[serde(alias = "loose")] - pub(crate) set_spread_properties: bool, + pub loose: bool, - pub(crate) use_built_ins: bool, + pub use_built_ins: bool, } pub struct ObjectRestSpread<'a, 'ctx> { ctx: &'ctx TransformCtx<'a>, + options: ObjectRestSpreadOptions, + + excluded_variabled_declarators: Vec>, } impl<'a, 'ctx> ObjectRestSpread<'a, 'ctx> { pub fn new(options: ObjectRestSpreadOptions, ctx: &'ctx TransformCtx<'a>) -> Self { - Self { ctx, options } + if options.loose { + ctx.error(OxcDiagnostic::error( + "Option `loose` is not implemented for object-rest-spread.", + )); + } + if options.use_built_ins { + ctx.error(OxcDiagnostic::error( + "Option `useBuiltIns` is not implemented for object-rest-spread.", + )); + } + if ctx.assumptions.object_rest_no_symbols { + ctx.error(OxcDiagnostic::error( + "Compiler assumption `objectRestNoSymbols` is not implemented for object-rest-spread.", + )); + } + if ctx.assumptions.ignore_function_length { + ctx.error(OxcDiagnostic::error( + "Compiler assumption `ignoreFunctionLength` is not implemented for object-rest-spread.", + )); + } + Self { ctx, options, excluded_variabled_declarators: vec![] } } } impl<'a, 'ctx> Traverse<'a> for ObjectRestSpread<'a, 'ctx> { + fn exit_program(&mut self, _node: &mut Program<'a>, ctx: &mut TraverseCtx<'a>) { + if !self.excluded_variabled_declarators.is_empty() { + let declarators = ctx.ast.vec_from_iter(self.excluded_variabled_declarators.drain(..)); + let kind = VariableDeclarationKind::Const; + let declaration = ctx.ast.alloc_variable_declaration(SPAN, kind, declarators, false); + let statement = Statement::VariableDeclaration(declaration); + self.ctx.top_level_statements.insert_statement(statement); + } + } + fn enter_expression(&mut self, expr: &mut Expression<'a>, ctx: &mut TraverseCtx<'a>) { - self.transform_object_expression(expr, ctx); + Self::transform_object_expression(self.options, expr, self.ctx, ctx); + self.transform_assignment_expression(expr, ctx); + } + + fn enter_arrow_function_expression( + &mut self, + arrow: &mut ArrowFunctionExpression<'a>, + ctx: &mut TraverseCtx<'a>, + ) { + Self::transform_arrow(arrow, ctx); + } + + fn enter_function(&mut self, func: &mut Function<'a>, ctx: &mut TraverseCtx<'a>) { + Self::transform_function(func, ctx); + } + + // Includes `for (var {...x} = 1;;);` + fn enter_variable_declaration( + &mut self, + decl: &mut VariableDeclaration<'a>, + ctx: &mut TraverseCtx<'a>, + ) { + self.transform_variable_declaration(decl, ctx); + } + + fn enter_catch_clause(&mut self, clause: &mut CatchClause<'a>, ctx: &mut TraverseCtx<'a>) { + Self::transform_catch_clause(clause, ctx); + } + + fn enter_for_in_statement(&mut self, stmt: &mut ForInStatement<'a>, ctx: &mut TraverseCtx<'a>) { + let scope_id = stmt.scope_id(); + Self::transform_for_statement_left(scope_id, &mut stmt.left, &mut stmt.body, ctx); + } + + fn enter_for_of_statement(&mut self, stmt: &mut ForOfStatement<'a>, ctx: &mut TraverseCtx<'a>) { + let scope_id = stmt.scope_id(); + Self::transform_for_statement_left(scope_id, &mut stmt.left, &mut stmt.body, ctx); } } impl<'a, 'ctx> ObjectRestSpread<'a, 'ctx> { - fn transform_object_expression( + // Transform `({ x, ..y } = foo)`. + // Transform `([{ x, ..y }] = foo)`. + fn transform_assignment_expression( &mut self, expr: &mut Expression<'a>, ctx: &mut TraverseCtx<'a>, ) { - let Expression::ObjectExpression(obj_expr) = expr else { + let Expression::AssignmentExpression(assign_expr) = expr else { + return; + }; + // Allow `{...x} = {}` and `[{...x}] = []`. + if !Self::has_nested_target_rest(&assign_expr.left) { return; }; - if obj_expr - .properties - .iter() - .all(|prop| matches!(prop, ObjectPropertyKind::ObjectProperty(..))) + if !matches!(&assign_expr.left, AssignmentTarget::ObjectAssignmentTarget(t) if t.rest.is_some()) { + self.walk_and_replace_nested_object_target(expr, ctx); return; } - // collect `y` and `z` from `{ ...x, y, z }` - let mut obj_prop_list = ctx.ast.vec(); - while obj_expr - .properties - .last() - .map_or(false, |prop| matches!(prop, ObjectPropertyKind::ObjectProperty(..))) - { - let prop = obj_expr.properties.pop().unwrap(); - obj_prop_list.push(prop); + let kind = VariableDeclarationKind::Var; + let symbol_flags = kind_to_symbol_flags(kind); + let scope_id = ctx.current_scope_id(); + let mut reference_builder = + ReferenceBuilder::new(&mut assign_expr.right, symbol_flags, scope_id, true, ctx); + let builder = DeclsBuilder::new(kind, symbol_flags, scope_id); + + let mut new_decls = vec![]; + + if let Some(id) = reference_builder.binding.take() { + new_decls.push(ctx.ast.variable_declarator(SPAN, builder.kind, id, None, false)); + } + + let data = + Self::walk_assignment_target(&mut assign_expr.left, builder, &mut new_decls, ctx); + + // Insert `var _foo` before this statement. + if !new_decls.is_empty() { + for node in ctx.ancestors() { + if let Ancestor::ExpressionStatementExpression(decl) = node { + let kind = VariableDeclarationKind::Var; + let declaration = ctx.ast.alloc_variable_declaration( + SPAN, + kind, + ctx.ast.vec_from_iter(new_decls), + false, + ); + let statement = Statement::VariableDeclaration(declaration); + self.ctx.statement_injector.insert_before(&decl.address(), statement); + break; + } + } + } + + // Make an sequence expression. + let mut expressions = ctx.ast.vec(); + let op = AssignmentOperator::Assign; + + // Insert `_foo = rhs` + if let Some(expr) = reference_builder.expr.take() { + expressions.push(ctx.ast.expression_assignment( + SPAN, + op, + reference_builder.maybe_bound_identifier.create_read_write_target(ctx), + expr, + )); + } + + // Insert `{} = _foo` + expressions.push(ctx.ast.expression_assignment( + SPAN, + op, + ctx.ast.move_assignment_target(&mut assign_expr.left), + reference_builder.create_read_expression(ctx), + )); + + // Insert all `rest = _extends({}, (_objectDestructuringEmpty(_foo), _foo))` + for datum in data { + let (lhs, rhs) = datum.get_lhs_rhs( + &mut reference_builder, + &mut self.excluded_variabled_declarators, + self.ctx, + ctx, + ); + if let BindingPatternOrAssignmentTarget::AssignmentTarget(lhs) = lhs { + if let AssignmentTarget::AssignmentTargetIdentifier(ident) = &lhs { + ctx.symbols_mut() + .get_reference_mut(ident.reference_id()) + .flags_mut() + .insert(ReferenceFlags::Read); + } + expressions.push(ctx.ast.expression_assignment(SPAN, op, lhs, rhs)); + } + } + + // Insert final read `_foo`. + // TODO: remove this if the assignment is not a read reference. + // e.g. remove for `({ a2, ...b2 } = c2)`, keep `(x, ({ a2, ...b2 } = c2)`. + expressions.push(reference_builder.create_read_expression(ctx)); + + *expr = ctx.ast.expression_sequence(assign_expr.span, expressions); + } + + fn walk_assignment_target( + target: &mut AssignmentTarget<'a>, + builder: DeclsBuilder, + new_decls: &mut Vec>, + ctx: &mut TraverseCtx<'a>, + ) -> Vec> { + match target { + AssignmentTarget::ObjectAssignmentTarget(t) => { + let mut data = vec![]; + for prop in t.properties.iter_mut() { + if let AssignmentTargetProperty::AssignmentTargetPropertyProperty(p) = prop { + data.extend(match &mut p.binding { + AssignmentTargetMaybeDefault::AssignmentTargetWithDefault(t) => { + Self::walk_assignment_target( + &mut t.binding, + builder, + new_decls, + ctx, + ) + } + _ => Self::walk_assignment_target( + p.binding.to_assignment_target_mut(), + builder, + new_decls, + ctx, + ), + }); + } + } + if let Some(datum) = + Self::transform_object_assignment_target(t, builder, new_decls, ctx) + { + data.push(datum); + } + data + } + _ => vec![], + } + } + + fn transform_object_assignment_target( + object_assignment_target: &mut ObjectAssignmentTarget<'a>, + builder: DeclsBuilder, + new_decls: &mut Vec>, + ctx: &mut TraverseCtx<'a>, + ) -> Option> { + let rest = object_assignment_target.rest.take()?; + let mut all_primitives = true; + let keys = + ctx.ast.vec_from_iter(object_assignment_target.properties.iter_mut().filter_map(|e| { + match e { + AssignmentTargetProperty::AssignmentTargetPropertyIdentifier(ident) => { + let name = ident.binding.name.clone(); + let expr = ctx.ast.expression_string_literal(SPAN, name); + Some(ArrayExpressionElement::from(expr)) + } + AssignmentTargetProperty::AssignmentTargetPropertyProperty(p) => { + Self::transform_property_key( + &mut p.name, + builder, + new_decls, + &mut all_primitives, + ctx, + ) + } + } + })); + Some(SpreadPair { + lhs: BindingPatternOrAssignmentTarget::AssignmentTarget(rest.target), + keys, + has_no_properties: object_assignment_target.is_empty(), + all_primitives, + }) + } + + fn has_nested_target_rest(target: &AssignmentTarget<'a>) -> bool { + match target { + AssignmentTarget::ObjectAssignmentTarget(t) => { + t.rest.is_some() + || t.properties.iter().any(|p| match p { + AssignmentTargetProperty::AssignmentTargetPropertyIdentifier(_) => false, + AssignmentTargetProperty::AssignmentTargetPropertyProperty(p) => { + match &p.binding { + AssignmentTargetMaybeDefault::AssignmentTargetWithDefault(t) => { + Self::has_nested_target_rest(&t.binding) + } + _ => Self::has_nested_target_rest(p.binding.to_assignment_target()), + } + } + }) + } + AssignmentTarget::ArrayAssignmentTarget(t) => { + t.elements.iter().flatten().any(|e| match e { + AssignmentTargetMaybeDefault::AssignmentTargetWithDefault(t) => { + Self::has_nested_target_rest(&t.binding) + } + _ => Self::has_nested_target_rest(e.to_assignment_target()), + }) || t.rest.as_ref().is_some_and(|r| Self::has_nested_target_rest(&r.target)) + } + _ => false, + } + } + + fn walk_and_replace_nested_object_target( + &mut self, + expr: &mut Expression<'a>, + ctx: &mut TraverseCtx<'a>, + ) { + let Expression::AssignmentExpression(assign_expr) = expr else { + return; + }; + let mut decls = vec![]; + let mut exprs = vec![]; + Self::resursive_walk_assignment_target(&mut assign_expr.left, &mut decls, &mut exprs, ctx); + for node in ctx.ancestors() { + if let Ancestor::ExpressionStatementExpression(decl) = node { + let kind = VariableDeclarationKind::Var; + let declaration = ctx.ast.alloc_variable_declaration( + SPAN, + kind, + ctx.ast.vec_from_iter(decls), + false, + ); + let statement = Statement::VariableDeclaration(declaration); + self.ctx.statement_injector.insert_before(&decl.address(), statement); + break; + } + } + let mut expressions = ctx.ast.vec1(ctx.ast.move_expression(expr)); + expressions.extend(exprs); + *expr = ctx.ast.expression_sequence(SPAN, expressions); + } + + fn resursive_walk_assignment_target( + pat: &mut AssignmentTarget<'a>, + decls: &mut Vec>, + exprs: &mut Vec>, + ctx: &mut TraverseCtx<'a>, + ) { + match pat { + AssignmentTarget::ArrayAssignmentTarget(t) => { + for e in t.elements.iter_mut().flatten() { + Self::recursive_walk_assignment_target_maybe_default(e, decls, exprs, ctx); + } + } + AssignmentTarget::ObjectAssignmentTarget(t) => { + for p in t.properties.iter_mut() { + if let AssignmentTargetProperty::AssignmentTargetPropertyProperty(e) = p { + Self::recursive_walk_assignment_target_maybe_default( + &mut e.binding, + decls, + exprs, + ctx, + ); + } + } + if t.rest.is_none() { + return; + } + let scope_id = ctx.scoping.current_scope_id(); + let flags = SymbolFlags::FunctionScopedVariable; + let bound_identifier = ctx.generate_uid("ref", scope_id, flags); + let id = bound_identifier.create_binding_pattern(ctx); + let kind = VariableDeclarationKind::Var; + decls.push(ctx.ast.variable_declarator(SPAN, kind, id, None, false)); + exprs.push(ctx.ast.expression_assignment( + SPAN, + AssignmentOperator::Assign, + ctx.ast.move_assignment_target(pat), + bound_identifier.create_read_expression(ctx), + )); + *pat = bound_identifier.create_spanned_write_target(SPAN, ctx); + } + _ => {} + } + } + + fn recursive_walk_assignment_target_maybe_default( + target: &mut AssignmentTargetMaybeDefault<'a>, + decls: &mut Vec>, + exprs: &mut Vec>, + ctx: &mut TraverseCtx<'a>, + ) { + match target { + AssignmentTargetMaybeDefault::AssignmentTargetWithDefault(d) => { + Self::resursive_walk_assignment_target(&mut d.binding, decls, exprs, ctx); + } + _ => Self::resursive_walk_assignment_target( + target.to_assignment_target_mut(), + decls, + exprs, + ctx, + ), + } + } +} + +// Transform `({ x, ..y })`. +impl<'a, 'ctx> ObjectRestSpread<'a, 'ctx> { + // `pub` for jsx spread. + pub fn transform_object_expression( + _options: ObjectRestSpreadOptions, + expr: &mut Expression<'a>, + transform_ctx: &'ctx TransformCtx<'a>, + ctx: &mut TraverseCtx<'a>, + ) { + let Expression::ObjectExpression(obj_expr) = expr else { + return; + }; + + if obj_expr.properties.iter().all(|prop| !prop.is_spread()) { + return; + } + + let mut call_expr: Option> = None; + let mut props = vec![]; + + for prop in obj_expr.properties.drain(..) { + if let ObjectPropertyKind::SpreadProperty(spread_prop) = prop { + Self::make_object_spread(&mut call_expr, &mut props, transform_ctx, ctx); + let arg = ctx.ast.move_expression(&mut spread_prop.unbox().argument); + call_expr.as_mut().unwrap().arguments.push(Argument::from(arg)); + } else { + props.push(prop); + } + } + + if !props.is_empty() { + Self::make_object_spread(&mut call_expr, &mut props, transform_ctx, ctx); + } + + *expr = Expression::CallExpression(ctx.ast.alloc(call_expr.unwrap())); + } + + fn make_object_spread( + expr: &mut Option>, + props: &mut Vec>, + transform_ctx: &'ctx TransformCtx<'a>, + ctx: &mut TraverseCtx<'a>, + ) { + let had_props = !props.is_empty(); + let obj = ctx.ast.expression_object(SPAN, ctx.ast.vec_from_iter(props.drain(..)), None); + let new_expr = if let Some(call_expr) = expr.take() { + let callee = transform_ctx.helper_load(Helper::ObjectSpread2, ctx); + let arg = Expression::CallExpression(ctx.ast.alloc(call_expr)); + let mut arguments = ctx.ast.vec1(Argument::from(arg)); + if had_props { + let empty_object = ctx.ast.expression_object(SPAN, ctx.ast.vec(), None); + arguments.push(Argument::from(empty_object)); + arguments.push(Argument::from(obj)); + } + ctx.ast.call_expression(SPAN, callee, NONE, arguments, false) + } else { + let callee = transform_ctx.helper_load(Helper::ObjectSpread2, ctx); + let arguments = ctx.ast.vec1(Argument::from(obj)); + ctx.ast.call_expression(SPAN, callee, NONE, arguments, false) + }; + expr.replace(new_expr); + } +} + +impl<'a, 'ctx> ObjectRestSpread<'a, 'ctx> { + // Transform `function foo({...x}) {}`. + fn transform_function(func: &mut Function<'a>, ctx: &mut TraverseCtx<'a>) { + let scope_id = func.scope_id(); + let Some(body) = func.body.as_mut() else { return }; + for param in func.params.items.iter_mut() { + if Self::has_nested_object_rest(¶m.pattern) { + Self::replace_rest_element( + VariableDeclarationKind::Var, + &mut param.pattern, + &mut body.statements, + scope_id, + ctx, + ); + } } + } + + // Transform `(...x) => {}`. + fn transform_arrow(arrow: &mut ArrowFunctionExpression<'a>, ctx: &mut TraverseCtx<'a>) { + let scope_id = arrow.scope_id(); + let mut replaced = false; + for param in arrow.params.items.iter_mut() { + if Self::has_nested_object_rest(¶m.pattern) { + Self::replace_rest_element( + VariableDeclarationKind::Var, + &mut param.pattern, + &mut arrow.body.statements, + scope_id, + ctx, + ); + replaced = true; + } + } + if replaced && arrow.expression { + arrow.expression = false; + } + } - let Some(ObjectPropertyKind::SpreadProperty(mut spread_prop)) = obj_expr.properties.pop() - else { + // Transform `try {} catch (...x) {}`. + fn transform_catch_clause(clause: &mut CatchClause<'a>, ctx: &mut TraverseCtx<'a>) { + let Some(param) = &mut clause.param else { return }; + if Self::has_nested_object_rest(¶m.pattern) { + let scope_id = clause.body.scope_id(); + // Remove `SymbolFlags::CatchVariable`. + param.pattern.bound_names(&mut |ident| { + ctx.symbols_mut() + .get_flags_mut(ident.symbol_id()) + .remove(SymbolFlags::CatchVariable); + }); + Self::replace_rest_element( + VariableDeclarationKind::Var, + &mut param.pattern, + &mut clause.body.body, + scope_id, + ctx, + ); + // Add `SymbolFlags::CatchVariable`. + param.pattern.bound_names(&mut |ident| { + ctx.symbols_mut() + .get_flags_mut(ident.symbol_id()) + .insert(SymbolFlags::CatchVariable); + }); + } + } + + // Transform `for (var { ...x };;)`. + fn transform_variable_declaration_for_x_statement( + decl: &mut VariableDeclaration<'a>, + body: &mut Statement<'a>, + scope_id: ScopeId, + ctx: &mut TraverseCtx<'a>, + ) { + for declarator in decl.declarations.iter_mut() { + if Self::has_nested_object_rest(&declarator.id) { + let new_scope_id = Self::try_replace_statement_with_block(body, scope_id, ctx); + let Statement::BlockStatement(block) = body else { + unreachable!(); + }; + let mut bound_names = vec![]; + declarator.id.bound_names(&mut |ident| bound_names.push(ident.clone())); + Self::replace_rest_element( + declarator.kind, + &mut declarator.id, + &mut block.body, + scope_id, + ctx, + ); + // Move the bindings from the for init scope to scope of the loop body. + for ident in bound_names { + ctx.symbols_mut().set_scope_id(ident.symbol_id(), new_scope_id); + ctx.scopes_mut().move_binding(scope_id, new_scope_id, ident.name.into()); + } + } + } + } + + // If the assignment target contains an object rest, + // create a reference and move the assignment target to the block body. + // `for ({...x} in []);` `for ({...x} of []);` + // `for ([{...x}] in []);` `for ([{...x}] of []);` + fn transform_for_statement_left( + scope_id: ScopeId, + left: &mut ForStatementLeft<'a>, + body: &mut Statement<'a>, + ctx: &mut TraverseCtx<'a>, + ) { + if let ForStatementLeft::VariableDeclaration(decl) = left { + Self::transform_variable_declaration_for_x_statement(decl, body, scope_id, ctx); + return; + } + if !Self::has_nested_target_rest(left.to_assignment_target()) { + return; + } + let target = left.to_assignment_target_mut(); + let assign_left = ctx.ast.move_assignment_target(target); + let flags = SymbolFlags::FunctionScopedVariable; + let bound_identifier = ctx.generate_uid("ref", scope_id, flags); + let id = bound_identifier.create_binding_pattern(ctx); + let kind = VariableDeclarationKind::Var; + let declarations = ctx.ast.vec1(ctx.ast.variable_declarator(SPAN, kind, id, None, false)); + let decl = ctx.ast.alloc_variable_declaration(SPAN, kind, declarations, false); + *left = ForStatementLeft::VariableDeclaration(decl); + Self::try_replace_statement_with_block(body, scope_id, ctx); + let Statement::BlockStatement(block) = body else { unreachable!(); }; + let operator = AssignmentOperator::Assign; + let right = bound_identifier.create_read_expression(ctx); + let expr = ctx.ast.expression_assignment(SPAN, operator, assign_left, right); + let stmt = ctx.ast.statement_expression(SPAN, expr); + block.body.insert(0, stmt); + } - let mut arguments = ctx.ast.vec(); - arguments.push(Argument::from(ctx.ast.move_expression(expr))); - arguments.push(Argument::from(ctx.ast.move_expression(&mut spread_prop.argument))); + fn try_replace_statement_with_block( + stmt: &mut Statement<'a>, + parent_scope_id: ScopeId, + ctx: &mut TraverseCtx<'a>, + ) -> ScopeId { + if let Statement::BlockStatement(block) = stmt { + return block.scope_id(); + } + let scope_id = ctx.create_child_scope(parent_scope_id, ScopeFlags::empty()); + let (span, stmts) = if let Statement::EmptyStatement(empty_stmt) = stmt { + (empty_stmt.span, ctx.ast.vec()) + } else { + let span = stmt.span(); + (span, ctx.ast.vec1(ctx.ast.move_statement(stmt))) + }; + *stmt = Statement::BlockStatement( + ctx.ast.alloc_block_statement_with_scope_id(span, stmts, scope_id), + ); + scope_id + } - let object_id = self.get_object_symbol_id(ctx); - let callee = self.get_extend_object_callee(object_id, ctx); + /// Recursively check for object rest. + fn has_nested_object_rest(pat: &BindingPattern<'a>) -> bool { + match &pat.kind { + BindingPatternKind::ObjectPattern(pat) => { + pat.rest.is_some() + || pat.properties.iter().any(|p| Self::has_nested_object_rest(&p.value)) + } + BindingPatternKind::ArrayPattern(pat) => { + pat.elements.iter().any(|e| e.as_ref().is_some_and(Self::has_nested_object_rest)) + || pat.rest.as_ref().is_some_and(|e| Self::has_nested_object_rest(&e.argument)) + } + BindingPatternKind::AssignmentPattern(pat) => Self::has_nested_object_rest(&pat.left), + BindingPatternKind::BindingIdentifier(_) => false, + } + } - // ({ ...x }) => _objectSpread({}, x) - *expr = ctx.ast.expression_call(SPAN, callee, NONE, arguments, false); + /// Move the binding to the body if it contains an object rest. + /// The object pattern will be transform by `transform_object_pattern` afterwards. + fn replace_rest_element( + kind: VariableDeclarationKind, + pattern: &mut BindingPattern<'a>, + body: &mut ArenaVec<'a, Statement<'a>>, + scope_id: ScopeId, + ctx: &mut TraverseCtx<'a>, + ) { + match &mut pattern.kind { + // Replace the object pattern, no need to walk the object properties. + BindingPatternKind::ObjectPattern(_) => { + Self::replace_object_pattern_and_insert_into_block_body( + kind, pattern, body, scope_id, ctx, + ); + } + BindingPatternKind::AssignmentPattern(pat) => { + Self::replace_object_pattern_and_insert_into_block_body( + kind, + &mut pat.left, + body, + scope_id, + ctx, + ); + } + // Or replace all occurances of object pattern inside array pattern. + BindingPatternKind::ArrayPattern(pat) => { + for element in pat.elements.iter_mut().flatten() { + Self::replace_rest_element(kind, element, body, scope_id, ctx); + } + if let Some(element) = &mut pat.rest { + Self::replace_rest_element(kind, &mut element.argument, body, scope_id, ctx); + } + } + BindingPatternKind::BindingIdentifier(_) => {} + } + } - // ({ ...x, y, z }) => _objectSpread(_objectSpread({}, x), { y, z }); - if !obj_prop_list.is_empty() { - obj_prop_list.reverse(); - let mut arguments = ctx.ast.vec(); - arguments.push(Argument::from(ctx.ast.move_expression(expr))); - arguments.push(Argument::from(ctx.ast.expression_object(SPAN, obj_prop_list, None))); + // Add `let {...x} = _ref` to body. + fn replace_object_pattern_and_insert_into_block_body( + kind: VariableDeclarationKind, + pat: &mut BindingPattern<'a>, + body: &mut ArenaVec<'a, Statement<'a>>, + scope_id: ScopeId, + ctx: &mut TraverseCtx<'a>, + ) { + let decl = Self::create_temporary_reference_for_binding(kind, pat, scope_id, ctx); + body.insert(0, Statement::VariableDeclaration(ctx.ast.alloc(decl))); + } - let callee = self.get_extend_object_callee(object_id, ctx); + fn create_temporary_reference_for_binding( + kind: VariableDeclarationKind, + pat: &mut BindingPattern<'a>, + scope_id: ScopeId, + ctx: &mut TraverseCtx<'a>, + ) -> VariableDeclaration<'a> { + let bound_identifier = ctx.generate_uid("ref", scope_id, kind_to_symbol_flags(kind)); + let kind = VariableDeclarationKind::Let; + let id = mem::replace(pat, bound_identifier.create_binding_pattern(ctx)); + let init = bound_identifier.create_read_expression(ctx); + let declarations = + ctx.ast.vec1(ctx.ast.variable_declarator(SPAN, kind, id, Some(init), false)); + let decl = ctx.ast.variable_declaration(SPAN, kind, declarations, false); + decl.bound_names(&mut |ident| { + *ctx.symbols_mut().get_flags_mut(ident.symbol_id()) = SymbolFlags::BlockScopedVariable; + }); + decl + } +} - *expr = ctx.ast.expression_call(SPAN, callee, NONE, arguments, false); +// Transform `let { x, ..y } = foo`. +// Transform `let [{ x, ..y }] = foo`. +impl<'a, 'ctx> ObjectRestSpread<'a, 'ctx> { + fn transform_variable_declaration( + &mut self, + decl: &mut VariableDeclaration<'a>, + ctx: &mut TraverseCtx<'a>, + ) { + let mut new_decls = vec![]; + for (i, variable_declarator) in decl.declarations.iter_mut().enumerate() { + if variable_declarator.init.is_some() + && Self::has_nested_object_rest(&variable_declarator.id) + { + let decls = self.transform_variable_declarator(variable_declarator, ctx); + new_decls.push((i, decls)); + } + } + // TODO: performance can be improved by not shuffling the vec multiple times. + for (i, decls) in new_decls { + decl.declarations.splice(i..=i, decls); } } - #[expect(clippy::option_option)] - fn get_object_symbol_id(&self, ctx: &mut TraverseCtx<'a>) -> Option> { - if self.options.set_spread_properties { - Some(ctx.scopes().find_binding(ctx.current_scope_id(), "Object")) + // The algorithm depth searches for object rest, + // and then creates a ref for the object, subsequent visit will then transform this object rest. + // Transforms: + // * `var {...a} = foo` -> `var a = _extends({}, (_objectDestructuringEmpty(foo), foo));` + // * `var [{x: {y: {...a}}}] = z` -> `var [{x: {y: _ref}}] = z, {...a} = _ref` + fn transform_variable_declarator( + &mut self, + decl: &mut VariableDeclarator<'a>, + ctx: &mut TraverseCtx<'a>, + ) -> ArenaVec<'a, VariableDeclarator<'a>> { + // It is syntax error or inside for loop if missing initializer in destructuring pattern. + let init = decl.init.as_mut().unwrap(); + + // Use the scope of the identifier, scope is different for + // `for (var {...x} = {};;);` and `for (let {...x} = {};;);` + // TODO: improve this by getting the value only once. + let mut scope_id = ctx.current_scope_id(); + let mut symbol_flags = kind_to_symbol_flags(decl.kind); + let symbols = ctx.symbols(); + decl.id.bound_names(&mut |ident| { + let symbol_id = ident.symbol_id(); + scope_id = symbols.get_scope_id(symbol_id); + symbol_flags.insert(symbols.get_flags(symbol_id)); + }); + + let builder = DeclsBuilder::new(decl.kind, symbol_flags, scope_id); + let mut new_decls = vec![]; + + let mut reference_builder = ReferenceBuilder::new(init, symbol_flags, scope_id, false, ctx); + let remove_empty_object_pattern; + + // Add `_foo = foo()` + if let Some(id) = reference_builder.binding.take() { + let decl = ctx.ast.variable_declarator( + SPAN, + builder.kind, + id, + Some(reference_builder.create_read_expression(ctx)), + false, + ); + new_decls.push(decl); + } + + let mut temp_decls = vec![]; + let mut temp_keys = vec![]; + + if let BindingPatternKind::ObjectPattern(pat) = &mut decl.id.kind { + // Example: `let { x, ...rest } = foo();`. + remove_empty_object_pattern = pat.properties.is_empty(); + // Walk the properties that may contain a nested rest spread. + let data = pat + .properties + .iter_mut() + .flat_map(|p| self.recursive_walk_binding_pattern(&mut p.value, builder, ctx)) + .collect::>(); + temp_decls.extend(data); + + // Transform the object pattern with a rest pattern. + if let Some(rest) = pat.rest.take() { + let lhs = BindingPatternOrAssignmentTarget::BindingPattern(rest.unbox().argument); + let mut all_primitives = true; + // Create the access keys. + // `let { a, b, ...c } = foo` -> `["a", "b"]` + let keys = ctx.ast.vec_from_iter(pat.properties.iter_mut().filter_map( + |binding_property| { + Self::transform_property_key( + &mut binding_property.key, + builder, + &mut temp_keys, + &mut all_primitives, + ctx, + ) + }, + )); + let datum = SpreadPair { + lhs, + keys, + has_no_properties: pat.properties.is_empty(), + all_primitives, + }; + // Add `rest = babelHelpers.extends({}, (babelHelpers.objectDestructuringEmpty(_foo), _foo))`. + // Or `rest = babelHelpers.objectWithoutProperties(_foo, ["x"])`. + let (lhs, rhs) = datum.get_lhs_rhs( + &mut reference_builder, + &mut self.excluded_variabled_declarators, + self.ctx, + ctx, + ); + if let BindingPatternOrAssignmentTarget::BindingPattern(lhs) = lhs { + let decl = + ctx.ast.variable_declarator(lhs.span(), decl.kind, lhs, Some(rhs), false); + temp_decls.push(decl); + } + } } else { - None + remove_empty_object_pattern = false; + let data = self.recursive_walk_binding_pattern(&mut decl.id, builder, ctx); + temp_decls.extend(data); + } + + new_decls.extend(temp_keys); + + // Insert the original declarator by copying its data out. + if !remove_empty_object_pattern { + let mut binding_pattern_kind = + ctx.ast.binding_pattern_kind_object_pattern(decl.span, ctx.ast.vec(), NONE); + mem::swap(&mut binding_pattern_kind, &mut decl.id.kind); + let decl = ctx.ast.variable_declarator( + decl.span, + decl.kind, + ctx.ast.binding_pattern(binding_pattern_kind, NONE, false), + Some(reference_builder.create_read_expression(ctx)), + false, + ); + new_decls.push(decl); } + + new_decls.extend(temp_decls); + ctx.ast.vec_from_iter(new_decls) } - #[expect(clippy::option_option)] - fn get_extend_object_callee( + // Returns all temporary references + fn recursive_walk_binding_pattern( &mut self, - object_id: Option>, + pat: &mut BindingPattern<'a>, + builder: DeclsBuilder, + ctx: &mut TraverseCtx<'a>, + ) -> Vec> { + match &mut pat.kind { + BindingPatternKind::BindingIdentifier(_) => vec![], + BindingPatternKind::ArrayPattern(array_pat) => array_pat + .elements + .iter_mut() + .flatten() + .flat_map(|p| self.recursive_walk_binding_pattern(p, builder, ctx)) + .collect::>(), + BindingPatternKind::AssignmentPattern(assign_pat) => { + self.recursive_walk_binding_pattern(&mut assign_pat.left, builder, ctx) + } + BindingPatternKind::ObjectPattern(p) => { + let data = p + .properties + .iter_mut() + .flat_map(|p| self.recursive_walk_binding_pattern(&mut p.value, builder, ctx)) + .collect::>(); + if p.rest.is_some() { + let bound_identifier = + ctx.generate_uid("ref", builder.scope_id, builder.symbol_flags); + let id = mem::replace(pat, bound_identifier.create_binding_pattern(ctx)); + + let init = bound_identifier.create_read_expression(ctx); + let mut decl = + ctx.ast.variable_declarator(SPAN, builder.kind, id, Some(init), false); + let mut decls = self + .transform_variable_declarator(&mut decl, ctx) + .into_iter() + .collect::>(); + decls.extend(data); + return decls; + } + data + } + } + } + + fn transform_property_key( + key: &mut PropertyKey<'a>, + builder: DeclsBuilder, + new_decls: &mut Vec>, + all_primitives: &mut bool, + ctx: &mut TraverseCtx<'a>, + ) -> Option> { + match key { + // `let { a, ... rest }` + PropertyKey::StaticIdentifier(ident) => { + let name = ident.name.clone(); + let expr = ctx.ast.expression_string_literal(ident.span, name); + Some(ArrayExpressionElement::from(expr)) + } + // `let { 'a', ... rest }` + // `let { ['a'], ... rest }` + PropertyKey::StringLiteral(lit) => { + let name = lit.value.clone(); + let expr = ctx.ast.expression_string_literal(lit.span, name.clone()); + Some(ArrayExpressionElement::from(expr)) + } + // `let { [`a`], ... rest }` + PropertyKey::TemplateLiteral(lit) if lit.is_no_substitution_template() => { + let expr = Expression::TemplateLiteral(lit.clone_in(ctx.ast.allocator)); + Some(ArrayExpressionElement::from(expr)) + } + PropertyKey::PrivateIdentifier(_) => { + /* syntax error */ + None + } + key => { + let expr = key.as_expression_mut()?; + // `let { [1], ... rest }` + if expr.is_literal() { + let span = expr.span(); + let s = expr.to_js_string().unwrap(); + let expr = ctx.ast.expression_string_literal(span, s); + return Some(ArrayExpressionElement::from(expr)); + } + *all_primitives = false; + if let Expression::Identifier(ident) = expr { + if !ident.is_global_reference(ctx.symbols()) { + let expr = MaybeBoundIdentifier::from_identifier_reference(ident, ctx) + .create_read_expression(ctx); + return Some(ArrayExpressionElement::from(expr)); + } + } + let bound_identifier = + ctx.generate_uid_based_on_node(expr, builder.scope_id, builder.symbol_flags); + let p = bound_identifier.create_binding_pattern(ctx); + let mut lhs = bound_identifier.create_read_expression(ctx); + mem::swap(&mut lhs, expr); + new_decls.push(ctx.ast.variable_declarator( + SPAN, + builder.kind, + p, + Some(lhs), + false, + )); + Some(ArrayExpressionElement::from(bound_identifier.create_read_expression(ctx))) + } + } + } +} + +#[derive(Debug, Clone, Copy)] +struct DeclsBuilder { + // decls: ArenaVec<'a, VariableDeclarator<'a>>, + kind: VariableDeclarationKind, + symbol_flags: SymbolFlags, + scope_id: ScopeId, +} + +impl DeclsBuilder { + fn new(kind: VariableDeclarationKind, symbol_flags: SymbolFlags, scope_id: ScopeId) -> Self { + Self { kind, symbol_flags, scope_id } + } +} + +fn kind_to_symbol_flags(kind: VariableDeclarationKind) -> SymbolFlags { + match kind { + VariableDeclarationKind::Var => SymbolFlags::FunctionScopedVariable, + VariableDeclarationKind::Let + | VariableDeclarationKind::Using + | VariableDeclarationKind::AwaitUsing => SymbolFlags::BlockScopedVariable, + VariableDeclarationKind::Const => { + SymbolFlags::BlockScopedVariable | SymbolFlags::ConstVariable + } + } +} + +#[derive(Debug)] +enum BindingPatternOrAssignmentTarget<'a> { + BindingPattern(BindingPattern<'a>), + AssignmentTarget(AssignmentTarget<'a>), +} + +#[derive(Debug)] +struct SpreadPair<'a> { + lhs: BindingPatternOrAssignmentTarget<'a>, + keys: ArenaVec<'a, ArrayExpressionElement<'a>>, + has_no_properties: bool, + all_primitives: bool, +} + +impl<'a> SpreadPair<'a> { + fn get_lhs_rhs( + self, + reference_builder: &mut ReferenceBuilder<'a>, + excluded_variabled_declarators: &mut Vec>, + transform_ctx: &TransformCtx<'a>, ctx: &mut TraverseCtx<'a>, - ) -> Expression<'a> { - if let Some(object_id) = object_id { - Self::object_assign(object_id, ctx) + ) -> (BindingPatternOrAssignmentTarget<'a>, Expression<'a>) { + let rhs = if self.has_no_properties { + // The `ObjectDestructuringEmpty` function throws a type error when destructuring null. + // `function _objectDestructuringEmpty(t) { if (null == t) throw new TypeError("Cannot destructure " + t); }` + let mut arguments = ctx.ast.vec(); + // Add `{}`. + arguments.push(Argument::ObjectExpression(ctx.ast.alloc_object_expression( + SPAN, + ctx.ast.vec(), + None, + ))); + // Add `(_objectDestructuringEmpty(b), b);` + arguments.push(Argument::SequenceExpression(ctx.ast.alloc_sequence_expression( + SPAN, + { + let mut sequence = ctx.ast.vec(); + sequence.push(transform_ctx.helper_call_expr( + Helper::ObjectDestructuringEmpty, + SPAN, + ctx.ast.vec1(Argument::from(reference_builder.create_read_expression(ctx))), + ctx, + )); + sequence.push(reference_builder.create_read_expression(ctx)); + sequence + }, + ))); + transform_ctx.helper_call_expr(Helper::Extends, SPAN, arguments, ctx) } else { - self.ctx.helper_load(Helper::ObjectSpread2, ctx) + // / `let { a, b, ...c } = z` -> _objectWithoutProperties(_z, ["a", "b"]); + // / `_objectWithoutProperties(_z, ["a", "b"])` + let mut arguments = + ctx.ast.vec1(Argument::from(reference_builder.create_read_expression(ctx))); + let key_expression = ctx.ast.expression_array(SPAN, self.keys, None); + + let key_expression = if self.all_primitives + && ctx.scoping.current_scope_id() != ctx.scopes().root_scope_id() + { + // Move the key_expression to the root scope. + let bound_identifier = ctx.generate_uid_in_root_scope( + "excluded", + SymbolFlags::BlockScopedVariable | SymbolFlags::ConstVariable, + ); + let kind = VariableDeclarationKind::Const; + let declarator = ctx.ast.variable_declarator( + SPAN, + kind, + bound_identifier.create_binding_pattern(ctx), + Some(key_expression), + false, + ); + excluded_variabled_declarators.push(declarator); + bound_identifier.create_read_expression(ctx) + } else if !self.all_primitives { + // map to `toPropertyKey` to handle the possible non-string values + // `[_ref].map(babelHelpers.toPropertyKey))` + let property = ctx.ast.identifier_name(SPAN, "map"); + let callee = Expression::StaticMemberExpression( + ctx.ast.alloc_static_member_expression(SPAN, key_expression, property, false), + ); + let arguments = ctx + .ast + .vec1(Argument::from(transform_ctx.helper_load(Helper::ToPropertyKey, ctx))); + ctx.ast.expression_call(SPAN, callee, NONE, arguments, false) + } else { + key_expression + }; + arguments.push(Argument::from(key_expression)); + transform_ctx.helper_call_expr(Helper::ObjectWithoutProperties, SPAN, arguments, ctx) + }; + (self.lhs, rhs) + } +} + +#[derive(Debug)] +struct ReferenceBuilder<'a> { + expr: Option>, + binding: Option>, + maybe_bound_identifier: MaybeBoundIdentifier<'a>, +} + +impl<'a> ReferenceBuilder<'a> { + fn new( + expr: &mut Expression<'a>, + symbol_flags: SymbolFlags, + scope_id: ScopeId, + force_create_binding: bool, + ctx: &mut TraverseCtx<'a>, + ) -> Self { + let expr = ctx.ast.move_expression(expr); + let binding; + let maybe_bound_identifier; + match &expr { + Expression::Identifier(ident) if !force_create_binding => { + binding = None; + maybe_bound_identifier = + MaybeBoundIdentifier::from_identifier_reference(ident, ctx); + } + expr => { + let bound_identifier = ctx.generate_uid_based_on_node(expr, scope_id, symbol_flags); + binding = Some(bound_identifier.create_binding_pattern(ctx)); + maybe_bound_identifier = bound_identifier.to_maybe_bound_identifier(); + } } + Self { expr: Some(expr), binding, maybe_bound_identifier } } - fn object_assign(symbol_id: Option, ctx: &mut TraverseCtx<'a>) -> Expression<'a> { - let object = - ctx.create_ident_expr(SPAN, Atom::from("Object"), symbol_id, ReferenceFlags::Read); - let property = ctx.ast.identifier_name(SPAN, Atom::from("assign")); - Expression::from(ctx.ast.member_expression_static(SPAN, object, property, false)) + fn create_read_expression(&mut self, ctx: &mut TraverseCtx<'a>) -> Expression<'a> { + self.expr.take().unwrap_or_else(|| self.maybe_bound_identifier.create_read_expression(ctx)) } } diff --git a/crates/oxc_transformer/src/jsx/jsx_impl.rs b/crates/oxc_transformer/src/jsx/jsx_impl.rs index 8d58728d9be144..aa4fe96a03e2ff 100644 --- a/crates/oxc_transformer/src/jsx/jsx_impl.rs +++ b/crates/oxc_transformer/src/jsx/jsx_impl.rs @@ -100,7 +100,10 @@ use oxc_syntax::{ }; use oxc_traverse::{BoundIdentifier, Traverse, TraverseCtx}; -use crate::TransformCtx; +use crate::{ + es2018::{ObjectRestSpread, ObjectRestSpreadOptions}, + TransformCtx, +}; use super::diagnostics; @@ -112,6 +115,7 @@ pub use super::{ pub struct JsxImpl<'a, 'ctx> { options: JsxOptions, + object_rest_spread_options: Option, ctx: &'ctx TransformCtx<'a>, @@ -369,7 +373,12 @@ impl<'a> Pragma<'a> { } impl<'a, 'ctx> JsxImpl<'a, 'ctx> { - pub fn new(options: JsxOptions, ast: AstBuilder<'a>, ctx: &'ctx TransformCtx<'a>) -> Self { + pub fn new( + options: JsxOptions, + object_rest_spread_options: Option, + ast: AstBuilder<'a>, + ctx: &'ctx TransformCtx<'a>, + ) -> Self { let bindings = match options.runtime { JsxRuntime::Classic => { if options.import_source.is_some() { @@ -434,6 +443,7 @@ impl<'a, 'ctx> JsxImpl<'a, 'ctx> { Self { options, + object_rest_spread_options, ctx, jsx_self: JsxSelf::new(ctx), jsx_source: JsxSource::new(ctx), @@ -649,7 +659,15 @@ impl<'a, 'ctx> JsxImpl<'a, 'ctx> { // If runtime is automatic that means we always to add `{ .. }` as the second argument even if it's empty if is_automatic || !properties.is_empty() { - let object_expression = ctx.ast.expression_object(SPAN, properties, None); + let mut object_expression = ctx.ast.expression_object(SPAN, properties, None); + if let Some(options) = self.object_rest_spread_options { + ObjectRestSpread::transform_object_expression( + options, + &mut object_expression, + self.ctx, + ctx, + ); + } arguments.push(Argument::from(object_expression)); } else if arguments.len() == 1 { // If not and second argument doesn't exist, we should add `null` as the second argument diff --git a/crates/oxc_transformer/src/jsx/mod.rs b/crates/oxc_transformer/src/jsx/mod.rs index 83097252a721be..75db0642141c0a 100644 --- a/crates/oxc_transformer/src/jsx/mod.rs +++ b/crates/oxc_transformer/src/jsx/mod.rs @@ -1,7 +1,7 @@ use oxc_ast::{ast::*, AstBuilder}; use oxc_traverse::{Traverse, TraverseCtx}; -use crate::TransformCtx; +use crate::{es2018::ObjectRestSpreadOptions, TransformCtx}; mod comments; mod diagnostics; @@ -42,7 +42,12 @@ pub struct Jsx<'a, 'ctx> { // Constructors impl<'a, 'ctx> Jsx<'a, 'ctx> { - pub fn new(mut options: JsxOptions, ast: AstBuilder<'a>, ctx: &'ctx TransformCtx<'a>) -> Self { + pub fn new( + mut options: JsxOptions, + object_rest_spread_options: Option, + ast: AstBuilder<'a>, + ctx: &'ctx TransformCtx<'a>, + ) -> Self { if options.jsx_plugin || options.development { options.conform(); } @@ -51,7 +56,7 @@ impl<'a, 'ctx> Jsx<'a, 'ctx> { } = options; let refresh = options.refresh.clone(); Self { - implementation: JsxImpl::new(options, ast, ctx), + implementation: JsxImpl::new(options, object_rest_spread_options, ast, ctx), display_name: ReactDisplayName::new(ctx), enable_jsx_plugin: jsx_plugin, display_name_plugin, diff --git a/crates/oxc_transformer/src/lib.rs b/crates/oxc_transformer/src/lib.rs index 72aa494b504e16..4f492e0213c1be 100644 --- a/crates/oxc_transformer/src/lib.rs +++ b/crates/oxc_transformer/src/lib.rs @@ -114,7 +114,7 @@ impl<'a> Transformer<'a> { .source_type .is_typescript() .then(|| TypeScript::new(&self.typescript, &self.ctx)), - x1_jsx: Jsx::new(self.jsx, ast_builder, &self.ctx), + x1_jsx: Jsx::new(self.jsx, self.env.es2018.object_rest_spread, ast_builder, &self.ctx), x2_es2022: ES2022::new(self.env.es2022, &self.ctx), x2_es2021: ES2021::new(self.env.es2021, &self.ctx), x2_es2020: ES2020::new(self.env.es2020, &self.ctx), @@ -161,11 +161,11 @@ impl<'a, 'ctx> Traverse<'a> for TransformerImpl<'a, 'ctx> { if let Some(typescript) = self.x0_typescript.as_mut() { typescript.exit_program(program, ctx); } + self.x2_es2018.exit_program(program, ctx); self.common.exit_program(program, ctx); } // ALPHASORT - fn enter_arrow_function_expression( &mut self, arrow: &mut ArrowFunctionExpression<'a>, @@ -175,6 +175,15 @@ impl<'a, 'ctx> Traverse<'a> for TransformerImpl<'a, 'ctx> { if let Some(typescript) = self.x0_typescript.as_mut() { typescript.enter_arrow_function_expression(arrow, ctx); } + self.x2_es2018.enter_arrow_function_expression(arrow, ctx); + } + + fn enter_variable_declaration( + &mut self, + decl: &mut VariableDeclaration<'a>, + ctx: &mut TraverseCtx<'a>, + ) { + self.x2_es2018.enter_variable_declaration(decl, ctx); } fn enter_variable_declarator( @@ -303,6 +312,7 @@ impl<'a, 'ctx> Traverse<'a> for TransformerImpl<'a, 'ctx> { fn enter_function(&mut self, func: &mut Function<'a>, ctx: &mut TraverseCtx<'a>) { self.common.enter_function(func, ctx); + self.x2_es2018.enter_function(func, ctx); } fn exit_function(&mut self, func: &mut Function<'a>, ctx: &mut TraverseCtx<'a>) { @@ -520,10 +530,12 @@ impl<'a, 'ctx> Traverse<'a> for TransformerImpl<'a, 'ctx> { if let Some(typescript) = self.x0_typescript.as_mut() { typescript.enter_for_in_statement(stmt, ctx); } + self.x2_es2018.enter_for_in_statement(stmt, ctx); } fn enter_catch_clause(&mut self, clause: &mut CatchClause<'a>, ctx: &mut TraverseCtx<'a>) { self.x2_es2019.enter_catch_clause(clause, ctx); + self.x2_es2018.enter_catch_clause(clause, ctx); } fn enter_import_declaration( diff --git a/crates/oxc_transformer/src/options/env.rs b/crates/oxc_transformer/src/options/env.rs index ba159d7de7dc10..5ff7ae9d02c32c 100644 --- a/crates/oxc_transformer/src/options/env.rs +++ b/crates/oxc_transformer/src/options/env.rs @@ -72,12 +72,7 @@ impl EnvOptions { es2016: ES2016Options { exponentiation_operator: true }, es2017: ES2017Options { async_to_generator: true }, es2018: ES2018Options { - // Turned off because it is not ready. - object_rest_spread: if include_unfinished_plugins { - Some(ObjectRestSpreadOptions::default()) - } else { - None - }, + object_rest_spread: Some(ObjectRestSpreadOptions::default()), async_generator_functions: true, }, es2019: ES2019Options { optional_catch_binding: true }, diff --git a/tasks/coverage/snapshots/runtime.snap b/tasks/coverage/snapshots/runtime.snap index 127d0c86e05b60..dc755bc9263159 100644 --- a/tasks/coverage/snapshots/runtime.snap +++ b/tasks/coverage/snapshots/runtime.snap @@ -2,7 +2,7 @@ commit: 06454619 runtime Summary: AST Parsed : 18055/18055 (100.00%) -Positive Passed: 17855/18055 (98.89%) +Positive Passed: 17851/18055 (98.87%) tasks/coverage/test262/test/language/expressions/assignment/fn-name-lhs-cover.js codegen error: Test262Error: descriptor value should be ; object value should be @@ -303,6 +303,9 @@ transform error: Test262Error: (-1n) ** -1n throws RangeError Expected a RangeEr tasks/coverage/test262/test/language/expressions/object/__proto__-permitted-dup-shorthand.js codegen error: Test262Error: Expected SameValue(«[object Object]», «2») to be true +tasks/coverage/test262/test/language/expressions/object/dstr/object-rest-proxy-gopd-not-called-on-excluded-keys.js +transform error: Test262Error: Actual [excludedString, 0, includedString, 1, Symbol(included_symbol)] and expected [Symbol(included_symbol), includedString, 1] should have the same contents. + tasks/coverage/test262/test/language/expressions/object/method-definition/async-gen-yield-star-async-next.js transform error: Test262Error: Expected SameValue(«"get next done (1)"», «"get next value (1)"») to be true @@ -348,6 +351,15 @@ transform error: SyntaxError: Identifier 'a' has already been declared tasks/coverage/test262/test/language/expressions/object/method-definition/async-super-call-param.js transform error: ReferenceError: _superprop_getMethod is not defined +tasks/coverage/test262/test/language/expressions/object/object-spread-proxy-get-not-called-on-dontenum-keys.js +transform error: Test262Error: Actual [dontEnumString, 0, enumerableString, 1, Symbol(dont_enum_symbol), Symbol(enumerable_symbol)] and expected [Symbol(dont_enum_symbol), dontEnumString, 0, Symbol(enumerable_symbol), enumerableString, 1] should have the same contents. + +tasks/coverage/test262/test/language/expressions/object/object-spread-proxy-no-excluded-keys.js +transform error: TypeError: Cannot read properties of undefined (reading 'enumerable') + +tasks/coverage/test262/test/language/expressions/object/object-spread-proxy-ownkeys-returned-keys-order.js +transform error: TypeError: Cannot read properties of undefined (reading 'enumerable') + tasks/coverage/test262/test/language/literals/regexp/u-surrogate-pairs-atom-escape-decimal.js codegen error: Test262Error: Expected SameValue(«true», «false») to be true diff --git a/tasks/coverage/snapshots/semantic_babel.snap b/tasks/coverage/snapshots/semantic_babel.snap index 46f236be07c909..60d45d7b4d8629 100644 --- a/tasks/coverage/snapshots/semantic_babel.snap +++ b/tasks/coverage/snapshots/semantic_babel.snap @@ -299,7 +299,13 @@ after transform: ["a7", "const", "d", "o4"] rebuilt : ["a7", "d", "o4"] tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/cast/destructuring-assignment-in-parens/input.ts -semantic error: Unresolved references mismatch: +semantic error: Reference flags mismatch for "a": +after transform: ReferenceId(14): ReferenceFlags(Write) +rebuilt : ReferenceId(13): ReferenceFlags(Read | Write) +Reference flags mismatch for "x": +after transform: ReferenceId(20): ReferenceFlags(Write) +rebuilt : ReferenceId(24): ReferenceFlags(Read | Write) +Unresolved references mismatch: after transform: ["T", "a", "b", "c", "x", "y"] rebuilt : ["a", "b", "c", "x", "y"] diff --git a/tasks/coverage/snapshots/semantic_test262.snap b/tasks/coverage/snapshots/semantic_test262.snap index 756fc9e92226eb..731dc7166c23ed 100644 --- a/tasks/coverage/snapshots/semantic_test262.snap +++ b/tasks/coverage/snapshots/semantic_test262.snap @@ -2,7 +2,7 @@ commit: 06454619 semantic_test262 Summary: AST Parsed : 43851/43851 (100.00%) -Positive Passed: 43040/43851 (98.15%) +Positive Passed: 42992/43851 (98.04%) tasks/coverage/test262/test/annexB/language/function-code/if-decl-else-decl-a-func-block-scoping.js semantic error: Symbol scope ID mismatch for "f": after transform: SymbolId(3): ScopeId(4294967294) @@ -6170,16 +6170,144 @@ semantic error: Symbol flags mismatch for "fn": after transform: SymbolId(1): SymbolFlags(BlockScopedVariable | Function) rebuilt : SymbolId(3): SymbolFlags(FunctionScopedVariable) +tasks/coverage/test262/test/language/statements/for-await-of/async-func-decl-dstr-obj-rest-descriptors.js +semantic error: Bindings mismatch: +after transform: ScopeId(1): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step"] +rebuilt : ScopeId(3): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step", "_step$value"] +Bindings mismatch: +after transform: ScopeId(2): ["_step$value"] +rebuilt : ScopeId(6): [] +Symbol scope ID mismatch for "_step$value": +after transform: SymbolId(12): ScopeId(2) +rebuilt : SymbolId(14): ScopeId(3) + +tasks/coverage/test262/test/language/statements/for-await-of/async-func-decl-dstr-obj-rest-empty-obj.js +semantic error: Bindings mismatch: +after transform: ScopeId(1): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step"] +rebuilt : ScopeId(3): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step", "_step$value"] +Bindings mismatch: +after transform: ScopeId(2): ["_step$value"] +rebuilt : ScopeId(6): [] +Symbol scope ID mismatch for "_step$value": +after transform: SymbolId(11): ScopeId(2) +rebuilt : SymbolId(13): ScopeId(3) + tasks/coverage/test262/test/language/statements/for-await-of/async-func-decl-dstr-obj-rest-getter.js -semantic error: Scope children mismatch: +semantic error: Bindings mismatch: +after transform: ScopeId(1): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step"] +rebuilt : ScopeId(3): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step", "_step$value"] +Scope children mismatch: after transform: ScopeId(7): [ScopeId(2)] rebuilt : ScopeId(5): [ScopeId(6), ScopeId(7)] Scope parent mismatch: after transform: ScopeId(3): Some(ScopeId(2)) rebuilt : ScopeId(6): Some(ScopeId(5)) +Bindings mismatch: +after transform: ScopeId(2): ["_step$value"] +rebuilt : ScopeId(7): [] Scope children mismatch: after transform: ScopeId(2): [ScopeId(3), ScopeId(4)] rebuilt : ScopeId(7): [ScopeId(8)] +Symbol scope ID mismatch for "_step$value": +after transform: SymbolId(12): ScopeId(2) +rebuilt : SymbolId(14): ScopeId(3) + +tasks/coverage/test262/test/language/statements/for-await-of/async-func-decl-dstr-obj-rest-number.js +semantic error: Bindings mismatch: +after transform: ScopeId(1): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step"] +rebuilt : ScopeId(3): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step", "_step$value"] +Bindings mismatch: +after transform: ScopeId(2): ["_step$value"] +rebuilt : ScopeId(6): [] +Symbol scope ID mismatch for "_step$value": +after transform: SymbolId(11): ScopeId(2) +rebuilt : SymbolId(13): ScopeId(3) + +tasks/coverage/test262/test/language/statements/for-await-of/async-func-decl-dstr-obj-rest-same-name.js +semantic error: Bindings mismatch: +after transform: ScopeId(1): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step"] +rebuilt : ScopeId(3): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step", "_step$value"] +Bindings mismatch: +after transform: ScopeId(2): ["_step$value"] +rebuilt : ScopeId(6): [] +Symbol scope ID mismatch for "_step$value": +after transform: SymbolId(15): ScopeId(2) +rebuilt : SymbolId(16): ScopeId(3) +Reference flags mismatch for "x": +after transform: ReferenceId(0): ReferenceFlags(Write) +rebuilt : ReferenceId(15): ReferenceFlags(Read | Write) + +tasks/coverage/test262/test/language/statements/for-await-of/async-func-decl-dstr-obj-rest-skip-non-enumerable.js +semantic error: Bindings mismatch: +after transform: ScopeId(1): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step"] +rebuilt : ScopeId(3): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step", "_step$value"] +Bindings mismatch: +after transform: ScopeId(2): ["_step$value"] +rebuilt : ScopeId(6): [] +Symbol scope ID mismatch for "_step$value": +after transform: SymbolId(12): ScopeId(2) +rebuilt : SymbolId(14): ScopeId(3) + +tasks/coverage/test262/test/language/statements/for-await-of/async-func-decl-dstr-obj-rest-str-val.js +semantic error: Bindings mismatch: +after transform: ScopeId(1): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step"] +rebuilt : ScopeId(3): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step", "_step$value"] +Bindings mismatch: +after transform: ScopeId(2): ["_step$value"] +rebuilt : ScopeId(6): [] +Symbol scope ID mismatch for "_step$value": +after transform: SymbolId(11): ScopeId(2) +rebuilt : SymbolId(13): ScopeId(3) + +tasks/coverage/test262/test/language/statements/for-await-of/async-func-decl-dstr-obj-rest-symbol-val.js +semantic error: Bindings mismatch: +after transform: ScopeId(1): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step"] +rebuilt : ScopeId(3): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step", "_step$value"] +Bindings mismatch: +after transform: ScopeId(2): ["_step$value"] +rebuilt : ScopeId(6): [] +Symbol scope ID mismatch for "_step$value": +after transform: SymbolId(11): ScopeId(2) +rebuilt : SymbolId(13): ScopeId(3) + +tasks/coverage/test262/test/language/statements/for-await-of/async-func-decl-dstr-obj-rest-to-property-with-setter.js +semantic error: Bindings mismatch: +after transform: ScopeId(3): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step"] +rebuilt : ScopeId(5): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step", "_step$value"] +Bindings mismatch: +after transform: ScopeId(4): ["_step$value"] +rebuilt : ScopeId(8): [] +Symbol scope ID mismatch for "_step$value": +after transform: SymbolId(14): ScopeId(4) +rebuilt : SymbolId(16): ScopeId(5) + +tasks/coverage/test262/test/language/statements/for-await-of/async-func-decl-dstr-obj-rest-to-property.js +semantic error: Bindings mismatch: +after transform: ScopeId(1): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step"] +rebuilt : ScopeId(3): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step", "_step$value"] +Bindings mismatch: +after transform: ScopeId(2): ["_step$value"] +rebuilt : ScopeId(6): [] +Symbol scope ID mismatch for "_step$value": +after transform: SymbolId(11): ScopeId(2) +rebuilt : SymbolId(13): ScopeId(3) + +tasks/coverage/test262/test/language/statements/for-await-of/async-func-decl-dstr-obj-rest-valid-object.js +semantic error: Bindings mismatch: +after transform: ScopeId(1): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step"] +rebuilt : ScopeId(3): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step", "_step$value"] +Bindings mismatch: +after transform: ScopeId(2): ["_step$value"] +rebuilt : ScopeId(6): [] +Symbol scope ID mismatch for "_step$value": +after transform: SymbolId(13): ScopeId(2) +rebuilt : SymbolId(15): ScopeId(3) +Reference flags mismatch for "a": +after transform: ReferenceId(0): ReferenceFlags(Write) +rebuilt : ReferenceId(14): ReferenceFlags(Read | Write) +Reference flags mismatch for "b": +after transform: ReferenceId(1): ReferenceFlags(Write) +rebuilt : ReferenceId(15): ReferenceFlags(Read | Write) tasks/coverage/test262/test/language/statements/for-await-of/async-func-dstr-const-ary-ptrn-elem-id-init-fn-name-class.js semantic error: Bindings mismatch: @@ -7735,41 +7863,50 @@ rebuilt : SymbolId(15): ScopeId(4) tasks/coverage/test262/test/language/statements/for-await-of/async-func-dstr-var-async-obj-ptrn-rest-getter.js semantic error: Bindings mismatch: after transform: ScopeId(3): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step"] -rebuilt : ScopeId(5): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step", "x"] +rebuilt : ScopeId(5): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step", "_step$value", "x"] Bindings mismatch: -after transform: ScopeId(4): ["x"] +after transform: ScopeId(4): ["_step$value", "x"] rebuilt : ScopeId(8): [] +Symbol scope ID mismatch for "_step$value": +after transform: SymbolId(14): ScopeId(4) +rebuilt : SymbolId(16): ScopeId(5) Symbol scope ID mismatch for "x": after transform: SymbolId(4): ScopeId(4) -rebuilt : SymbolId(14): ScopeId(5) +rebuilt : SymbolId(17): ScopeId(5) tasks/coverage/test262/test/language/statements/for-await-of/async-func-dstr-var-async-obj-ptrn-rest-skip-non-enumerable.js semantic error: Bindings mismatch: after transform: ScopeId(2): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step"] -rebuilt : ScopeId(4): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step", "rest"] +rebuilt : ScopeId(4): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step", "_step$value", "rest"] Bindings mismatch: -after transform: ScopeId(3): ["rest"] +after transform: ScopeId(3): ["_step$value", "rest"] rebuilt : ScopeId(7): [] +Symbol scope ID mismatch for "_step$value": +after transform: SymbolId(14): ScopeId(3) +rebuilt : SymbolId(16): ScopeId(4) Symbol scope ID mismatch for "rest": after transform: SymbolId(4): ScopeId(3) -rebuilt : SymbolId(14): ScopeId(4) +rebuilt : SymbolId(17): ScopeId(4) tasks/coverage/test262/test/language/statements/for-await-of/async-func-dstr-var-async-obj-ptrn-rest-val-obj.js semantic error: Bindings mismatch: after transform: ScopeId(2): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step"] -rebuilt : ScopeId(4): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step", "a", "b", "rest"] +rebuilt : ScopeId(4): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step", "_step$value", "a", "b", "rest"] Bindings mismatch: -after transform: ScopeId(3): ["a", "b", "rest"] +after transform: ScopeId(3): ["_step$value", "a", "b", "rest"] rebuilt : ScopeId(7): [] +Symbol scope ID mismatch for "_step$value": +after transform: SymbolId(15): ScopeId(3) +rebuilt : SymbolId(15): ScopeId(4) Symbol scope ID mismatch for "a": after transform: SymbolId(3): ScopeId(3) -rebuilt : SymbolId(13): ScopeId(4) +rebuilt : SymbolId(16): ScopeId(4) Symbol scope ID mismatch for "b": after transform: SymbolId(4): ScopeId(3) -rebuilt : SymbolId(14): ScopeId(4) +rebuilt : SymbolId(17): ScopeId(4) Symbol scope ID mismatch for "rest": after transform: SymbolId(5): ScopeId(3) -rebuilt : SymbolId(15): ScopeId(4) +rebuilt : SymbolId(18): ScopeId(4) tasks/coverage/test262/test/language/statements/for-await-of/async-func-dstr-var-obj-ptrn-id-get-value-err.js semantic error: Bindings mismatch: @@ -8170,7 +8307,7 @@ rebuilt : SymbolId(12): ScopeId(3) tasks/coverage/test262/test/language/statements/for-await-of/async-func-dstr-var-obj-ptrn-rest-getter.js semantic error: Bindings mismatch: after transform: ScopeId(1): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step"] -rebuilt : ScopeId(3): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step", "x"] +rebuilt : ScopeId(3): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step", "_step$value", "x"] Scope children mismatch: after transform: ScopeId(7): [ScopeId(2)] rebuilt : ScopeId(5): [ScopeId(6), ScopeId(7)] @@ -8178,42 +8315,51 @@ Scope parent mismatch: after transform: ScopeId(3): Some(ScopeId(2)) rebuilt : ScopeId(6): Some(ScopeId(5)) Bindings mismatch: -after transform: ScopeId(2): ["x"] +after transform: ScopeId(2): ["_step$value", "x"] rebuilt : ScopeId(7): [] Scope children mismatch: after transform: ScopeId(2): [ScopeId(3), ScopeId(4)] rebuilt : ScopeId(7): [ScopeId(8)] +Symbol scope ID mismatch for "_step$value": +after transform: SymbolId(11): ScopeId(2) +rebuilt : SymbolId(13): ScopeId(3) Symbol scope ID mismatch for "x": after transform: SymbolId(3): ScopeId(2) -rebuilt : SymbolId(11): ScopeId(3) +rebuilt : SymbolId(14): ScopeId(3) tasks/coverage/test262/test/language/statements/for-await-of/async-func-dstr-var-obj-ptrn-rest-skip-non-enumerable.js semantic error: Bindings mismatch: after transform: ScopeId(1): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step"] -rebuilt : ScopeId(3): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step", "rest"] +rebuilt : ScopeId(3): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step", "_step$value", "rest"] Bindings mismatch: -after transform: ScopeId(2): ["rest"] +after transform: ScopeId(2): ["_step$value", "rest"] rebuilt : ScopeId(6): [] +Symbol scope ID mismatch for "_step$value": +after transform: SymbolId(11): ScopeId(2) +rebuilt : SymbolId(13): ScopeId(3) Symbol scope ID mismatch for "rest": after transform: SymbolId(3): ScopeId(2) -rebuilt : SymbolId(11): ScopeId(3) +rebuilt : SymbolId(14): ScopeId(3) tasks/coverage/test262/test/language/statements/for-await-of/async-func-dstr-var-obj-ptrn-rest-val-obj.js semantic error: Bindings mismatch: after transform: ScopeId(1): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step"] -rebuilt : ScopeId(3): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step", "a", "b", "rest"] +rebuilt : ScopeId(3): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step", "_step$value", "a", "b", "rest"] Bindings mismatch: -after transform: ScopeId(2): ["a", "b", "rest"] +after transform: ScopeId(2): ["_step$value", "a", "b", "rest"] rebuilt : ScopeId(6): [] +Symbol scope ID mismatch for "_step$value": +after transform: SymbolId(12): ScopeId(2) +rebuilt : SymbolId(12): ScopeId(3) Symbol scope ID mismatch for "a": after transform: SymbolId(2): ScopeId(2) -rebuilt : SymbolId(10): ScopeId(3) +rebuilt : SymbolId(13): ScopeId(3) Symbol scope ID mismatch for "b": after transform: SymbolId(3): ScopeId(2) -rebuilt : SymbolId(11): ScopeId(3) +rebuilt : SymbolId(14): ScopeId(3) Symbol scope ID mismatch for "rest": after transform: SymbolId(4): ScopeId(2) -rebuilt : SymbolId(12): ScopeId(3) +rebuilt : SymbolId(15): ScopeId(3) tasks/coverage/test262/test/language/statements/for-await-of/async-gen-decl-dstr-array-elem-init-fn-name-class.js semantic error: Bindings mismatch: @@ -8324,16 +8470,144 @@ semantic error: Symbol flags mismatch for "fn": after transform: SymbolId(1): SymbolFlags(BlockScopedVariable | Function) rebuilt : SymbolId(4): SymbolFlags(FunctionScopedVariable) +tasks/coverage/test262/test/language/statements/for-await-of/async-gen-decl-dstr-obj-rest-descriptors.js +semantic error: Bindings mismatch: +after transform: ScopeId(1): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step"] +rebuilt : ScopeId(3): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step", "_step$value"] +Bindings mismatch: +after transform: ScopeId(2): ["_step$value"] +rebuilt : ScopeId(6): [] +Symbol scope ID mismatch for "_step$value": +after transform: SymbolId(13): ScopeId(2) +rebuilt : SymbolId(15): ScopeId(3) + +tasks/coverage/test262/test/language/statements/for-await-of/async-gen-decl-dstr-obj-rest-empty-obj.js +semantic error: Bindings mismatch: +after transform: ScopeId(1): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step"] +rebuilt : ScopeId(3): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step", "_step$value"] +Bindings mismatch: +after transform: ScopeId(2): ["_step$value"] +rebuilt : ScopeId(6): [] +Symbol scope ID mismatch for "_step$value": +after transform: SymbolId(12): ScopeId(2) +rebuilt : SymbolId(14): ScopeId(3) + tasks/coverage/test262/test/language/statements/for-await-of/async-gen-decl-dstr-obj-rest-getter.js -semantic error: Scope children mismatch: +semantic error: Bindings mismatch: +after transform: ScopeId(1): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step"] +rebuilt : ScopeId(3): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step", "_step$value"] +Scope children mismatch: after transform: ScopeId(7): [ScopeId(2)] rebuilt : ScopeId(5): [ScopeId(6), ScopeId(7)] Scope parent mismatch: after transform: ScopeId(3): Some(ScopeId(2)) rebuilt : ScopeId(6): Some(ScopeId(5)) +Bindings mismatch: +after transform: ScopeId(2): ["_step$value"] +rebuilt : ScopeId(7): [] Scope children mismatch: after transform: ScopeId(2): [ScopeId(3), ScopeId(4)] rebuilt : ScopeId(7): [ScopeId(8)] +Symbol scope ID mismatch for "_step$value": +after transform: SymbolId(13): ScopeId(2) +rebuilt : SymbolId(15): ScopeId(3) + +tasks/coverage/test262/test/language/statements/for-await-of/async-gen-decl-dstr-obj-rest-number.js +semantic error: Bindings mismatch: +after transform: ScopeId(1): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step"] +rebuilt : ScopeId(3): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step", "_step$value"] +Bindings mismatch: +after transform: ScopeId(2): ["_step$value"] +rebuilt : ScopeId(6): [] +Symbol scope ID mismatch for "_step$value": +after transform: SymbolId(12): ScopeId(2) +rebuilt : SymbolId(14): ScopeId(3) + +tasks/coverage/test262/test/language/statements/for-await-of/async-gen-decl-dstr-obj-rest-same-name.js +semantic error: Bindings mismatch: +after transform: ScopeId(1): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step"] +rebuilt : ScopeId(3): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step", "_step$value"] +Bindings mismatch: +after transform: ScopeId(2): ["_step$value"] +rebuilt : ScopeId(6): [] +Symbol scope ID mismatch for "_step$value": +after transform: SymbolId(16): ScopeId(2) +rebuilt : SymbolId(17): ScopeId(3) +Reference flags mismatch for "x": +after transform: ReferenceId(0): ReferenceFlags(Write) +rebuilt : ReferenceId(17): ReferenceFlags(Read | Write) + +tasks/coverage/test262/test/language/statements/for-await-of/async-gen-decl-dstr-obj-rest-skip-non-enumerable.js +semantic error: Bindings mismatch: +after transform: ScopeId(1): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step"] +rebuilt : ScopeId(3): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step", "_step$value"] +Bindings mismatch: +after transform: ScopeId(2): ["_step$value"] +rebuilt : ScopeId(6): [] +Symbol scope ID mismatch for "_step$value": +after transform: SymbolId(13): ScopeId(2) +rebuilt : SymbolId(15): ScopeId(3) + +tasks/coverage/test262/test/language/statements/for-await-of/async-gen-decl-dstr-obj-rest-str-val.js +semantic error: Bindings mismatch: +after transform: ScopeId(1): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step"] +rebuilt : ScopeId(3): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step", "_step$value"] +Bindings mismatch: +after transform: ScopeId(2): ["_step$value"] +rebuilt : ScopeId(6): [] +Symbol scope ID mismatch for "_step$value": +after transform: SymbolId(12): ScopeId(2) +rebuilt : SymbolId(14): ScopeId(3) + +tasks/coverage/test262/test/language/statements/for-await-of/async-gen-decl-dstr-obj-rest-symbol-val.js +semantic error: Bindings mismatch: +after transform: ScopeId(1): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step"] +rebuilt : ScopeId(3): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step", "_step$value"] +Bindings mismatch: +after transform: ScopeId(2): ["_step$value"] +rebuilt : ScopeId(6): [] +Symbol scope ID mismatch for "_step$value": +after transform: SymbolId(12): ScopeId(2) +rebuilt : SymbolId(14): ScopeId(3) + +tasks/coverage/test262/test/language/statements/for-await-of/async-gen-decl-dstr-obj-rest-to-property-with-setter.js +semantic error: Bindings mismatch: +after transform: ScopeId(3): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step"] +rebuilt : ScopeId(5): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step", "_step$value"] +Bindings mismatch: +after transform: ScopeId(4): ["_step$value"] +rebuilt : ScopeId(8): [] +Symbol scope ID mismatch for "_step$value": +after transform: SymbolId(15): ScopeId(4) +rebuilt : SymbolId(17): ScopeId(5) + +tasks/coverage/test262/test/language/statements/for-await-of/async-gen-decl-dstr-obj-rest-to-property.js +semantic error: Bindings mismatch: +after transform: ScopeId(1): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step"] +rebuilt : ScopeId(3): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step", "_step$value"] +Bindings mismatch: +after transform: ScopeId(2): ["_step$value"] +rebuilt : ScopeId(6): [] +Symbol scope ID mismatch for "_step$value": +after transform: SymbolId(12): ScopeId(2) +rebuilt : SymbolId(14): ScopeId(3) + +tasks/coverage/test262/test/language/statements/for-await-of/async-gen-decl-dstr-obj-rest-valid-object.js +semantic error: Bindings mismatch: +after transform: ScopeId(1): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step"] +rebuilt : ScopeId(3): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step", "_step$value"] +Bindings mismatch: +after transform: ScopeId(2): ["_step$value"] +rebuilt : ScopeId(6): [] +Symbol scope ID mismatch for "_step$value": +after transform: SymbolId(14): ScopeId(2) +rebuilt : SymbolId(16): ScopeId(3) +Reference flags mismatch for "a": +after transform: ReferenceId(0): ReferenceFlags(Write) +rebuilt : ReferenceId(16): ReferenceFlags(Read | Write) +Reference flags mismatch for "b": +after transform: ReferenceId(1): ReferenceFlags(Write) +rebuilt : ReferenceId(17): ReferenceFlags(Read | Write) tasks/coverage/test262/test/language/statements/for-await-of/async-gen-dstr-const-ary-ptrn-elem-id-init-fn-name-class.js semantic error: Bindings mismatch: @@ -9889,41 +10163,50 @@ rebuilt : SymbolId(15): ScopeId(4) tasks/coverage/test262/test/language/statements/for-await-of/async-gen-dstr-var-async-obj-ptrn-rest-getter.js semantic error: Bindings mismatch: after transform: ScopeId(3): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step"] -rebuilt : ScopeId(5): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step", "x"] +rebuilt : ScopeId(5): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step", "_step$value", "x"] Bindings mismatch: -after transform: ScopeId(4): ["x"] +after transform: ScopeId(4): ["_step$value", "x"] rebuilt : ScopeId(8): [] +Symbol scope ID mismatch for "_step$value": +after transform: SymbolId(15): ScopeId(4) +rebuilt : SymbolId(16): ScopeId(5) Symbol scope ID mismatch for "x": after transform: SymbolId(4): ScopeId(4) -rebuilt : SymbolId(14): ScopeId(5) +rebuilt : SymbolId(17): ScopeId(5) tasks/coverage/test262/test/language/statements/for-await-of/async-gen-dstr-var-async-obj-ptrn-rest-skip-non-enumerable.js semantic error: Bindings mismatch: after transform: ScopeId(2): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step"] -rebuilt : ScopeId(4): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step", "rest"] +rebuilt : ScopeId(4): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step", "_step$value", "rest"] Bindings mismatch: -after transform: ScopeId(3): ["rest"] +after transform: ScopeId(3): ["_step$value", "rest"] rebuilt : ScopeId(7): [] +Symbol scope ID mismatch for "_step$value": +after transform: SymbolId(15): ScopeId(3) +rebuilt : SymbolId(16): ScopeId(4) Symbol scope ID mismatch for "rest": after transform: SymbolId(4): ScopeId(3) -rebuilt : SymbolId(14): ScopeId(4) +rebuilt : SymbolId(17): ScopeId(4) tasks/coverage/test262/test/language/statements/for-await-of/async-gen-dstr-var-async-obj-ptrn-rest-val-obj.js semantic error: Bindings mismatch: after transform: ScopeId(2): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step"] -rebuilt : ScopeId(4): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step", "a", "b", "rest"] +rebuilt : ScopeId(4): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step", "_step$value", "a", "b", "rest"] Bindings mismatch: -after transform: ScopeId(3): ["a", "b", "rest"] +after transform: ScopeId(3): ["_step$value", "a", "b", "rest"] rebuilt : ScopeId(7): [] +Symbol scope ID mismatch for "_step$value": +after transform: SymbolId(16): ScopeId(3) +rebuilt : SymbolId(15): ScopeId(4) Symbol scope ID mismatch for "a": after transform: SymbolId(3): ScopeId(3) -rebuilt : SymbolId(13): ScopeId(4) +rebuilt : SymbolId(16): ScopeId(4) Symbol scope ID mismatch for "b": after transform: SymbolId(4): ScopeId(3) -rebuilt : SymbolId(14): ScopeId(4) +rebuilt : SymbolId(17): ScopeId(4) Symbol scope ID mismatch for "rest": after transform: SymbolId(5): ScopeId(3) -rebuilt : SymbolId(15): ScopeId(4) +rebuilt : SymbolId(18): ScopeId(4) tasks/coverage/test262/test/language/statements/for-await-of/async-gen-dstr-var-obj-ptrn-id-get-value-err.js semantic error: Bindings mismatch: @@ -10324,7 +10607,7 @@ rebuilt : SymbolId(13): ScopeId(3) tasks/coverage/test262/test/language/statements/for-await-of/async-gen-dstr-var-obj-ptrn-rest-getter.js semantic error: Bindings mismatch: after transform: ScopeId(1): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step"] -rebuilt : ScopeId(3): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step", "x"] +rebuilt : ScopeId(3): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step", "_step$value", "x"] Scope children mismatch: after transform: ScopeId(7): [ScopeId(2)] rebuilt : ScopeId(5): [ScopeId(6), ScopeId(7)] @@ -10332,42 +10615,51 @@ Scope parent mismatch: after transform: ScopeId(3): Some(ScopeId(2)) rebuilt : ScopeId(6): Some(ScopeId(5)) Bindings mismatch: -after transform: ScopeId(2): ["x"] +after transform: ScopeId(2): ["_step$value", "x"] rebuilt : ScopeId(7): [] Scope children mismatch: after transform: ScopeId(2): [ScopeId(3), ScopeId(4)] rebuilt : ScopeId(7): [ScopeId(8)] +Symbol scope ID mismatch for "_step$value": +after transform: SymbolId(12): ScopeId(2) +rebuilt : SymbolId(14): ScopeId(3) Symbol scope ID mismatch for "x": after transform: SymbolId(3): ScopeId(2) -rebuilt : SymbolId(12): ScopeId(3) +rebuilt : SymbolId(15): ScopeId(3) tasks/coverage/test262/test/language/statements/for-await-of/async-gen-dstr-var-obj-ptrn-rest-skip-non-enumerable.js semantic error: Bindings mismatch: after transform: ScopeId(1): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step"] -rebuilt : ScopeId(3): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step", "rest"] +rebuilt : ScopeId(3): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step", "_step$value", "rest"] Bindings mismatch: -after transform: ScopeId(2): ["rest"] +after transform: ScopeId(2): ["_step$value", "rest"] rebuilt : ScopeId(6): [] +Symbol scope ID mismatch for "_step$value": +after transform: SymbolId(12): ScopeId(2) +rebuilt : SymbolId(14): ScopeId(3) Symbol scope ID mismatch for "rest": after transform: SymbolId(3): ScopeId(2) -rebuilt : SymbolId(12): ScopeId(3) +rebuilt : SymbolId(15): ScopeId(3) tasks/coverage/test262/test/language/statements/for-await-of/async-gen-dstr-var-obj-ptrn-rest-val-obj.js semantic error: Bindings mismatch: after transform: ScopeId(1): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step"] -rebuilt : ScopeId(3): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step", "a", "b", "rest"] +rebuilt : ScopeId(3): ["_didIteratorError", "_iterator", "_iteratorAbruptCompletion", "_iteratorError", "_step", "_step$value", "a", "b", "rest"] Bindings mismatch: -after transform: ScopeId(2): ["a", "b", "rest"] +after transform: ScopeId(2): ["_step$value", "a", "b", "rest"] rebuilt : ScopeId(6): [] +Symbol scope ID mismatch for "_step$value": +after transform: SymbolId(13): ScopeId(2) +rebuilt : SymbolId(13): ScopeId(3) Symbol scope ID mismatch for "a": after transform: SymbolId(2): ScopeId(2) -rebuilt : SymbolId(11): ScopeId(3) +rebuilt : SymbolId(14): ScopeId(3) Symbol scope ID mismatch for "b": after transform: SymbolId(3): ScopeId(2) -rebuilt : SymbolId(12): ScopeId(3) +rebuilt : SymbolId(15): ScopeId(3) Symbol scope ID mismatch for "rest": after transform: SymbolId(4): ScopeId(2) -rebuilt : SymbolId(13): ScopeId(3) +rebuilt : SymbolId(16): ScopeId(3) tasks/coverage/test262/test/language/statements/for-await-of/iterator-close-non-throw-get-method-is-null.js semantic error: Bindings mismatch: @@ -10441,6 +10733,509 @@ Symbol scope ID mismatch for "x": after transform: SymbolId(4): ScopeId(2) rebuilt : SymbolId(12): ScopeId(3) +tasks/coverage/test262/test/language/statements/for-of/dstr/obj-rest-computed-property-no-strict.js +semantic error: Bindings mismatch: +after transform: ScopeId(0): ["_objectWithoutProperties", "_toPropertyKey", "a", "counter"] +rebuilt : ScopeId(0): ["_objectWithoutProperties", "_ref", "_ref2", "_toPropertyKey", "a", "counter"] +Bindings mismatch: +after transform: ScopeId(1): ["_ref"] +rebuilt : ScopeId(1): [] +Bindings mismatch: +after transform: ScopeId(2): ["_ref2"] +rebuilt : ScopeId(2): [] +Symbol scope ID mismatch for "_ref": +after transform: SymbolId(2): ScopeId(1) +rebuilt : SymbolId(4): ScopeId(0) +Symbol scope ID mismatch for "_ref2": +after transform: SymbolId(3): ScopeId(2) +rebuilt : SymbolId(5): ScopeId(0) +Reference flags mismatch for "a": +after transform: ReferenceId(0): ReferenceFlags(Write) +rebuilt : ReferenceId(4): ReferenceFlags(Read | Write) + +tasks/coverage/test262/test/language/statements/for-of/dstr/obj-rest-computed-property.js +semantic error: Bindings mismatch: +after transform: ScopeId(0): ["_objectWithoutProperties", "_toPropertyKey", "a", "b", "counter", "rest"] +rebuilt : ScopeId(0): ["_objectWithoutProperties", "_ref", "_ref2", "_toPropertyKey", "a", "b", "counter", "rest"] +Bindings mismatch: +after transform: ScopeId(1): ["_ref"] +rebuilt : ScopeId(1): [] +Bindings mismatch: +after transform: ScopeId(2): ["_ref2"] +rebuilt : ScopeId(2): [] +Symbol scope ID mismatch for "_ref": +after transform: SymbolId(4): ScopeId(1) +rebuilt : SymbolId(6): ScopeId(0) +Symbol scope ID mismatch for "_ref2": +after transform: SymbolId(5): ScopeId(2) +rebuilt : SymbolId(7): ScopeId(0) +Reference flags mismatch for "a": +after transform: ReferenceId(0): ReferenceFlags(Write) +rebuilt : ReferenceId(4): ReferenceFlags(Read | Write) + +tasks/coverage/test262/test/language/statements/for-of/dstr/obj-rest-descriptors.js +semantic error: Bindings mismatch: +after transform: ScopeId(0): ["_extends", "_objectDestructuringEmpty", "counter", "obj", "rest"] +rebuilt : ScopeId(0): ["_extends", "_objectDestructuringEmpty", "_ref", "_ref2", "counter", "obj", "rest"] +Bindings mismatch: +after transform: ScopeId(1): ["_ref"] +rebuilt : ScopeId(1): [] +Bindings mismatch: +after transform: ScopeId(2): ["_ref2"] +rebuilt : ScopeId(2): [] +Symbol scope ID mismatch for "_ref": +after transform: SymbolId(3): ScopeId(1) +rebuilt : SymbolId(5): ScopeId(0) +Symbol scope ID mismatch for "_ref2": +after transform: SymbolId(4): ScopeId(2) +rebuilt : SymbolId(6): ScopeId(0) + +tasks/coverage/test262/test/language/statements/for-of/dstr/obj-rest-empty-obj.js +semantic error: Bindings mismatch: +after transform: ScopeId(0): ["_extends", "_objectDestructuringEmpty", "counter", "rest"] +rebuilt : ScopeId(0): ["_extends", "_objectDestructuringEmpty", "_ref", "_ref2", "counter", "rest"] +Bindings mismatch: +after transform: ScopeId(1): ["_ref"] +rebuilt : ScopeId(1): [] +Bindings mismatch: +after transform: ScopeId(2): ["_ref2"] +rebuilt : ScopeId(2): [] +Symbol scope ID mismatch for "_ref": +after transform: SymbolId(2): ScopeId(1) +rebuilt : SymbolId(4): ScopeId(0) +Symbol scope ID mismatch for "_ref2": +after transform: SymbolId(3): ScopeId(2) +rebuilt : SymbolId(5): ScopeId(0) + +tasks/coverage/test262/test/language/statements/for-of/dstr/obj-rest-getter-abrupt-get-error.js +semantic error: Bindings mismatch: +after transform: ScopeId(1): [] +rebuilt : ScopeId(1): ["_ref", "_ref2"] +Bindings mismatch: +after transform: ScopeId(2): ["_ref"] +rebuilt : ScopeId(2): [] +Bindings mismatch: +after transform: ScopeId(4): ["_ref2"] +rebuilt : ScopeId(4): [] +Symbol scope ID mismatch for "_ref": +after transform: SymbolId(3): ScopeId(2) +rebuilt : SymbolId(5): ScopeId(1) +Symbol scope ID mismatch for "_ref2": +after transform: SymbolId(4): ScopeId(4) +rebuilt : SymbolId(6): ScopeId(1) + +tasks/coverage/test262/test/language/statements/for-of/dstr/obj-rest-getter.js +semantic error: Bindings mismatch: +after transform: ScopeId(0): ["_extends", "_objectDestructuringEmpty", "count", "counter", "x"] +rebuilt : ScopeId(0): ["_extends", "_objectDestructuringEmpty", "_ref", "_ref2", "count", "counter", "x"] +Bindings mismatch: +after transform: ScopeId(1): ["_ref"] +rebuilt : ScopeId(1): [] +Bindings mismatch: +after transform: ScopeId(3): ["_ref2"] +rebuilt : ScopeId(3): [] +Symbol scope ID mismatch for "_ref": +after transform: SymbolId(3): ScopeId(1) +rebuilt : SymbolId(5): ScopeId(0) +Symbol scope ID mismatch for "_ref2": +after transform: SymbolId(4): ScopeId(3) +rebuilt : SymbolId(6): ScopeId(0) + +tasks/coverage/test262/test/language/statements/for-of/dstr/obj-rest-non-string-computed-property-1.js +semantic error: Bindings mismatch: +after transform: ScopeId(0): ["_objectWithoutProperties", "_toPropertyKey", "a", "b", "counter", "rest"] +rebuilt : ScopeId(0): ["_objectWithoutProperties", "_ref", "_ref2", "_toPropertyKey", "a", "b", "counter", "rest"] +Bindings mismatch: +after transform: ScopeId(1): ["_ref"] +rebuilt : ScopeId(1): [] +Bindings mismatch: +after transform: ScopeId(2): ["_ref2"] +rebuilt : ScopeId(2): [] +Symbol scope ID mismatch for "_ref": +after transform: SymbolId(4): ScopeId(1) +rebuilt : SymbolId(6): ScopeId(0) +Symbol scope ID mismatch for "_ref2": +after transform: SymbolId(5): ScopeId(2) +rebuilt : SymbolId(7): ScopeId(0) +Reference flags mismatch for "a": +after transform: ReferenceId(0): ReferenceFlags(Write) +rebuilt : ReferenceId(5): ReferenceFlags(Read | Write) + +tasks/coverage/test262/test/language/statements/for-of/dstr/obj-rest-non-string-computed-property-1dot.js +semantic error: Bindings mismatch: +after transform: ScopeId(0): ["_objectWithoutProperties", "_toPropertyKey", "a", "b", "counter", "rest"] +rebuilt : ScopeId(0): ["_objectWithoutProperties", "_ref", "_ref2", "_toPropertyKey", "a", "b", "counter", "rest"] +Bindings mismatch: +after transform: ScopeId(1): ["_ref"] +rebuilt : ScopeId(1): [] +Bindings mismatch: +after transform: ScopeId(2): ["_ref2"] +rebuilt : ScopeId(2): [] +Symbol scope ID mismatch for "_ref": +after transform: SymbolId(4): ScopeId(1) +rebuilt : SymbolId(6): ScopeId(0) +Symbol scope ID mismatch for "_ref2": +after transform: SymbolId(5): ScopeId(2) +rebuilt : SymbolId(7): ScopeId(0) +Reference flags mismatch for "a": +after transform: ReferenceId(0): ReferenceFlags(Write) +rebuilt : ReferenceId(5): ReferenceFlags(Read | Write) + +tasks/coverage/test262/test/language/statements/for-of/dstr/obj-rest-non-string-computed-property-1dot0.js +semantic error: Bindings mismatch: +after transform: ScopeId(0): ["_objectWithoutProperties", "_toPropertyKey", "a", "b", "counter", "rest"] +rebuilt : ScopeId(0): ["_objectWithoutProperties", "_ref", "_ref2", "_toPropertyKey", "a", "b", "counter", "rest"] +Bindings mismatch: +after transform: ScopeId(1): ["_ref"] +rebuilt : ScopeId(1): [] +Bindings mismatch: +after transform: ScopeId(2): ["_ref2"] +rebuilt : ScopeId(2): [] +Symbol scope ID mismatch for "_ref": +after transform: SymbolId(4): ScopeId(1) +rebuilt : SymbolId(6): ScopeId(0) +Symbol scope ID mismatch for "_ref2": +after transform: SymbolId(5): ScopeId(2) +rebuilt : SymbolId(7): ScopeId(0) +Reference flags mismatch for "a": +after transform: ReferenceId(0): ReferenceFlags(Write) +rebuilt : ReferenceId(5): ReferenceFlags(Read | Write) + +tasks/coverage/test262/test/language/statements/for-of/dstr/obj-rest-non-string-computed-property-1e0.js +semantic error: Bindings mismatch: +after transform: ScopeId(0): ["_objectWithoutProperties", "_toPropertyKey", "a", "b", "counter", "rest"] +rebuilt : ScopeId(0): ["_objectWithoutProperties", "_ref", "_ref2", "_toPropertyKey", "a", "b", "counter", "rest"] +Bindings mismatch: +after transform: ScopeId(1): ["_ref"] +rebuilt : ScopeId(1): [] +Bindings mismatch: +after transform: ScopeId(2): ["_ref2"] +rebuilt : ScopeId(2): [] +Symbol scope ID mismatch for "_ref": +after transform: SymbolId(4): ScopeId(1) +rebuilt : SymbolId(6): ScopeId(0) +Symbol scope ID mismatch for "_ref2": +after transform: SymbolId(5): ScopeId(2) +rebuilt : SymbolId(7): ScopeId(0) +Reference flags mismatch for "a": +after transform: ReferenceId(0): ReferenceFlags(Write) +rebuilt : ReferenceId(5): ReferenceFlags(Read | Write) + +tasks/coverage/test262/test/language/statements/for-of/dstr/obj-rest-non-string-computed-property-array-1.js +semantic error: Bindings mismatch: +after transform: ScopeId(0): ["_objectWithoutProperties", "_toPropertyKey", "a", "b", "counter", "rest"] +rebuilt : ScopeId(0): ["_objectWithoutProperties", "_ref", "_ref2", "_toPropertyKey", "a", "b", "counter", "rest"] +Bindings mismatch: +after transform: ScopeId(1): ["_ref"] +rebuilt : ScopeId(1): [] +Bindings mismatch: +after transform: ScopeId(2): ["_ref2"] +rebuilt : ScopeId(2): [] +Symbol scope ID mismatch for "_ref": +after transform: SymbolId(4): ScopeId(1) +rebuilt : SymbolId(6): ScopeId(0) +Symbol scope ID mismatch for "_ref2": +after transform: SymbolId(5): ScopeId(2) +rebuilt : SymbolId(7): ScopeId(0) +Reference flags mismatch for "a": +after transform: ReferenceId(0): ReferenceFlags(Write) +rebuilt : ReferenceId(5): ReferenceFlags(Read | Write) + +tasks/coverage/test262/test/language/statements/for-of/dstr/obj-rest-non-string-computed-property-array-1e0.js +semantic error: Bindings mismatch: +after transform: ScopeId(0): ["_objectWithoutProperties", "_toPropertyKey", "a", "b", "counter", "rest"] +rebuilt : ScopeId(0): ["_objectWithoutProperties", "_ref", "_ref2", "_toPropertyKey", "a", "b", "counter", "rest"] +Bindings mismatch: +after transform: ScopeId(1): ["_ref"] +rebuilt : ScopeId(1): [] +Bindings mismatch: +after transform: ScopeId(2): ["_ref2"] +rebuilt : ScopeId(2): [] +Symbol scope ID mismatch for "_ref": +after transform: SymbolId(4): ScopeId(1) +rebuilt : SymbolId(6): ScopeId(0) +Symbol scope ID mismatch for "_ref2": +after transform: SymbolId(5): ScopeId(2) +rebuilt : SymbolId(7): ScopeId(0) +Reference flags mismatch for "a": +after transform: ReferenceId(0): ReferenceFlags(Write) +rebuilt : ReferenceId(5): ReferenceFlags(Read | Write) + +tasks/coverage/test262/test/language/statements/for-of/dstr/obj-rest-non-string-computed-property-string-1.js +semantic error: Bindings mismatch: +after transform: ScopeId(0): ["_objectWithoutProperties", "_toPropertyKey", "a", "b", "counter", "rest"] +rebuilt : ScopeId(0): ["_objectWithoutProperties", "_ref", "_ref2", "_toPropertyKey", "a", "b", "counter", "rest"] +Bindings mismatch: +after transform: ScopeId(1): ["_ref"] +rebuilt : ScopeId(1): [] +Bindings mismatch: +after transform: ScopeId(2): ["_ref2"] +rebuilt : ScopeId(2): [] +Symbol scope ID mismatch for "_ref": +after transform: SymbolId(4): ScopeId(1) +rebuilt : SymbolId(6): ScopeId(0) +Symbol scope ID mismatch for "_ref2": +after transform: SymbolId(5): ScopeId(2) +rebuilt : SymbolId(7): ScopeId(0) +Reference flags mismatch for "a": +after transform: ReferenceId(0): ReferenceFlags(Write) +rebuilt : ReferenceId(5): ReferenceFlags(Read | Write) + +tasks/coverage/test262/test/language/statements/for-of/dstr/obj-rest-number.js +semantic error: Bindings mismatch: +after transform: ScopeId(0): ["_extends", "_objectDestructuringEmpty", "counter", "rest"] +rebuilt : ScopeId(0): ["_extends", "_objectDestructuringEmpty", "_ref", "_ref2", "counter", "rest"] +Bindings mismatch: +after transform: ScopeId(1): ["_ref"] +rebuilt : ScopeId(1): [] +Bindings mismatch: +after transform: ScopeId(2): ["_ref2"] +rebuilt : ScopeId(2): [] +Symbol scope ID mismatch for "_ref": +after transform: SymbolId(2): ScopeId(1) +rebuilt : SymbolId(4): ScopeId(0) +Symbol scope ID mismatch for "_ref2": +after transform: SymbolId(3): ScopeId(2) +rebuilt : SymbolId(5): ScopeId(0) + +tasks/coverage/test262/test/language/statements/for-of/dstr/obj-rest-order.js +semantic error: Bindings mismatch: +after transform: ScopeId(0): ["_extends", "_objectDestructuringEmpty", "calls", "counter", "o", "rest"] +rebuilt : ScopeId(0): ["_extends", "_objectDestructuringEmpty", "_ref", "_ref2", "calls", "counter", "o", "rest"] +Bindings mismatch: +after transform: ScopeId(5): ["_ref"] +rebuilt : ScopeId(5): [] +Bindings mismatch: +after transform: ScopeId(6): ["_ref2"] +rebuilt : ScopeId(6): [] +Symbol scope ID mismatch for "_ref": +after transform: SymbolId(4): ScopeId(5) +rebuilt : SymbolId(6): ScopeId(0) +Symbol scope ID mismatch for "_ref2": +after transform: SymbolId(5): ScopeId(6) +rebuilt : SymbolId(7): ScopeId(0) + +tasks/coverage/test262/test/language/statements/for-of/dstr/obj-rest-put-const.js +semantic error: Bindings mismatch: +after transform: ScopeId(1): [] +rebuilt : ScopeId(1): ["_ref", "_ref2"] +Bindings mismatch: +after transform: ScopeId(2): ["_ref"] +rebuilt : ScopeId(2): [] +Bindings mismatch: +after transform: ScopeId(3): ["_ref2"] +rebuilt : ScopeId(3): [] +Symbol scope ID mismatch for "_ref": +after transform: SymbolId(2): ScopeId(2) +rebuilt : SymbolId(4): ScopeId(1) +Symbol scope ID mismatch for "_ref2": +after transform: SymbolId(3): ScopeId(3) +rebuilt : SymbolId(5): ScopeId(1) + +tasks/coverage/test262/test/language/statements/for-of/dstr/obj-rest-same-name.js +semantic error: Bindings mismatch: +after transform: ScopeId(0): ["_excluded", "_objectWithoutProperties", "counter", "keys", "o", "x", "y", "z"] +rebuilt : ScopeId(0): ["_excluded", "_objectWithoutProperties", "_ref", "_ref2", "counter", "keys", "o", "x", "y", "z"] +Bindings mismatch: +after transform: ScopeId(1): ["_ref"] +rebuilt : ScopeId(1): [] +Bindings mismatch: +after transform: ScopeId(2): ["_ref2"] +rebuilt : ScopeId(2): [] +Symbol scope ID mismatch for "_ref": +after transform: SymbolId(6): ScopeId(1) +rebuilt : SymbolId(7): ScopeId(0) +Symbol scope ID mismatch for "_ref2": +after transform: SymbolId(7): ScopeId(2) +rebuilt : SymbolId(8): ScopeId(0) +Reference flags mismatch for "x": +after transform: ReferenceId(0): ReferenceFlags(Write) +rebuilt : ReferenceId(4): ReferenceFlags(Read | Write) + +tasks/coverage/test262/test/language/statements/for-of/dstr/obj-rest-skip-non-enumerable.js +semantic error: Bindings mismatch: +after transform: ScopeId(0): ["_extends", "_objectDestructuringEmpty", "counter", "obj", "rest"] +rebuilt : ScopeId(0): ["_extends", "_objectDestructuringEmpty", "_ref", "_ref2", "counter", "obj", "rest"] +Bindings mismatch: +after transform: ScopeId(1): ["_ref"] +rebuilt : ScopeId(1): [] +Bindings mismatch: +after transform: ScopeId(2): ["_ref2"] +rebuilt : ScopeId(2): [] +Symbol scope ID mismatch for "_ref": +after transform: SymbolId(3): ScopeId(1) +rebuilt : SymbolId(5): ScopeId(0) +Symbol scope ID mismatch for "_ref2": +after transform: SymbolId(4): ScopeId(2) +rebuilt : SymbolId(6): ScopeId(0) + +tasks/coverage/test262/test/language/statements/for-of/dstr/obj-rest-str-val.js +semantic error: Bindings mismatch: +after transform: ScopeId(0): ["_extends", "_objectDestructuringEmpty", "counter", "rest"] +rebuilt : ScopeId(0): ["_extends", "_objectDestructuringEmpty", "_ref", "_ref2", "counter", "rest"] +Bindings mismatch: +after transform: ScopeId(1): ["_ref"] +rebuilt : ScopeId(1): [] +Bindings mismatch: +after transform: ScopeId(2): ["_ref2"] +rebuilt : ScopeId(2): [] +Symbol scope ID mismatch for "_ref": +after transform: SymbolId(2): ScopeId(1) +rebuilt : SymbolId(4): ScopeId(0) +Symbol scope ID mismatch for "_ref2": +after transform: SymbolId(3): ScopeId(2) +rebuilt : SymbolId(5): ScopeId(0) + +tasks/coverage/test262/test/language/statements/for-of/dstr/obj-rest-symbol-val.js +semantic error: Bindings mismatch: +after transform: ScopeId(0): ["_extends", "_objectDestructuringEmpty", "counter", "rest"] +rebuilt : ScopeId(0): ["_extends", "_objectDestructuringEmpty", "_ref", "_ref2", "counter", "rest"] +Bindings mismatch: +after transform: ScopeId(1): ["_ref"] +rebuilt : ScopeId(1): [] +Bindings mismatch: +after transform: ScopeId(2): ["_ref2"] +rebuilt : ScopeId(2): [] +Symbol scope ID mismatch for "_ref": +after transform: SymbolId(2): ScopeId(1) +rebuilt : SymbolId(4): ScopeId(0) +Symbol scope ID mismatch for "_ref2": +after transform: SymbolId(3): ScopeId(2) +rebuilt : SymbolId(5): ScopeId(0) + +tasks/coverage/test262/test/language/statements/for-of/dstr/obj-rest-to-property-with-setter.js +semantic error: Bindings mismatch: +after transform: ScopeId(0): ["_extends", "_objectDestructuringEmpty", "counter", "executedGetter", "settedValue", "src"] +rebuilt : ScopeId(0): ["_extends", "_objectDestructuringEmpty", "_ref", "_ref2", "counter", "executedGetter", "settedValue", "src"] +Bindings mismatch: +after transform: ScopeId(3): ["_ref"] +rebuilt : ScopeId(3): [] +Bindings mismatch: +after transform: ScopeId(4): ["_ref2"] +rebuilt : ScopeId(4): [] +Symbol scope ID mismatch for "_ref": +after transform: SymbolId(5): ScopeId(3) +rebuilt : SymbolId(7): ScopeId(0) +Symbol scope ID mismatch for "_ref2": +after transform: SymbolId(6): ScopeId(4) +rebuilt : SymbolId(8): ScopeId(0) + +tasks/coverage/test262/test/language/statements/for-of/dstr/obj-rest-to-property.js +semantic error: Bindings mismatch: +after transform: ScopeId(0): ["_extends", "_objectDestructuringEmpty", "counter", "src"] +rebuilt : ScopeId(0): ["_extends", "_objectDestructuringEmpty", "_ref", "_ref2", "counter", "src"] +Bindings mismatch: +after transform: ScopeId(1): ["_ref"] +rebuilt : ScopeId(1): [] +Bindings mismatch: +after transform: ScopeId(2): ["_ref2"] +rebuilt : ScopeId(2): [] +Symbol scope ID mismatch for "_ref": +after transform: SymbolId(2): ScopeId(1) +rebuilt : SymbolId(4): ScopeId(0) +Symbol scope ID mismatch for "_ref2": +after transform: SymbolId(3): ScopeId(2) +rebuilt : SymbolId(5): ScopeId(0) + +tasks/coverage/test262/test/language/statements/for-of/dstr/obj-rest-val-null.js +semantic error: Bindings mismatch: +after transform: ScopeId(1): [] +rebuilt : ScopeId(1): ["_ref", "_ref2"] +Bindings mismatch: +after transform: ScopeId(2): ["_ref"] +rebuilt : ScopeId(2): [] +Bindings mismatch: +after transform: ScopeId(3): ["_ref2"] +rebuilt : ScopeId(3): [] +Symbol scope ID mismatch for "_ref": +after transform: SymbolId(2): ScopeId(2) +rebuilt : SymbolId(4): ScopeId(1) +Symbol scope ID mismatch for "_ref2": +after transform: SymbolId(3): ScopeId(3) +rebuilt : SymbolId(5): ScopeId(1) + +tasks/coverage/test262/test/language/statements/for-of/dstr/obj-rest-val-undefined.js +semantic error: Bindings mismatch: +after transform: ScopeId(1): [] +rebuilt : ScopeId(1): ["_ref", "_ref2"] +Bindings mismatch: +after transform: ScopeId(2): ["_ref"] +rebuilt : ScopeId(2): [] +Bindings mismatch: +after transform: ScopeId(3): ["_ref2"] +rebuilt : ScopeId(3): [] +Symbol scope ID mismatch for "_ref": +after transform: SymbolId(2): ScopeId(2) +rebuilt : SymbolId(4): ScopeId(1) +Symbol scope ID mismatch for "_ref2": +after transform: SymbolId(3): ScopeId(3) +rebuilt : SymbolId(5): ScopeId(1) + +tasks/coverage/test262/test/language/statements/for-of/dstr/obj-rest-valid-object.js +semantic error: Bindings mismatch: +after transform: ScopeId(0): ["_excluded", "_objectWithoutProperties", "a", "b", "counter", "rest"] +rebuilt : ScopeId(0): ["_excluded", "_objectWithoutProperties", "_ref", "_ref2", "a", "b", "counter", "rest"] +Bindings mismatch: +after transform: ScopeId(1): ["_ref"] +rebuilt : ScopeId(1): [] +Bindings mismatch: +after transform: ScopeId(2): ["_ref2"] +rebuilt : ScopeId(2): [] +Symbol scope ID mismatch for "_ref": +after transform: SymbolId(4): ScopeId(1) +rebuilt : SymbolId(6): ScopeId(0) +Symbol scope ID mismatch for "_ref2": +after transform: SymbolId(5): ScopeId(2) +rebuilt : SymbolId(7): ScopeId(0) +Reference flags mismatch for "a": +after transform: ReferenceId(0): ReferenceFlags(Write) +rebuilt : ReferenceId(3): ReferenceFlags(Read | Write) +Reference flags mismatch for "b": +after transform: ReferenceId(1): ReferenceFlags(Write) +rebuilt : ReferenceId(4): ReferenceFlags(Read | Write) + +tasks/coverage/test262/test/language/statements/for-of/dstr/var-obj-ptrn-rest-getter.js +semantic error: Bindings mismatch: +after transform: ScopeId(0): ["_extends", "_objectDestructuringEmpty", "count", "iterCount", "x"] +rebuilt : ScopeId(0): ["_extends", "_objectDestructuringEmpty", "_ref", "count", "iterCount"] +Bindings mismatch: +after transform: ScopeId(1): ["_ref"] +rebuilt : ScopeId(1): [] +Bindings mismatch: +after transform: ScopeId(3): [] +rebuilt : ScopeId(3): ["x"] +Symbol scope ID mismatch for "_ref": +after transform: SymbolId(3): ScopeId(1) +rebuilt : SymbolId(4): ScopeId(0) + +tasks/coverage/test262/test/language/statements/for-of/dstr/var-obj-ptrn-rest-skip-non-enumerable.js +semantic error: Bindings mismatch: +after transform: ScopeId(0): ["_extends", "_objectDestructuringEmpty", "iterCount", "o", "rest"] +rebuilt : ScopeId(0): ["_extends", "_objectDestructuringEmpty", "_ref", "iterCount", "o"] +Bindings mismatch: +after transform: ScopeId(1): ["_ref"] +rebuilt : ScopeId(1): [] +Bindings mismatch: +after transform: ScopeId(2): [] +rebuilt : ScopeId(2): ["rest"] +Symbol scope ID mismatch for "_ref": +after transform: SymbolId(3): ScopeId(1) +rebuilt : SymbolId(4): ScopeId(0) + +tasks/coverage/test262/test/language/statements/for-of/dstr/var-obj-ptrn-rest-val-obj.js +semantic error: Bindings mismatch: +after transform: ScopeId(0): ["_excluded", "_objectWithoutProperties", "a", "b", "iterCount", "rest"] +rebuilt : ScopeId(0): ["_excluded", "_objectWithoutProperties", "_ref", "iterCount"] +Bindings mismatch: +after transform: ScopeId(1): ["_ref"] +rebuilt : ScopeId(1): [] +Bindings mismatch: +after transform: ScopeId(2): [] +rebuilt : ScopeId(2): ["a", "b", "rest"] +Symbol scope ID mismatch for "_ref": +after transform: SymbolId(4): ScopeId(1) +rebuilt : SymbolId(3): ScopeId(0) + tasks/coverage/test262/test/language/statements/switch/scope-lex-async-function.js semantic error: Symbol flags mismatch for "x": after transform: SymbolId(0): SymbolFlags(BlockScopedVariable | Function) diff --git a/tasks/coverage/snapshots/semantic_typescript.snap b/tasks/coverage/snapshots/semantic_typescript.snap index 424fec9b495307..f70a81d722bf76 100644 --- a/tasks/coverage/snapshots/semantic_typescript.snap +++ b/tasks/coverage/snapshots/semantic_typescript.snap @@ -2,7 +2,7 @@ commit: df9d1650 semantic_typescript Summary: AST Parsed : 6490/6490 (100.00%) -Positive Passed: 2666/6490 (41.08%) +Positive Passed: 2658/6490 (40.96%) tasks/coverage/typescript/tests/cases/compiler/2dArrays.ts semantic error: Symbol reference IDs mismatch for "Cell": after transform: SymbolId(0): [ReferenceId(1)] @@ -823,8 +823,8 @@ rebuilt : SymbolId(0) "M" tasks/coverage/typescript/tests/cases/compiler/anyAndUnknownHaveFalsyComponents.ts semantic error: Bindings mismatch: -after transform: ScopeId(0): ["foo1", "foo2", "isTreeHeader1", "isTreeHeader2", "x1", "x2", "y1", "y2"] -rebuilt : ScopeId(0): ["foo1", "foo2", "y1", "y2"] +after transform: ScopeId(0): ["_objectSpread", "foo1", "foo2", "isTreeHeader1", "isTreeHeader2", "x1", "x2", "y1", "y2"] +rebuilt : ScopeId(0): ["_objectSpread", "foo1", "foo2", "y1", "y2"] Reference symbol mismatch for "x1": after transform: SymbolId(0) "x1" rebuilt : @@ -838,8 +838,8 @@ Reference symbol mismatch for "isTreeHeader1": after transform: SymbolId(2) "isTreeHeader1" rebuilt : Unresolved references mismatch: -after transform: [] -rebuilt : ["isTreeHeader1", "x1", "x2"] +after transform: ["require"] +rebuilt : ["isTreeHeader1", "require", "x1", "x2"] tasks/coverage/typescript/tests/cases/compiler/anyIsAssignableToObject.ts semantic error: Bindings mismatch: @@ -5573,8 +5573,8 @@ rebuilt : ["DMap"] tasks/coverage/typescript/tests/cases/compiler/contextualTypeObjectSpreadExpression.ts semantic error: Bindings mismatch: -after transform: ScopeId(0): ["I", "i"] -rebuilt : ScopeId(0): ["i"] +after transform: ScopeId(0): ["I", "_objectSpread", "i"] +rebuilt : ScopeId(0): ["_objectSpread", "i"] Scope children mismatch: after transform: ScopeId(0): [ScopeId(1)] rebuilt : ScopeId(0): [] @@ -9066,8 +9066,8 @@ rebuilt : ScopeId(2): ["obj"] tasks/coverage/typescript/tests/cases/compiler/declarationEmitKeywordDestructuring.ts semantic error: Bindings mismatch: -after transform: ScopeId(0): ["P", "f1", "f2", "f3", "f4", "f5"] -rebuilt : ScopeId(0): ["f1", "f2", "f3", "f4", "f5"] +after transform: ScopeId(0): ["P", "_excluded", "_excluded2", "_excluded3", "_excluded4", "_excluded5", "_objectWithoutProperties", "f1", "f2", "f3", "f4", "f5"] +rebuilt : ScopeId(0): ["_excluded", "_excluded2", "_excluded3", "_excluded4", "_excluded5", "_objectWithoutProperties", "f1", "f2", "f3", "f4", "f5"] Scope children mismatch: after transform: ScopeId(0): [ScopeId(1), ScopeId(2), ScopeId(3), ScopeId(4), ScopeId(5), ScopeId(6)] rebuilt : ScopeId(0): [ScopeId(1), ScopeId(2), ScopeId(3), ScopeId(4), ScopeId(5)] @@ -9535,7 +9535,7 @@ after transform: ScopeId(1): ScopeFlags(StrictMode) rebuilt : ScopeId(1): ScopeFlags(StrictMode | Function) Symbol flags mismatch for "AgeGroups": after transform: SymbolId(0): SymbolFlags(RegularEnum) -rebuilt : SymbolId(0): SymbolFlags(FunctionScopedVariable) +rebuilt : SymbolId(1): SymbolFlags(FunctionScopedVariable) tasks/coverage/typescript/tests/cases/compiler/declarationEmitStringEnumUsedInNonlocalSpread.ts semantic error: Bindings mismatch: @@ -9942,8 +9942,8 @@ rebuilt : [] tasks/coverage/typescript/tests/cases/compiler/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.ts semantic error: Bindings mismatch: -after transform: ScopeId(0): ["Key", "Value", "p1", "p2", "p3", "testRecFun", "updateIfChanged"] -rebuilt : ScopeId(0): ["p1", "p2", "p3", "testRecFun", "updateIfChanged"] +after transform: ScopeId(0): ["Key", "Value", "_objectSpread", "p1", "p2", "p3", "testRecFun", "updateIfChanged"] +rebuilt : ScopeId(0): ["_objectSpread", "p1", "p2", "p3", "testRecFun", "updateIfChanged"] Scope children mismatch: after transform: ScopeId(0): [ScopeId(1), ScopeId(2), ScopeId(3), ScopeId(10)] rebuilt : ScopeId(0): [ScopeId(1), ScopeId(8)] @@ -10257,8 +10257,8 @@ rebuilt : [] tasks/coverage/typescript/tests/cases/compiler/deeplyNestedTemplateLiteralIntersection.ts semantic error: Bindings mismatch: -after transform: ScopeId(0): ["Props", "R", "S", "T", "X", "_S", "a1", "a2", "b"] -rebuilt : ScopeId(0): ["a1", "a2", "b"] +after transform: ScopeId(0): ["Props", "R", "S", "T", "X", "_S", "_objectSpread", "a1", "a2", "b"] +rebuilt : ScopeId(0): ["_objectSpread", "a1", "a2", "b"] Scope children mismatch: after transform: ScopeId(0): [ScopeId(1), ScopeId(2), ScopeId(3), ScopeId(4), ScopeId(5), ScopeId(6)] rebuilt : ScopeId(0): [] @@ -10634,8 +10634,8 @@ rebuilt : ScopeId(1): [] tasks/coverage/typescript/tests/cases/compiler/destructuringInitializerContextualTypeFromContext.ts semantic error: Bindings mismatch: -after transform: ScopeId(0): ["Child", "Parent", "Props", "SFC"] -rebuilt : ScopeId(0): ["Child", "Parent"] +after transform: ScopeId(0): ["Child", "Parent", "Props", "SFC", "_excluded", "_excluded2", "_objectSpread", "_objectWithoutProperties"] +rebuilt : ScopeId(0): ["Child", "Parent", "_excluded", "_excluded2", "_objectSpread", "_objectWithoutProperties"] Scope children mismatch: after transform: ScopeId(0): [ScopeId(1), ScopeId(2), ScopeId(3), ScopeId(4), ScopeId(5), ScopeId(6)] rebuilt : ScopeId(0): [ScopeId(1), ScopeId(2), ScopeId(3)] @@ -11553,8 +11553,8 @@ rebuilt : ["MyClassDecorator", "MyMethodDecorator"] tasks/coverage/typescript/tests/cases/compiler/emitHelpersWithLocalCollisions.ts semantic error: Bindings mismatch: -after transform: ScopeId(0): ["A", "__decorate", "dec", "o", "y"] -rebuilt : ScopeId(0): ["A", "o", "y"] +after transform: ScopeId(0): ["A", "__decorate", "_objectSpread", "dec", "o", "y"] +rebuilt : ScopeId(0): ["A", "_objectSpread", "o", "y"] Reference symbol mismatch for "dec": after transform: SymbolId(0) "dec" rebuilt : @@ -15231,6 +15231,14 @@ Reference flags mismatch for "X": after transform: ReferenceId(2): ReferenceFlags(Read | Type) rebuilt : ReferenceId(1): ReferenceFlags(Read) +tasks/coverage/typescript/tests/cases/compiler/exportObjectRest.ts +semantic error: Symbol flags mismatch for "x": +after transform: SymbolId(0): SymbolFlags(BlockScopedVariable | ConstVariable | Export) +rebuilt : SymbolId(2): SymbolFlags(BlockScopedVariable | ConstVariable) +Symbol flags mismatch for "rest": +after transform: SymbolId(1): SymbolFlags(BlockScopedVariable | ConstVariable | Export) +rebuilt : SymbolId(3): SymbolFlags(BlockScopedVariable | ConstVariable) + tasks/coverage/typescript/tests/cases/compiler/exportPrivateType.ts semantic error: Namespaces exporting non-const are not supported by Babel. Change to const or see: https://babeljs.io/docs/en/babel-plugin-transform-typescript Namespaces exporting non-const are not supported by Babel. Change to const or see: https://babeljs.io/docs/en/babel-plugin-transform-typescript @@ -17371,8 +17379,8 @@ rebuilt : SymbolId(0): [] tasks/coverage/typescript/tests/cases/compiler/genericObjectSpreadResultInSwitch.ts semantic error: Bindings mismatch: -after transform: ScopeId(0): ["Params", "getType", "params"] -rebuilt : ScopeId(0): ["getType"] +after transform: ScopeId(0): ["Params", "_excluded", "_objectWithoutProperties", "getType", "params"] +rebuilt : ScopeId(0): ["_excluded", "_objectWithoutProperties", "getType"] Scope children mismatch: after transform: ScopeId(0): [ScopeId(1), ScopeId(2), ScopeId(3)] rebuilt : ScopeId(0): [ScopeId(1), ScopeId(2)] @@ -17389,8 +17397,8 @@ Reference symbol mismatch for "params": after transform: SymbolId(6) "params" rebuilt : Unresolved references mismatch: -after transform: [] -rebuilt : ["params"] +after transform: ["require"] +rebuilt : ["params", "require"] tasks/coverage/typescript/tests/cases/compiler/genericOfACloduleType1.ts semantic error: Missing SymbolId: "M" @@ -18120,14 +18128,14 @@ rebuilt : [] tasks/coverage/typescript/tests/cases/compiler/identityAndDivergentNormalizedTypes.ts semantic error: Bindings mismatch: -after transform: ScopeId(0): ["ApiPost", "PostBody", "PostPath", "fx1", "post", "tmp"] -rebuilt : ScopeId(0): ["fx1", "post", "tmp"] +after transform: ScopeId(0): ["ApiPost", "PostBody", "PostPath", "_excluded", "_objectWithoutProperties", "fx1", "post", "tmp"] +rebuilt : ScopeId(0): ["_excluded", "_objectWithoutProperties", "fx1", "post", "tmp"] Scope children mismatch: after transform: ScopeId(0): [ScopeId(1), ScopeId(2), ScopeId(3), ScopeId(4), ScopeId(5), ScopeId(6)] rebuilt : ScopeId(0): [ScopeId(1), ScopeId(2), ScopeId(3)] Bindings mismatch: -after transform: ScopeId(4): ["PATH", "body", "options", "path"] -rebuilt : ScopeId(1): ["body", "options", "path"] +after transform: ScopeId(4): ["PATH", "_ref", "body", "options", "path"] +rebuilt : ScopeId(1): ["_ref", "body", "options", "path"] Bindings mismatch: after transform: ScopeId(5): ["PATH", "body", "path"] rebuilt : ScopeId(2): ["body", "path"] @@ -18135,8 +18143,8 @@ Bindings mismatch: after transform: ScopeId(6): ["P", "x", "y"] rebuilt : ScopeId(3): ["x", "y"] Unresolved references mismatch: -after transform: ["Extract", "Omit", "RequestInit"] -rebuilt : [] +after transform: ["Extract", "Omit", "RequestInit", "require"] +rebuilt : ["require"] tasks/coverage/typescript/tests/cases/compiler/identityRelationNeverTypes.ts semantic error: Bindings mismatch: @@ -18377,8 +18385,8 @@ rebuilt : ["dec"] tasks/coverage/typescript/tests/cases/compiler/importHelpersES6.ts semantic error: Bindings mismatch: -after transform: ScopeId(0): ["A", "_asyncToGenerator", "dec", "o", "y"] -rebuilt : ScopeId(0): ["A", "_asyncToGenerator", "o", "y"] +after transform: ScopeId(0): ["A", "_asyncToGenerator", "_objectSpread", "dec", "o", "y"] +rebuilt : ScopeId(0): ["A", "_asyncToGenerator", "_objectSpread", "o", "y"] Reference symbol mismatch for "dec": after transform: SymbolId(0) "dec" rebuilt : @@ -18424,8 +18432,8 @@ rebuilt : ["React", "o"] tasks/coverage/typescript/tests/cases/compiler/importHelpersWithLocalCollisions.ts semantic error: Bindings mismatch: -after transform: ScopeId(0): ["A", "__decorate", "dec", "o", "y"] -rebuilt : ScopeId(0): ["A", "o", "y"] +after transform: ScopeId(0): ["A", "__decorate", "_objectSpread", "dec", "o", "y"] +rebuilt : ScopeId(0): ["A", "_objectSpread", "o", "y"] Reference symbol mismatch for "dec": after transform: SymbolId(0) "dec" rebuilt : @@ -19349,8 +19357,8 @@ rebuilt : ["test", "x1", "x2"] tasks/coverage/typescript/tests/cases/compiler/inferenceOptionalPropertiesToIndexSignatures.ts semantic error: Bindings mismatch: -after transform: ScopeId(0): ["a1", "a2", "a3", "a4", "obj", "param2", "query", "x1", "x2", "x3", "x4"] -rebuilt : ScopeId(0): ["a1", "a2", "a3", "a4", "obj", "param2", "query"] +after transform: ScopeId(0): ["_objectSpread", "a1", "a2", "a3", "a4", "obj", "param2", "query", "x1", "x2", "x3", "x4"] +rebuilt : ScopeId(0): ["_objectSpread", "a1", "a2", "a3", "a4", "obj", "param2", "query"] Scope children mismatch: after transform: ScopeId(0): [ScopeId(1), ScopeId(2)] rebuilt : ScopeId(0): [ScopeId(1)] @@ -19367,8 +19375,8 @@ Reference symbol mismatch for "x4": after transform: SymbolId(5) "x4" rebuilt : Unresolved references mismatch: -after transform: ["Math", "Object", "encodeURIComponent", "foo"] -rebuilt : ["Math", "Object", "encodeURIComponent", "foo", "x1", "x2", "x3", "x4"] +after transform: ["Math", "Object", "encodeURIComponent", "foo", "require"] +rebuilt : ["Math", "Object", "encodeURIComponent", "foo", "require", "x1", "x2", "x3", "x4"] tasks/coverage/typescript/tests/cases/compiler/inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts semantic error: Bindings mismatch: @@ -21782,8 +21790,8 @@ rebuilt : SymbolId(0): [ReferenceId(0), ReferenceId(2), ReferenceId(3), R tasks/coverage/typescript/tests/cases/compiler/jsxComplexSignatureHasApplicabilityError.tsx semantic error: Bindings mismatch: -after transform: ScopeId(0): ["ArrowRendererHandler", "ArrowRendererProps", "AutocompleteResult", "ClearRendererHandler", "ExtractValueType", "FilterOptionHandler", "FilterOptionsHandler", "FocusOptionHandler", "HandlerRendererResult", "InputRendererHandler", "IsOptionUniqueHandler", "IsValidNewOptionHandler", "LoadOptionsAsyncHandler", "LoadOptionsHandler", "LoadOptionsLegacyHandler", "MenuRendererHandler", "MenuRendererProps", "NewOptionCreatorHandler", "Omit", "OnBlurHandler", "OnChangeHandler", "OnChangeMultipleHandler", "OnChangeSingleHandler", "OnCloseHandler", "OnFocusHandler", "OnInputChangeHandler", "OnInputKeyDownHandler", "OnMenuScrollToBottomHandler", "OnNewOptionClickHandler", "OnOpenHandler", "OnValueClickHandler", "Option", "OptionComponentProps", "OptionComponentType", "OptionRendererHandler", "OptionValues", "Options", "Overwrite", "PromptTextCreatorHandler", "Props", "React", "ReactSelectProps", "ReactSingleSelectProps", "SelectValueHandler", "ShouldKeyDownEventCreateNewOptionHandler", "ValueComponentProps", "ValueComponentType", "ValueRendererHandler", "_jsxFileName", "createReactSingleSelect"] -rebuilt : ScopeId(0): ["React", "_jsxFileName", "createReactSingleSelect"] +after transform: ScopeId(0): ["ArrowRendererHandler", "ArrowRendererProps", "AutocompleteResult", "ClearRendererHandler", "ExtractValueType", "FilterOptionHandler", "FilterOptionsHandler", "FocusOptionHandler", "HandlerRendererResult", "InputRendererHandler", "IsOptionUniqueHandler", "IsValidNewOptionHandler", "LoadOptionsAsyncHandler", "LoadOptionsHandler", "LoadOptionsLegacyHandler", "MenuRendererHandler", "MenuRendererProps", "NewOptionCreatorHandler", "Omit", "OnBlurHandler", "OnChangeHandler", "OnChangeMultipleHandler", "OnChangeSingleHandler", "OnCloseHandler", "OnFocusHandler", "OnInputChangeHandler", "OnInputKeyDownHandler", "OnMenuScrollToBottomHandler", "OnNewOptionClickHandler", "OnOpenHandler", "OnValueClickHandler", "Option", "OptionComponentProps", "OptionComponentType", "OptionRendererHandler", "OptionValues", "Options", "Overwrite", "PromptTextCreatorHandler", "Props", "React", "ReactSelectProps", "ReactSingleSelectProps", "SelectValueHandler", "ShouldKeyDownEventCreateNewOptionHandler", "ValueComponentProps", "ValueComponentType", "ValueRendererHandler", "_jsxFileName", "_objectSpread", "createReactSingleSelect"] +rebuilt : ScopeId(0): ["React", "_jsxFileName", "_objectSpread", "createReactSingleSelect"] Scope children mismatch: after transform: ScopeId(0): [ScopeId(1), ScopeId(3), ScopeId(5), ScopeId(6), ScopeId(10), ScopeId(12), ScopeId(13), ScopeId(16), ScopeId(17), ScopeId(18), ScopeId(19), ScopeId(20), ScopeId(21), ScopeId(22), ScopeId(23), ScopeId(24), ScopeId(25), ScopeId(26), ScopeId(27), ScopeId(28), ScopeId(29), ScopeId(30), ScopeId(31), ScopeId(32), ScopeId(33), ScopeId(34), ScopeId(35), ScopeId(36), ScopeId(37), ScopeId(38), ScopeId(39), ScopeId(40), ScopeId(41), ScopeId(42), ScopeId(43), ScopeId(44), ScopeId(45), ScopeId(46), ScopeId(47), ScopeId(48), ScopeId(49), ScopeId(50), ScopeId(51), ScopeId(52), ScopeId(53), ScopeId(54), ScopeId(55), ScopeId(56), ScopeId(57)] rebuilt : ScopeId(0): [ScopeId(1)] @@ -21791,7 +21799,7 @@ Bindings mismatch: after transform: ScopeId(6): ["WrappedComponent", "WrappedProps"] rebuilt : ScopeId(1): ["WrappedComponent"] Symbol reference IDs mismatch for "React": -after transform: SymbolId(0): [ReferenceId(17), ReferenceId(19), ReferenceId(44), ReferenceId(50), ReferenceId(54), ReferenceId(82), ReferenceId(85), ReferenceId(88), ReferenceId(102), ReferenceId(180), ReferenceId(195), ReferenceId(206), ReferenceId(209), ReferenceId(233), ReferenceId(236), ReferenceId(240)] +after transform: SymbolId(0): [ReferenceId(17), ReferenceId(19), ReferenceId(44), ReferenceId(50), ReferenceId(54), ReferenceId(82), ReferenceId(85), ReferenceId(88), ReferenceId(102), ReferenceId(180), ReferenceId(195), ReferenceId(206), ReferenceId(209), ReferenceId(233), ReferenceId(236), ReferenceId(242)] rebuilt : SymbolId(0): [ReferenceId(0)] Unresolved references mismatch: after transform: ["Array", "Exclude", "HTMLAnchorElement", "HTMLDivElement", "HTMLInputElement", "JSX", "Pick", "Promise", "ReactSelectClass", "undefined"] @@ -21994,8 +22002,8 @@ rebuilt : ScopeId(0): [ScopeId(1)] tasks/coverage/typescript/tests/cases/compiler/jsxGenericComponentWithSpreadingResultOfGenericFunction.tsx semantic error: Bindings mismatch: -after transform: ScopeId(0): ["_jsxFileName", "_reactJsxRuntime", "otherProps"] -rebuilt : ScopeId(0): ["_jsxFileName", "_reactJsxRuntime"] +after transform: ScopeId(0): ["_jsxFileName", "_objectSpread", "_reactJsxRuntime", "otherProps"] +rebuilt : ScopeId(0): ["_jsxFileName", "_objectSpread", "_reactJsxRuntime"] Scope children mismatch: after transform: ScopeId(0): [ScopeId(1), ScopeId(2), ScopeId(3)] rebuilt : ScopeId(0): [] @@ -25422,8 +25430,8 @@ rebuilt : ScopeId(2): ["pet", "voice"] tasks/coverage/typescript/tests/cases/compiler/narrowingDestructuring.ts semantic error: Bindings mismatch: -after transform: ScopeId(0): ["X", "Z", "farr", "func", "func2", "func3"] -rebuilt : ScopeId(0): ["farr", "func", "func2", "func3"] +after transform: ScopeId(0): ["X", "Z", "_excluded", "_excluded2", "_excluded3", "_excluded4", "_objectWithoutProperties", "farr", "func", "func2", "func3"] +rebuilt : ScopeId(0): ["_excluded", "_excluded2", "_excluded3", "_excluded4", "_objectWithoutProperties", "farr", "func", "func2", "func3"] Scope children mismatch: after transform: ScopeId(0): [ScopeId(1), ScopeId(2), ScopeId(5), ScopeId(6), ScopeId(9), ScopeId(12)] rebuilt : ScopeId(0): [ScopeId(1), ScopeId(4), ScopeId(7), ScopeId(10)] @@ -25450,8 +25458,8 @@ rebuilt : ScopeId(0): [ScopeId(1), ScopeId(3), ScopeId(4)] tasks/coverage/typescript/tests/cases/compiler/narrowingNoInfer1.ts semantic error: Bindings mismatch: -after transform: ScopeId(0): ["TaggedA", "TaggedB", "TaggedUnion", "m", "map", "something"] -rebuilt : ScopeId(0): ["m", "map", "something"] +after transform: ScopeId(0): ["TaggedA", "TaggedB", "TaggedUnion", "_objectSpread", "m", "map", "something"] +rebuilt : ScopeId(0): ["_objectSpread", "m", "map", "something"] Scope children mismatch: after transform: ScopeId(0): [ScopeId(1), ScopeId(2), ScopeId(3), ScopeId(4), ScopeId(5), ScopeId(6), ScopeId(7)] rebuilt : ScopeId(0): [ScopeId(1), ScopeId(2), ScopeId(3)] @@ -25459,8 +25467,8 @@ Bindings mismatch: after transform: ScopeId(4): ["A", "B", "f", "items"] rebuilt : ScopeId(1): ["f", "items"] Unresolved references mismatch: -after transform: ["NoInfer", "const", "test2"] -rebuilt : ["test2"] +after transform: ["NoInfer", "const", "require", "test2"] +rebuilt : ["require", "test2"] tasks/coverage/typescript/tests/cases/compiler/narrowingPastLastAssignmentInModule.ts semantic error: Unresolved references mismatch: @@ -25469,8 +25477,8 @@ rebuilt : [] tasks/coverage/typescript/tests/cases/compiler/narrowingRestGenericCall.ts semantic error: Bindings mismatch: -after transform: ScopeId(0): ["Slugs", "call", "obj"] -rebuilt : ScopeId(0): ["call"] +after transform: ScopeId(0): ["Slugs", "_excluded", "_objectWithoutProperties", "call", "obj"] +rebuilt : ScopeId(0): ["_excluded", "_objectWithoutProperties", "call"] Scope children mismatch: after transform: ScopeId(0): [ScopeId(1), ScopeId(2), ScopeId(3)] rebuilt : ScopeId(0): [ScopeId(1), ScopeId(2)] @@ -25481,8 +25489,8 @@ Reference symbol mismatch for "obj": after transform: SymbolId(5) "obj" rebuilt : Unresolved references mismatch: -after transform: ["console"] -rebuilt : ["console", "obj"] +after transform: ["console", "require"] +rebuilt : ["console", "obj", "require"] tasks/coverage/typescript/tests/cases/compiler/narrowingTypeofDiscriminant.ts semantic error: Bindings mismatch: @@ -25722,6 +25730,32 @@ Scope flags mismatch: after transform: ScopeId(2): ScopeFlags(StrictMode | Function) rebuilt : ScopeId(2): ScopeFlags(Function) +tasks/coverage/typescript/tests/cases/compiler/nestedObjectRest.ts +semantic error: Bindings mismatch: +after transform: ScopeId(0): ["_extends", "_objectDestructuringEmpty", "_ref", "_ref2", "x", "y"] +rebuilt : ScopeId(0): ["_extends", "_objectDestructuringEmpty", "_ref", "_ref2", "_ref3", "_ref4", "_ref5", "x", "y"] +Bindings mismatch: +after transform: ScopeId(1): ["_ref3"] +rebuilt : ScopeId(1): [] +Bindings mismatch: +after transform: ScopeId(2): ["_ref4", "_ref5"] +rebuilt : ScopeId(2): [] +Symbol scope ID mismatch for "_ref3": +after transform: SymbolId(6): ScopeId(1) +rebuilt : SymbolId(6): ScopeId(0) +Symbol scope ID mismatch for "_ref4": +after transform: SymbolId(7): ScopeId(2) +rebuilt : SymbolId(7): ScopeId(0) +Symbol scope ID mismatch for "_ref5": +after transform: SymbolId(8): ScopeId(2) +rebuilt : SymbolId(8): ScopeId(0) +Reference flags mismatch for "_ref": +after transform: ReferenceId(3): ReferenceFlags(Write) +rebuilt : ReferenceId(2): ReferenceFlags(Read | Write) +Reference flags mismatch for "_ref4": +after transform: ReferenceId(13): ReferenceFlags(Write) +rebuilt : ReferenceId(12): ReferenceFlags(Read | Write) + tasks/coverage/typescript/tests/cases/compiler/nestedSelf.ts semantic error: Missing SymbolId: "M" Missing SymbolId: "_M" @@ -26469,8 +26503,8 @@ rebuilt : ScopeId(0): [ScopeId(1)] tasks/coverage/typescript/tests/cases/compiler/objectInstantiationFromUnionSpread.ts semantic error: Bindings mismatch: -after transform: ScopeId(0): ["Fail", "Item", "Success", "f1", "f2"] -rebuilt : ScopeId(0): ["f1", "f2"] +after transform: ScopeId(0): ["Fail", "Item", "Success", "_objectSpread", "f1", "f2"] +rebuilt : ScopeId(0): ["_objectSpread", "f1", "f2"] Scope children mismatch: after transform: ScopeId(0): [ScopeId(1), ScopeId(2), ScopeId(3), ScopeId(4), ScopeId(7)] rebuilt : ScopeId(0): [ScopeId(1), ScopeId(4)] @@ -26478,8 +26512,8 @@ Bindings mismatch: after transform: ScopeId(7): ["T", "a"] rebuilt : ScopeId(4): ["a"] Unresolved references mismatch: -after transform: ["true"] -rebuilt : [] +after transform: ["require", "true"] +rebuilt : ["require"] tasks/coverage/typescript/tests/cases/compiler/objectLitGetterSetter.ts semantic error: Unresolved references mismatch: @@ -26557,8 +26591,8 @@ rebuilt : SymbolId(0): [] tasks/coverage/typescript/tests/cases/compiler/objectRestBindingContextualInference.ts semantic error: Bindings mismatch: -after transform: ScopeId(0): ["ImageHolder", "SetupImageRefs", "SetupImages", "TestInterface", "prepare", "rest", "test"] -rebuilt : ScopeId(0): ["prepare", "rest"] +after transform: ScopeId(0): ["ImageHolder", "SetupImageRefs", "SetupImages", "TestInterface", "_objectWithoutProperties", "_setupImages", "prepare", "rest", "test"] +rebuilt : ScopeId(0): ["_objectWithoutProperties", "_setupImages", "prepare", "rest"] Scope children mismatch: after transform: ScopeId(0): [ScopeId(1), ScopeId(3), ScopeId(5), ScopeId(6), ScopeId(7)] rebuilt : ScopeId(0): [] @@ -26566,8 +26600,43 @@ Reference symbol mismatch for "test": after transform: SymbolId(13) "test" rebuilt : Unresolved references mismatch: -after transform: ["File", "setupImages"] -rebuilt : ["setupImages", "test"] +after transform: ["File", "require", "setupImages"] +rebuilt : ["require", "setupImages", "test"] + +tasks/coverage/typescript/tests/cases/compiler/objectRestSpread.ts +semantic error: Bindings mismatch: +after transform: ScopeId(0): ["_excluded", "_extends", "_obj", "_objectDestructuringEmpty", "_objectSpread", "_objectWithoutProperties", "_ref", "_ref2", "_ref3", "_ref4", "_ref5", "_ref6", "_toPropertyKey", "_wrapAsyncGenerator", "fn", "more", "nestedProp", "nestedRest", "obj", "other", "prop", "props", "test"] +rebuilt : ScopeId(0): ["_excluded", "_extends", "_objectDestructuringEmpty", "_objectSpread", "_objectWithoutProperties", "_ref", "_ref2", "_ref3", "_ref4", "_ref5", "_ref6", "_toPropertyKey", "_wrapAsyncGenerator", "fn", "more", "nestedProp", "nestedRest", "obj", "other", "prop", "props", "test"] +Reference symbol mismatch for "_obj": +after transform: SymbolId(18) "_obj" +rebuilt : +Reference symbol mismatch for "_obj": +after transform: SymbolId(18) "_obj" +rebuilt : +Reference symbol mismatch for "_obj": +after transform: SymbolId(18) "_obj" +rebuilt : +Reference symbol mismatch for "_obj": +after transform: SymbolId(18) "_obj" +rebuilt : +Reference symbol mismatch for "_obj": +after transform: SymbolId(18) "_obj" +rebuilt : +Reference flags mismatch for "prop": +after transform: ReferenceId(8): ReferenceFlags(Write) +rebuilt : ReferenceId(42): ReferenceFlags(Read | Write) +Reference flags mismatch for "_objectSpread": +after transform: ReferenceId(49): ReferenceFlags(Read) +rebuilt : ReferenceId(43): ReferenceFlags(Read | Write) +Reference flags mismatch for "obj": +after transform: ReferenceId(9): ReferenceFlags(Write) +rebuilt : ReferenceId(44): ReferenceFlags(Read | Write) +Reference flags mismatch for "_ref6": +after transform: ReferenceId(41): ReferenceFlags(Read) +rebuilt : ReferenceId(45): ReferenceFlags(Read | Write) +Unresolved references mismatch: +after transform: ["require"] +rebuilt : ["_obj", "require"] tasks/coverage/typescript/tests/cases/compiler/observableInferenceCanBeMade.ts semantic error: Bindings mismatch: @@ -31320,8 +31389,8 @@ rebuilt : ScopeId(0): ["_jsx", "_jsxFileName"] tasks/coverage/typescript/tests/cases/compiler/reactNamespaceJSXEmit.tsx semantic error: Bindings mismatch: -after transform: ScopeId(0): ["Bar", "_Bar", "_jsxFileName", "foo", "myReactLib", "x"] -rebuilt : ScopeId(0): ["_jsxFileName"] +after transform: ScopeId(0): ["Bar", "_Bar", "_jsxFileName", "_objectSpread", "foo", "myReactLib", "x"] +rebuilt : ScopeId(0): ["_jsxFileName", "_objectSpread"] Reference symbol mismatch for "Bar": after transform: SymbolId(2) "Bar" rebuilt : @@ -31355,7 +31424,7 @@ semantic error: Bindings mismatch: after transform: ScopeId(1): ["Inner", "P"] rebuilt : ScopeId(1): ["Inner"] Symbol reference IDs mismatch for "React": -after transform: SymbolId(0): [ReferenceId(0), ReferenceId(2), ReferenceId(4), ReferenceId(8)] +after transform: SymbolId(0): [ReferenceId(0), ReferenceId(2), ReferenceId(4), ReferenceId(10)] rebuilt : SymbolId(0): [ReferenceId(0), ReferenceId(1)] tasks/coverage/typescript/tests/cases/compiler/reactSFCAndFunctionResolvable.tsx @@ -31392,10 +31461,10 @@ rebuilt : ["Checkbox", "OtherRadio", "Radio", "condition1", "condition2"] tasks/coverage/typescript/tests/cases/compiler/reactTagNameComponentWithPropsNoOOM.tsx semantic error: Bindings mismatch: -after transform: ScopeId(0): ["React", "Tag", "_jsxFileName", "children", "classes", "rest"] -rebuilt : ScopeId(0): ["React", "_jsxFileName", "children", "classes", "rest"] +after transform: ScopeId(0): ["React", "Tag", "_jsxFileName", "_objectSpread", "children", "classes", "rest"] +rebuilt : ScopeId(0): ["React", "_jsxFileName", "_objectSpread", "children", "classes", "rest"] Symbol reference IDs mismatch for "React": -after transform: SymbolId(0): [ReferenceId(0), ReferenceId(7)] +after transform: SymbolId(0): [ReferenceId(0), ReferenceId(9)] rebuilt : SymbolId(0): [ReferenceId(0)] Reference symbol mismatch for "Tag": after transform: SymbolId(1) "Tag" @@ -31406,10 +31475,10 @@ rebuilt : ["Tag"] tasks/coverage/typescript/tests/cases/compiler/reactTagNameComponentWithPropsNoOOM2.tsx semantic error: Bindings mismatch: -after transform: ScopeId(0): ["React", "Tag", "_jsxFileName", "children", "classes", "rest"] -rebuilt : ScopeId(0): ["React", "_jsxFileName", "children", "classes", "rest"] +after transform: ScopeId(0): ["React", "Tag", "_jsxFileName", "_objectSpread", "children", "classes", "rest"] +rebuilt : ScopeId(0): ["React", "_jsxFileName", "_objectSpread", "children", "classes", "rest"] Symbol reference IDs mismatch for "React": -after transform: SymbolId(0): [ReferenceId(0), ReferenceId(1), ReferenceId(9)] +after transform: SymbolId(0): [ReferenceId(0), ReferenceId(1), ReferenceId(11)] rebuilt : SymbolId(0): [ReferenceId(0)] Reference symbol mismatch for "Tag": after transform: SymbolId(1) "Tag" @@ -32630,14 +32699,14 @@ rebuilt : SymbolId(7): [] tasks/coverage/typescript/tests/cases/compiler/restParameterTypeInstantiation.ts semantic error: Bindings mismatch: -after transform: ScopeId(0): ["TestGeneric", "removeF", "result"] -rebuilt : ScopeId(0): ["removeF", "result"] +after transform: ScopeId(0): ["TestGeneric", "_excluded", "_objectWithoutProperties", "removeF", "result"] +rebuilt : ScopeId(0): ["_excluded", "_objectWithoutProperties", "removeF", "result"] Scope children mismatch: after transform: ScopeId(0): [ScopeId(1), ScopeId(2)] rebuilt : ScopeId(0): [ScopeId(1)] Bindings mismatch: -after transform: ScopeId(2): ["TX", "f", "rest"] -rebuilt : ScopeId(1): ["f", "rest"] +after transform: ScopeId(2): ["TX", "_ref", "f", "rest"] +rebuilt : ScopeId(1): ["_ref", "f", "rest"] tasks/coverage/typescript/tests/cases/compiler/restTypeRetainsMappyness.ts semantic error: Bindings mismatch: @@ -32652,17 +32721,23 @@ rebuilt : ScopeId(1): ["arr", "fn"] tasks/coverage/typescript/tests/cases/compiler/restUnion2.ts semantic error: Bindings mismatch: -after transform: ScopeId(0): ["nullUnion", "rest2", "rest3", "undefinedUnion"] -rebuilt : ScopeId(0): ["rest2", "rest3"] +after transform: ScopeId(0): ["_extends", "_objectDestructuringEmpty", "nullUnion", "rest2", "rest3", "undefinedUnion"] +rebuilt : ScopeId(0): ["_extends", "_objectDestructuringEmpty", "rest2", "rest3"] +Reference symbol mismatch for "undefinedUnion": +after transform: SymbolId(0) "undefinedUnion" +rebuilt : Reference symbol mismatch for "undefinedUnion": after transform: SymbolId(0) "undefinedUnion" rebuilt : Reference symbol mismatch for "nullUnion": after transform: SymbolId(2) "nullUnion" rebuilt : +Reference symbol mismatch for "nullUnion": +after transform: SymbolId(2) "nullUnion" +rebuilt : Unresolved references mismatch: -after transform: [] -rebuilt : ["nullUnion", "undefinedUnion"] +after transform: ["require"] +rebuilt : ["nullUnion", "require", "undefinedUnion"] tasks/coverage/typescript/tests/cases/compiler/returnInfiniteIntersection.ts semantic error: Bindings mismatch: @@ -34905,8 +34980,8 @@ rebuilt : ["Array", "foo1", "foo2"] tasks/coverage/typescript/tests/cases/compiler/spreadExpressionContextualType.ts semantic error: Bindings mismatch: -after transform: ScopeId(0): ["Apple", "Orange", "test", "test2"] -rebuilt : ScopeId(0): ["test", "test2"] +after transform: ScopeId(0): ["Apple", "Orange", "_objectSpread", "test", "test2"] +rebuilt : ScopeId(0): ["_objectSpread", "test", "test2"] Scope children mismatch: after transform: ScopeId(0): [ScopeId(1), ScopeId(2), ScopeId(3), ScopeId(4)] rebuilt : ScopeId(0): [ScopeId(1), ScopeId(2)] @@ -34924,8 +34999,8 @@ rebuilt : ScopeId(1): ["thing"] tasks/coverage/typescript/tests/cases/compiler/spreadIdenticalTypesRemoved.ts semantic error: Bindings mismatch: -after transform: ScopeId(0): ["Animal", "Animal2", "billOwner", "clonePet"] -rebuilt : ScopeId(0): ["billOwner", "clonePet"] +after transform: ScopeId(0): ["Animal", "Animal2", "_objectSpread", "billOwner", "clonePet"] +rebuilt : ScopeId(0): ["_objectSpread", "billOwner", "clonePet"] Scope children mismatch: after transform: ScopeId(0): [ScopeId(1), ScopeId(2), ScopeId(3), ScopeId(4)] rebuilt : ScopeId(0): [ScopeId(1), ScopeId(2)] @@ -34940,25 +35015,25 @@ rebuilt : SymbolId(3): [] tasks/coverage/typescript/tests/cases/compiler/spreadObjectNoCircular1.ts semantic error: Bindings mismatch: -after transform: ScopeId(0): ["Box", "Foo", "b"] -rebuilt : ScopeId(0): ["Foo"] +after transform: ScopeId(0): ["Box", "Foo", "_objectSpread", "b"] +rebuilt : ScopeId(0): ["Foo", "_objectSpread"] Scope children mismatch: after transform: ScopeId(0): [ScopeId(1), ScopeId(2)] rebuilt : ScopeId(0): [ScopeId(1)] Symbol reference IDs mismatch for "Foo": after transform: SymbolId(2): [ReferenceId(0), ReferenceId(3)] -rebuilt : SymbolId(0): [] +rebuilt : SymbolId(1): [] Reference symbol mismatch for "b": after transform: SymbolId(1) "b" rebuilt : Unresolved references mismatch: -after transform: [] -rebuilt : ["b"] +after transform: ["require"] +rebuilt : ["b", "require"] tasks/coverage/typescript/tests/cases/compiler/spreadObjectPermutations.ts semantic error: Bindings mismatch: -after transform: ScopeId(0): ["a", "b", "c", "v_a", "v_ab", "v_abc", "v_ac", "v_acb", "v_b", "v_ba", "v_bac", "v_bc", "v_bca", "v_c", "v_ca", "v_cab", "v_cb", "v_cba"] -rebuilt : ScopeId(0): ["v_a", "v_ab", "v_abc", "v_ac", "v_acb", "v_b", "v_ba", "v_bac", "v_bc", "v_bca", "v_c", "v_ca", "v_cab", "v_cb", "v_cba"] +after transform: ScopeId(0): ["_objectSpread", "a", "b", "c", "v_a", "v_ab", "v_abc", "v_ac", "v_acb", "v_b", "v_ba", "v_bac", "v_bc", "v_bca", "v_c", "v_ca", "v_cab", "v_cb", "v_cba"] +rebuilt : ScopeId(0): ["_objectSpread", "v_a", "v_ab", "v_abc", "v_ac", "v_acb", "v_b", "v_ba", "v_bac", "v_bc", "v_bca", "v_c", "v_ca", "v_cab", "v_cb", "v_cba"] Reference symbol mismatch for "a": after transform: SymbolId(0) "a" rebuilt : @@ -35059,30 +35134,30 @@ Reference symbol mismatch for "a": after transform: SymbolId(0) "a" rebuilt : Unresolved references mismatch: -after transform: [] -rebuilt : ["a", "b", "c"] +after transform: ["require"] +rebuilt : ["a", "b", "c", "require"] tasks/coverage/typescript/tests/cases/compiler/spreadObjectWithIndexDoesNotAddUndefinedToLocalIndex.ts semantic error: Bindings mismatch: -after transform: ScopeId(0): ["m", "x"] -rebuilt : ScopeId(0): ["x"] +after transform: ScopeId(0): ["_objectSpread", "m", "x"] +rebuilt : ScopeId(0): ["_objectSpread", "x"] Reference symbol mismatch for "m": after transform: SymbolId(0) "m" rebuilt : Unresolved references mismatch: -after transform: [] -rebuilt : ["m"] +after transform: ["require"] +rebuilt : ["m", "require"] tasks/coverage/typescript/tests/cases/compiler/spreadOfObjectLiteralAssignableToIndexSignature.ts semantic error: Bindings mismatch: -after transform: ScopeId(0): ["RecordOfRecords", "RecordOfRecordsOrEmpty", "foo", "recordOfRecords", "recordsOfRecordsOrEmpty"] -rebuilt : ScopeId(0): ["foo", "recordOfRecords", "recordsOfRecordsOrEmpty"] +after transform: ScopeId(0): ["RecordOfRecords", "RecordOfRecordsOrEmpty", "_objectSpread", "foo", "recordOfRecords", "recordsOfRecordsOrEmpty"] +rebuilt : ScopeId(0): ["_objectSpread", "foo", "recordOfRecords", "recordsOfRecordsOrEmpty"] Scope children mismatch: after transform: ScopeId(0): [ScopeId(1), ScopeId(2)] rebuilt : ScopeId(0): [] Unresolved references mismatch: -after transform: ["Record", "undefined"] -rebuilt : ["undefined"] +after transform: ["Record", "require", "undefined"] +rebuilt : ["require", "undefined"] tasks/coverage/typescript/tests/cases/compiler/spreadParameterTupleType.ts semantic error: Bindings mismatch: @@ -35105,8 +35180,8 @@ rebuilt : ScopeId(1): ["i", "rest", "singleton", "singletons"] tasks/coverage/typescript/tests/cases/compiler/spreadTypeRemovesReadonly.ts semantic error: Bindings mismatch: -after transform: ScopeId(0): ["ReadonlyData", "clone", "data"] -rebuilt : ScopeId(0): ["clone", "data"] +after transform: ScopeId(0): ["ReadonlyData", "_objectSpread", "clone", "data"] +rebuilt : ScopeId(0): ["_objectSpread", "clone", "data"] Scope children mismatch: after transform: ScopeId(0): [ScopeId(1)] rebuilt : ScopeId(0): [] @@ -36375,14 +36450,14 @@ rebuilt : ScopeId(1): [] tasks/coverage/typescript/tests/cases/compiler/trivialSubtypeReductionNoStructuralCheck2.ts semantic error: Bindings mismatch: -after transform: ScopeId(0): ["Wizard", "WizardStepProps", "props"] -rebuilt : ScopeId(0): ["Wizard"] +after transform: ScopeId(0): ["Wizard", "WizardStepProps", "_objectSpread", "props"] +rebuilt : ScopeId(0): ["Wizard", "_objectSpread"] Scope children mismatch: after transform: ScopeId(0): [ScopeId(1), ScopeId(3)] rebuilt : ScopeId(0): [ScopeId(1)] Symbol reference IDs mismatch for "Wizard": after transform: SymbolId(1): [ReferenceId(1), ReferenceId(4)] -rebuilt : SymbolId(0): [] +rebuilt : SymbolId(1): [] Reference symbol mismatch for "props": after transform: SymbolId(0) "props" rebuilt : @@ -36518,8 +36593,8 @@ rebuilt : ScopeId(0): [ScopeId(1), ScopeId(2)] tasks/coverage/typescript/tests/cases/compiler/tsxUnionSpread.tsx semantic error: Bindings mismatch: -after transform: ScopeId(0): ["AnimalComponent", "AnimalInfo", "CatInfo", "DogInfo", "JSX", "_jsx", "_jsxFileName", "component", "component2", "getProps", "props", "props2"] -rebuilt : ScopeId(0): ["AnimalComponent", "_jsx", "_jsxFileName", "component", "component2", "getProps", "props", "props2"] +after transform: ScopeId(0): ["AnimalComponent", "AnimalInfo", "CatInfo", "DogInfo", "JSX", "_jsx", "_jsxFileName", "_objectSpread", "component", "component2", "getProps", "props", "props2"] +rebuilt : ScopeId(0): ["AnimalComponent", "_jsx", "_jsxFileName", "_objectSpread", "component", "component2", "getProps", "props", "props2"] Scope children mismatch: after transform: ScopeId(0): [ScopeId(1), ScopeId(3), ScopeId(4), ScopeId(5), ScopeId(6), ScopeId(7)] rebuilt : ScopeId(0): [ScopeId(1), ScopeId(2)] @@ -38146,8 +38221,8 @@ rebuilt : ScopeId(0): [ScopeId(1)] tasks/coverage/typescript/tests/cases/compiler/unionExcessPropsWithPartialMember.ts semantic error: Bindings mismatch: -after transform: ScopeId(0): ["A", "B", "a", "ab"] -rebuilt : ScopeId(0): [] +after transform: ScopeId(0): ["A", "B", "_objectSpread", "a", "ab"] +rebuilt : ScopeId(0): ["_objectSpread"] Scope children mismatch: after transform: ScopeId(0): [ScopeId(1), ScopeId(2)] rebuilt : ScopeId(0): [] @@ -38158,8 +38233,8 @@ Reference symbol mismatch for "a": after transform: SymbolId(3) "a" rebuilt : Unresolved references mismatch: -after transform: [] -rebuilt : ["a", "ab"] +after transform: ["require"] +rebuilt : ["a", "ab", "require"] tasks/coverage/typescript/tests/cases/compiler/unionOfArraysFilterCall.ts semantic error: Bindings mismatch: @@ -40994,11 +41069,53 @@ tasks/coverage/typescript/tests/cases/conformance/classes/members/instanceAndSta semantic error: Scope children mismatch: after transform: ScopeId(0): [ScopeId(1), ScopeId(4)] rebuilt : ScopeId(0): [ScopeId(1)] +Bindings mismatch: +after transform: ScopeId(4): ["_x"] +rebuilt : ScopeId(1): [] +Reference symbol mismatch for "_x": +after transform: SymbolId(1) "_x" +rebuilt : +Reference symbol mismatch for "_x": +after transform: SymbolId(1) "_x" +rebuilt : +Reference symbol mismatch for "_x": +after transform: SymbolId(1) "_x" +rebuilt : +Reference symbol mismatch for "_x": +after transform: SymbolId(1) "_x" +rebuilt : +Reference symbol mismatch for "_x": +after transform: SymbolId(1) "_x" +rebuilt : +Unresolved references mismatch: +after transform: ["B", "require", "undefined"] +rebuilt : ["B", "_x", "require", "undefined"] tasks/coverage/typescript/tests/cases/conformance/classes/members/instanceAndStaticMembers/thisAndSuperInStaticMembers2.ts semantic error: Scope children mismatch: after transform: ScopeId(0): [ScopeId(1), ScopeId(4)] rebuilt : ScopeId(0): [ScopeId(1)] +Bindings mismatch: +after transform: ScopeId(4): ["_x"] +rebuilt : ScopeId(1): [] +Reference symbol mismatch for "_x": +after transform: SymbolId(1) "_x" +rebuilt : +Reference symbol mismatch for "_x": +after transform: SymbolId(1) "_x" +rebuilt : +Reference symbol mismatch for "_x": +after transform: SymbolId(1) "_x" +rebuilt : +Reference symbol mismatch for "_x": +after transform: SymbolId(1) "_x" +rebuilt : +Reference symbol mismatch for "_x": +after transform: SymbolId(1) "_x" +rebuilt : +Unresolved references mismatch: +after transform: ["B", "require", "undefined"] +rebuilt : ["B", "_x", "require", "undefined"] tasks/coverage/typescript/tests/cases/conformance/classes/members/instanceAndStaticMembers/thisAndSuperInStaticMembers3.ts semantic error: Scope children mismatch: @@ -44358,6 +44475,11 @@ Unresolved references mismatch: after transform: [] rebuilt : ["yadda"] +tasks/coverage/typescript/tests/cases/conformance/es6/destructuring/destructuringObjectAssignmentPatternWithNestedSpread.ts +semantic error: Reference flags mismatch for "a": +after transform: ReferenceId(0): ReferenceFlags(Write) +rebuilt : ReferenceId(6): ReferenceFlags(Read | Write) + tasks/coverage/typescript/tests/cases/conformance/es6/destructuring/destructuringObjectBindingPatternAndAssignment1ES5.ts semantic error: Bindings mismatch: after transform: ScopeId(0): ["F", "F1", "a1", "a2", "b1", "b21", "b3", "b4", "b52", "bar", "c0", "c1", "d1", "foo", "foo1"] @@ -44374,6 +44496,11 @@ Scope children mismatch: after transform: ScopeId(0): [ScopeId(1), ScopeId(2), ScopeId(3), ScopeId(4), ScopeId(5)] rebuilt : ScopeId(0): [ScopeId(1), ScopeId(2), ScopeId(3)] +tasks/coverage/typescript/tests/cases/conformance/es6/destructuring/destructuringObjectBindingPatternAndAssignment5.ts +semantic error: Reference flags mismatch for "x": +after transform: ReferenceId(0): ReferenceFlags(Write) +rebuilt : ReferenceId(2): ReferenceFlags(Read | Write) + tasks/coverage/typescript/tests/cases/conformance/es6/destructuring/destructuringObjectBindingPatternAndAssignment7.ts semantic error: Bindings mismatch: after transform: ScopeId(1): ["K", "a", "b"] @@ -44698,8 +44825,8 @@ rebuilt : [] tasks/coverage/typescript/tests/cases/conformance/es6/templates/taggedTemplatesWithTypeArguments1.ts semantic error: Bindings mismatch: -after transform: ScopeId(0): ["Stuff", "T", "a", "b", "c", "obj"] -rebuilt : ScopeId(0): ["a", "b", "c"] +after transform: ScopeId(0): ["Stuff", "T", "_objectSpread", "a", "b", "c", "obj"] +rebuilt : ScopeId(0): ["_objectSpread", "a", "b", "c"] Scope children mismatch: after transform: ScopeId(0): [ScopeId(1), ScopeId(2), ScopeId(3), ScopeId(4), ScopeId(5), ScopeId(6), ScopeId(7), ScopeId(8), ScopeId(9), ScopeId(10), ScopeId(11)] rebuilt : ScopeId(0): [ScopeId(1), ScopeId(2), ScopeId(3), ScopeId(4), ScopeId(5), ScopeId(6), ScopeId(7), ScopeId(8)] @@ -49773,6 +49900,17 @@ semantic error: Scope children mismatch: after transform: ScopeId(0): [ScopeId(1), ScopeId(2)] rebuilt : ScopeId(0): [ScopeId(1)] +tasks/coverage/typescript/tests/cases/conformance/functions/functionParameterObjectRestAndInitializers.ts +semantic error: Symbol reference IDs mismatch for "a": +after transform: SymbolId(1): [ReferenceId(0)] +rebuilt : SymbolId(6): [] +Reference symbol mismatch for "a": +after transform: SymbolId(1) "a" +rebuilt : +Unresolved references mismatch: +after transform: ["require"] +rebuilt : ["a", "require"] + tasks/coverage/typescript/tests/cases/conformance/functions/strictBindCallApply2.ts semantic error: Bindings mismatch: after transform: ScopeId(0): ["Foo", "Test", "fb", "fn"] @@ -51464,23 +51602,23 @@ tasks/coverage/typescript/tests/cases/conformance/jsx/checkJsxChildrenProperty12 semantic error: Missing SymbolId: "React" Missing ReferenceId: "require" Bindings mismatch: -after transform: ScopeId(0): ["Button", "ButtonProp", "InnerButton", "InnerButtonProp", "React", "_jsxFileName", "_reactJsxRuntime"] -rebuilt : ScopeId(0): ["Button", "InnerButton", "React", "_jsxFileName", "_reactJsxRuntime"] +after transform: ScopeId(0): ["Button", "ButtonProp", "InnerButton", "InnerButtonProp", "React", "_jsxFileName", "_objectSpread", "_reactJsxRuntime"] +rebuilt : ScopeId(0): ["Button", "InnerButton", "React", "_jsxFileName", "_objectSpread", "_reactJsxRuntime"] Scope children mismatch: after transform: ScopeId(0): [ScopeId(1), ScopeId(2), ScopeId(6), ScopeId(7)] rebuilt : ScopeId(0): [ScopeId(1), ScopeId(5)] Symbol reference IDs mismatch for "Button": after transform: SymbolId(2): [ReferenceId(0)] -rebuilt : SymbolId(3): [] +rebuilt : SymbolId(4): [] Reference symbol mismatch for "React": after transform: SymbolId(0) "React" -rebuilt : SymbolId(2) "React" +rebuilt : SymbolId(3) "React" Reference symbol mismatch for "React": after transform: SymbolId(0) "React" -rebuilt : SymbolId(2) "React" +rebuilt : SymbolId(3) "React" Unresolved reference IDs mismatch for "require": -after transform: [ReferenceId(17)] -rebuilt : [ReferenceId(0), ReferenceId(1)] +after transform: [ReferenceId(20), ReferenceId(21)] +rebuilt : [ReferenceId(0), ReferenceId(1), ReferenceId(2)] tasks/coverage/typescript/tests/cases/conformance/jsx/checkJsxChildrenProperty16.tsx semantic error: Missing SymbolId: "React" @@ -51643,14 +51781,14 @@ rebuilt : ["React"] tasks/coverage/typescript/tests/cases/conformance/jsx/jsxReactTestSuite.tsx semantic error: Bindings mismatch: -after transform: ScopeId(0): ["Child", "Component", "Composite", "Composite2", "Namespace", "React", "_jsxFileName", "_reactJsxRuntime", "bar", "foo", "hasOwnProperty", "x", "y", "z"] -rebuilt : ScopeId(0): ["_jsxFileName", "_reactJsxRuntime", "x"] +after transform: ScopeId(0): ["Child", "Component", "Composite", "Composite2", "Namespace", "React", "_jsxFileName", "_objectSpread", "_reactJsxRuntime", "bar", "foo", "hasOwnProperty", "x", "y", "z"] +rebuilt : ScopeId(0): ["_jsxFileName", "_objectSpread", "_reactJsxRuntime", "x"] Symbol span mismatch for "x": after transform: SymbolId(9): Span { start: 231, end: 236 } -rebuilt : SymbolId(2): Span { start: 537, end: 538 } +rebuilt : SymbolId(3): Span { start: 537, end: 538 } Symbol redeclarations mismatch for "x": after transform: SymbolId(9): [Span { start: 537, end: 538 }] -rebuilt : SymbolId(2): [] +rebuilt : SymbolId(3): [] Reference symbol mismatch for "Component": after transform: SymbolId(1) "Component" rebuilt : @@ -51761,8 +51899,8 @@ rebuilt : ["require"] tasks/coverage/typescript/tests/cases/conformance/jsx/tsxAttributeResolution8.tsx semantic error: Bindings mismatch: -after transform: ScopeId(0): ["JSX", "_jsxFileName", "_reactJsxRuntime", "x"] -rebuilt : ScopeId(0): ["_jsxFileName", "_reactJsxRuntime", "x"] +after transform: ScopeId(0): ["JSX", "_jsxFileName", "_objectSpread", "_reactJsxRuntime", "x"] +rebuilt : ScopeId(0): ["_jsxFileName", "_objectSpread", "_reactJsxRuntime", "x"] Scope children mismatch: after transform: ScopeId(0): [ScopeId(1)] rebuilt : ScopeId(0): [] @@ -51922,16 +52060,16 @@ rebuilt : ScopeId(0): [ScopeId(1)] tasks/coverage/typescript/tests/cases/conformance/jsx/tsxEmit2.tsx semantic error: Bindings mismatch: -after transform: ScopeId(0): ["JSX", "_jsxFileName", "_reactJsxRuntime", "p1", "p2", "p3", "spreads1", "spreads2", "spreads3", "spreads4", "spreads5"] -rebuilt : ScopeId(0): ["_jsxFileName", "_reactJsxRuntime", "p1", "p2", "p3", "spreads1", "spreads2", "spreads3", "spreads4", "spreads5"] +after transform: ScopeId(0): ["JSX", "_jsxFileName", "_objectSpread", "_reactJsxRuntime", "p1", "p2", "p3", "spreads1", "spreads2", "spreads3", "spreads4", "spreads5"] +rebuilt : ScopeId(0): ["_jsxFileName", "_objectSpread", "_reactJsxRuntime", "p1", "p2", "p3", "spreads1", "spreads2", "spreads3", "spreads4", "spreads5"] Scope children mismatch: after transform: ScopeId(0): [ScopeId(1)] rebuilt : ScopeId(0): [] tasks/coverage/typescript/tests/cases/conformance/jsx/tsxEmitSpreadAttribute.ts semantic error: Bindings mismatch: -after transform: ScopeId(0): ["React", "T1", "T10", "T11", "T2", "T3", "T4", "T5", "T6", "T7", "T8", "T9", "__proto__", "_jsxFileName"] -rebuilt : ScopeId(0): ["T1", "T10", "T11", "T2", "T3", "T4", "T5", "T6", "T7", "T8", "T9", "_jsxFileName"] +after transform: ScopeId(0): ["React", "T1", "T10", "T11", "T2", "T3", "T4", "T5", "T6", "T7", "T8", "T9", "__proto__", "_jsxFileName", "_objectSpread"] +rebuilt : ScopeId(0): ["T1", "T10", "T11", "T2", "T3", "T4", "T5", "T6", "T7", "T8", "T9", "_jsxFileName", "_objectSpread"] Reference symbol mismatch for "React": after transform: SymbolId(0) "React" rebuilt : @@ -52084,8 +52222,8 @@ tasks/coverage/typescript/tests/cases/conformance/jsx/tsxGenericAttributesType1. semantic error: Missing SymbolId: "React" Missing ReferenceId: "require" Binding symbols mismatch: -after transform: ScopeId(0): [SymbolId(0), SymbolId(1), SymbolId(5), SymbolId(9), SymbolId(14), SymbolId(15)] -rebuilt : ScopeId(0): [SymbolId(0), SymbolId(1), SymbolId(2), SymbolId(3), SymbolId(6), SymbolId(9)] +after transform: ScopeId(0): [SymbolId(0), SymbolId(1), SymbolId(5), SymbolId(9), SymbolId(14), SymbolId(15), SymbolId(16)] +rebuilt : ScopeId(0): [SymbolId(0), SymbolId(1), SymbolId(2), SymbolId(3), SymbolId(4), SymbolId(7), SymbolId(10)] Bindings mismatch: after transform: ScopeId(1): ["Component", "T"] rebuilt : ScopeId(1): ["Component"] @@ -52096,28 +52234,28 @@ Bindings mismatch: after transform: ScopeId(5): ["Component", "T", "U"] rebuilt : ScopeId(5): ["Component"] Unresolved reference IDs mismatch for "require": -after transform: [ReferenceId(27)] -rebuilt : [ReferenceId(0), ReferenceId(1)] +after transform: [ReferenceId(31), ReferenceId(32)] +rebuilt : [ReferenceId(0), ReferenceId(1), ReferenceId(2)] tasks/coverage/typescript/tests/cases/conformance/jsx/tsxGenericAttributesType2.tsx semantic error: Missing SymbolId: "React" Missing ReferenceId: "require" Binding symbols mismatch: -after transform: ScopeId(0): [SymbolId(0), SymbolId(1), SymbolId(5), SymbolId(6)] -rebuilt : ScopeId(0): [SymbolId(0), SymbolId(1), SymbolId(2), SymbolId(3)] +after transform: ScopeId(0): [SymbolId(0), SymbolId(1), SymbolId(5), SymbolId(6), SymbolId(7)] +rebuilt : ScopeId(0): [SymbolId(0), SymbolId(1), SymbolId(2), SymbolId(3), SymbolId(4)] Bindings mismatch: after transform: ScopeId(1): ["Component", "T"] rebuilt : ScopeId(1): ["Component"] Unresolved reference IDs mismatch for "require": -after transform: [ReferenceId(9)] -rebuilt : [ReferenceId(0), ReferenceId(1)] +after transform: [ReferenceId(11), ReferenceId(12)] +rebuilt : [ReferenceId(0), ReferenceId(1), ReferenceId(2)] tasks/coverage/typescript/tests/cases/conformance/jsx/tsxGenericAttributesType3.tsx semantic error: Missing SymbolId: "React" Missing ReferenceId: "require" Binding symbols mismatch: -after transform: ScopeId(0): [SymbolId(0), SymbolId(1), SymbolId(3), SymbolId(5), SymbolId(6)] -rebuilt : ScopeId(0): [SymbolId(0), SymbolId(1), SymbolId(2), SymbolId(3), SymbolId(4)] +after transform: ScopeId(0): [SymbolId(0), SymbolId(1), SymbolId(3), SymbolId(5), SymbolId(6), SymbolId(7)] +rebuilt : ScopeId(0): [SymbolId(0), SymbolId(1), SymbolId(2), SymbolId(3), SymbolId(4), SymbolId(5)] Bindings mismatch: after transform: ScopeId(1): ["T"] rebuilt : ScopeId(1): [] @@ -52126,20 +52264,20 @@ after transform: ScopeId(3): ["U"] rebuilt : ScopeId(3): [] Reference symbol mismatch for "React": after transform: SymbolId(0) "React" -rebuilt : SymbolId(2) "React" +rebuilt : SymbolId(3) "React" Reference symbol mismatch for "React": after transform: SymbolId(0) "React" -rebuilt : SymbolId(2) "React" +rebuilt : SymbolId(3) "React" Unresolved reference IDs mismatch for "require": -after transform: [ReferenceId(9)] -rebuilt : [ReferenceId(0), ReferenceId(1)] +after transform: [ReferenceId(11), ReferenceId(12)] +rebuilt : [ReferenceId(0), ReferenceId(1), ReferenceId(2)] tasks/coverage/typescript/tests/cases/conformance/jsx/tsxGenericAttributesType4.tsx semantic error: Missing SymbolId: "React" Missing ReferenceId: "require" Binding symbols mismatch: -after transform: ScopeId(0): [SymbolId(0), SymbolId(1), SymbolId(3), SymbolId(5), SymbolId(6)] -rebuilt : ScopeId(0): [SymbolId(0), SymbolId(1), SymbolId(2), SymbolId(3), SymbolId(4)] +after transform: ScopeId(0): [SymbolId(0), SymbolId(1), SymbolId(3), SymbolId(5), SymbolId(6), SymbolId(7)] +rebuilt : ScopeId(0): [SymbolId(0), SymbolId(1), SymbolId(2), SymbolId(3), SymbolId(4), SymbolId(5)] Bindings mismatch: after transform: ScopeId(1): ["T"] rebuilt : ScopeId(1): [] @@ -52148,20 +52286,20 @@ after transform: ScopeId(3): ["U"] rebuilt : ScopeId(3): [] Reference symbol mismatch for "React": after transform: SymbolId(0) "React" -rebuilt : SymbolId(2) "React" +rebuilt : SymbolId(3) "React" Reference symbol mismatch for "React": after transform: SymbolId(0) "React" -rebuilt : SymbolId(2) "React" +rebuilt : SymbolId(3) "React" Unresolved reference IDs mismatch for "require": -after transform: [ReferenceId(9)] -rebuilt : [ReferenceId(0), ReferenceId(1)] +after transform: [ReferenceId(11), ReferenceId(12)] +rebuilt : [ReferenceId(0), ReferenceId(1), ReferenceId(2)] tasks/coverage/typescript/tests/cases/conformance/jsx/tsxGenericAttributesType5.tsx semantic error: Missing SymbolId: "React" Missing ReferenceId: "require" Binding symbols mismatch: -after transform: ScopeId(0): [SymbolId(0), SymbolId(1), SymbolId(3), SymbolId(5), SymbolId(6)] -rebuilt : ScopeId(0): [SymbolId(0), SymbolId(1), SymbolId(2), SymbolId(3), SymbolId(4)] +after transform: ScopeId(0): [SymbolId(0), SymbolId(1), SymbolId(3), SymbolId(5), SymbolId(6), SymbolId(7)] +rebuilt : ScopeId(0): [SymbolId(0), SymbolId(1), SymbolId(2), SymbolId(3), SymbolId(4), SymbolId(5)] Bindings mismatch: after transform: ScopeId(1): ["T"] rebuilt : ScopeId(1): [] @@ -52170,20 +52308,20 @@ after transform: ScopeId(3): ["U"] rebuilt : ScopeId(3): [] Reference symbol mismatch for "React": after transform: SymbolId(0) "React" -rebuilt : SymbolId(2) "React" +rebuilt : SymbolId(3) "React" Reference symbol mismatch for "React": after transform: SymbolId(0) "React" -rebuilt : SymbolId(2) "React" +rebuilt : SymbolId(3) "React" Unresolved reference IDs mismatch for "require": -after transform: [ReferenceId(10)] -rebuilt : [ReferenceId(0), ReferenceId(1)] +after transform: [ReferenceId(12), ReferenceId(13)] +rebuilt : [ReferenceId(0), ReferenceId(1), ReferenceId(2)] tasks/coverage/typescript/tests/cases/conformance/jsx/tsxGenericAttributesType6.tsx semantic error: Missing SymbolId: "React" Missing ReferenceId: "require" Binding symbols mismatch: -after transform: ScopeId(0): [SymbolId(0), SymbolId(1), SymbolId(3), SymbolId(5), SymbolId(6)] -rebuilt : ScopeId(0): [SymbolId(0), SymbolId(1), SymbolId(2), SymbolId(3), SymbolId(4)] +after transform: ScopeId(0): [SymbolId(0), SymbolId(1), SymbolId(3), SymbolId(5), SymbolId(6), SymbolId(7)] +rebuilt : ScopeId(0): [SymbolId(0), SymbolId(1), SymbolId(2), SymbolId(3), SymbolId(4), SymbolId(5)] Bindings mismatch: after transform: ScopeId(1): ["T"] rebuilt : ScopeId(1): [] @@ -52192,20 +52330,20 @@ after transform: ScopeId(3): ["U"] rebuilt : ScopeId(3): [] Reference symbol mismatch for "React": after transform: SymbolId(0) "React" -rebuilt : SymbolId(2) "React" +rebuilt : SymbolId(3) "React" Reference symbol mismatch for "React": after transform: SymbolId(0) "React" -rebuilt : SymbolId(2) "React" +rebuilt : SymbolId(3) "React" Unresolved reference IDs mismatch for "require": -after transform: [ReferenceId(10)] -rebuilt : [ReferenceId(0), ReferenceId(1)] +after transform: [ReferenceId(12), ReferenceId(13)] +rebuilt : [ReferenceId(0), ReferenceId(1), ReferenceId(2)] tasks/coverage/typescript/tests/cases/conformance/jsx/tsxGenericAttributesType7.tsx semantic error: Missing SymbolId: "React" Missing ReferenceId: "require" Binding symbols mismatch: -after transform: ScopeId(0): [SymbolId(0), SymbolId(3), SymbolId(6), SymbolId(9), SymbolId(10)] -rebuilt : ScopeId(0): [SymbolId(0), SymbolId(1), SymbolId(2), SymbolId(3), SymbolId(5)] +after transform: ScopeId(0): [SymbolId(0), SymbolId(3), SymbolId(6), SymbolId(9), SymbolId(10), SymbolId(11)] +rebuilt : ScopeId(0): [SymbolId(0), SymbolId(1), SymbolId(2), SymbolId(3), SymbolId(4), SymbolId(6)] Scope children mismatch: after transform: ScopeId(0): [ScopeId(1), ScopeId(2), ScopeId(3)] rebuilt : ScopeId(0): [ScopeId(1), ScopeId(2)] @@ -52219,15 +52357,15 @@ Unresolved references mismatch: after transform: ["Component", "JSX", "require"] rebuilt : ["Component", "require"] Unresolved reference IDs mismatch for "require": -after transform: [ReferenceId(12)] -rebuilt : [ReferenceId(0), ReferenceId(1)] +after transform: [ReferenceId(15), ReferenceId(16)] +rebuilt : [ReferenceId(0), ReferenceId(1), ReferenceId(2)] tasks/coverage/typescript/tests/cases/conformance/jsx/tsxGenericAttributesType8.tsx semantic error: Missing SymbolId: "React" Missing ReferenceId: "require" Binding symbols mismatch: -after transform: ScopeId(0): [SymbolId(0), SymbolId(3), SymbolId(6), SymbolId(9), SymbolId(10)] -rebuilt : ScopeId(0): [SymbolId(0), SymbolId(1), SymbolId(2), SymbolId(3), SymbolId(5)] +after transform: ScopeId(0): [SymbolId(0), SymbolId(3), SymbolId(6), SymbolId(9), SymbolId(10), SymbolId(11)] +rebuilt : ScopeId(0): [SymbolId(0), SymbolId(1), SymbolId(2), SymbolId(3), SymbolId(4), SymbolId(6)] Scope children mismatch: after transform: ScopeId(0): [ScopeId(1), ScopeId(2), ScopeId(3)] rebuilt : ScopeId(0): [ScopeId(1), ScopeId(2)] @@ -52241,21 +52379,21 @@ Unresolved references mismatch: after transform: ["Component", "JSX", "require"] rebuilt : ["Component", "require"] Unresolved reference IDs mismatch for "require": -after transform: [ReferenceId(12)] -rebuilt : [ReferenceId(0), ReferenceId(1)] +after transform: [ReferenceId(14), ReferenceId(15)] +rebuilt : [ReferenceId(0), ReferenceId(1), ReferenceId(2)] tasks/coverage/typescript/tests/cases/conformance/jsx/tsxGenericAttributesType9.tsx semantic error: Missing SymbolId: "React" Missing ReferenceId: "require" Binding symbols mismatch: -after transform: ScopeId(0): [SymbolId(0), SymbolId(1), SymbolId(4), SymbolId(5)] -rebuilt : ScopeId(0): [SymbolId(0), SymbolId(1), SymbolId(2), SymbolId(3)] +after transform: ScopeId(0): [SymbolId(0), SymbolId(1), SymbolId(4), SymbolId(5), SymbolId(6)] +rebuilt : ScopeId(0): [SymbolId(0), SymbolId(1), SymbolId(2), SymbolId(3), SymbolId(4)] Bindings mismatch: after transform: ScopeId(1): ["Ctor", "P"] rebuilt : ScopeId(1): ["Ctor"] Reference symbol mismatch for "React": after transform: SymbolId(0) "React" -rebuilt : SymbolId(2) "React" +rebuilt : SymbolId(3) "React" Unresolved references mismatch: after transform: ["JSX"] rebuilt : ["require"] @@ -52419,8 +52557,8 @@ rebuilt : ["React"] tasks/coverage/typescript/tests/cases/conformance/jsx/tsxReactEmit2.tsx semantic error: Bindings mismatch: -after transform: ScopeId(0): ["JSX", "React", "_jsxFileName", "p1", "p2", "p3", "spreads1", "spreads2", "spreads3", "spreads4", "spreads5"] -rebuilt : ScopeId(0): ["_jsxFileName", "p1", "p2", "p3", "spreads1", "spreads2", "spreads3", "spreads4", "spreads5"] +after transform: ScopeId(0): ["JSX", "React", "_jsxFileName", "_objectSpread", "p1", "p2", "p3", "spreads1", "spreads2", "spreads3", "spreads4", "spreads5"] +rebuilt : ScopeId(0): ["_jsxFileName", "_objectSpread", "p1", "p2", "p3", "spreads1", "spreads2", "spreads3", "spreads4", "spreads5"] Scope children mismatch: after transform: ScopeId(0): [ScopeId(1)] rebuilt : ScopeId(0): [] @@ -52542,8 +52680,8 @@ rebuilt : ScopeId(0): ["_jsxFileName", "render"] tasks/coverage/typescript/tests/cases/conformance/jsx/tsxReactEmitSpreadAttribute.ts semantic error: Bindings mismatch: -after transform: ScopeId(0): ["T1", "T10", "T11", "T12", "T2", "T3", "T4", "T5", "T6", "T7", "T8", "T9", "__proto__", "_jsx", "_jsxFileName"] -rebuilt : ScopeId(0): ["T1", "T10", "T11", "T12", "T2", "T3", "T4", "T5", "T6", "T7", "T8", "T9", "_jsx", "_jsxFileName"] +after transform: ScopeId(0): ["T1", "T10", "T11", "T12", "T2", "T3", "T4", "T5", "T6", "T7", "T8", "T9", "__proto__", "_jsx", "_jsxFileName", "_objectSpread"] +rebuilt : ScopeId(0): ["T1", "T10", "T11", "T12", "T2", "T3", "T4", "T5", "T6", "T7", "T8", "T9", "_jsx", "_jsxFileName", "_objectSpread"] Reference symbol mismatch for "__proto__": after transform: SymbolId(36) "__proto__" rebuilt : @@ -52651,40 +52789,40 @@ tasks/coverage/typescript/tests/cases/conformance/jsx/tsxSpreadAttributesResolut semantic error: Missing SymbolId: "React" Missing ReferenceId: "require" Binding symbols mismatch: -after transform: ScopeId(0): [SymbolId(0), SymbolId(1), SymbolId(2), SymbolId(3), SymbolId(4), SymbolId(5), SymbolId(6)] -rebuilt : ScopeId(0): [SymbolId(0), SymbolId(1), SymbolId(2), SymbolId(3), SymbolId(4), SymbolId(5), SymbolId(6)] +after transform: ScopeId(0): [SymbolId(0), SymbolId(1), SymbolId(2), SymbolId(3), SymbolId(4), SymbolId(5), SymbolId(6), SymbolId(7)] +rebuilt : ScopeId(0): [SymbolId(0), SymbolId(1), SymbolId(2), SymbolId(3), SymbolId(4), SymbolId(5), SymbolId(6), SymbolId(7)] Reference symbol mismatch for "React": after transform: SymbolId(0) "React" -rebuilt : SymbolId(2) "React" +rebuilt : SymbolId(3) "React" Unresolved reference IDs mismatch for "require": -after transform: [ReferenceId(10)] -rebuilt : [ReferenceId(0), ReferenceId(1)] +after transform: [ReferenceId(11), ReferenceId(12)] +rebuilt : [ReferenceId(0), ReferenceId(1), ReferenceId(2)] tasks/coverage/typescript/tests/cases/conformance/jsx/tsxSpreadAttributesResolution11.tsx semantic error: Missing SymbolId: "React" Missing ReferenceId: "require" Bindings mismatch: -after transform: ScopeId(0): ["OverWriteAttr", "Prop", "React", "_jsxFileName", "_reactJsxRuntime", "anyobj", "obj", "obj1", "obj3", "x", "x1", "x2", "x3", "x4", "x5"] -rebuilt : ScopeId(0): ["OverWriteAttr", "React", "_jsxFileName", "_reactJsxRuntime", "anyobj", "obj", "obj1", "obj3", "x", "x1", "x2", "x3", "x4", "x5"] +after transform: ScopeId(0): ["OverWriteAttr", "Prop", "React", "_jsxFileName", "_objectSpread", "_reactJsxRuntime", "anyobj", "obj", "obj1", "obj3", "x", "x1", "x2", "x3", "x4", "x5"] +rebuilt : ScopeId(0): ["OverWriteAttr", "React", "_jsxFileName", "_objectSpread", "_reactJsxRuntime", "anyobj", "obj", "obj1", "obj3", "x", "x1", "x2", "x3", "x4", "x5"] Scope children mismatch: after transform: ScopeId(0): [ScopeId(1), ScopeId(2)] rebuilt : ScopeId(0): [ScopeId(1)] Reference symbol mismatch for "React": after transform: SymbolId(0) "React" -rebuilt : SymbolId(2) "React" +rebuilt : SymbolId(3) "React" Unresolved references mismatch: after transform: ["require", "true"] rebuilt : ["require"] Unresolved reference IDs mismatch for "require": -after transform: [ReferenceId(31)] -rebuilt : [ReferenceId(0), ReferenceId(1)] +after transform: [ReferenceId(40), ReferenceId(41)] +rebuilt : [ReferenceId(0), ReferenceId(1), ReferenceId(2)] tasks/coverage/typescript/tests/cases/conformance/jsx/tsxSpreadAttributesResolution13.tsx semantic error: Missing SymbolId: "React" Missing ReferenceId: "require" Bindings mismatch: -after transform: ScopeId(0): ["AnotherComponentProps", "ChildComponent", "Component", "ComponentProps", "React", "_jsx", "_jsxFileName"] -rebuilt : ScopeId(0): ["ChildComponent", "Component", "React", "_jsx", "_jsxFileName"] +after transform: ScopeId(0): ["AnotherComponentProps", "ChildComponent", "Component", "ComponentProps", "React", "_jsx", "_jsxFileName", "_objectSpread"] +rebuilt : ScopeId(0): ["ChildComponent", "Component", "React", "_jsx", "_jsxFileName", "_objectSpread"] Scope children mismatch: after transform: ScopeId(0): [ScopeId(1), ScopeId(2), ScopeId(5), ScopeId(6)] rebuilt : ScopeId(0): [ScopeId(1), ScopeId(4)] @@ -52696,8 +52834,8 @@ tasks/coverage/typescript/tests/cases/conformance/jsx/tsxSpreadAttributesResolut semantic error: Missing SymbolId: "React" Missing ReferenceId: "require" Bindings mismatch: -after transform: ScopeId(0): ["AnotherComponent", "AnotherComponentProps", "Component", "ComponentProps", "React", "_jsx", "_jsxFileName"] -rebuilt : ScopeId(0): ["AnotherComponent", "Component", "React", "_jsx", "_jsxFileName"] +after transform: ScopeId(0): ["AnotherComponent", "AnotherComponentProps", "Component", "ComponentProps", "React", "_jsx", "_jsxFileName", "_objectSpread"] +rebuilt : ScopeId(0): ["AnotherComponent", "Component", "React", "_jsx", "_jsxFileName", "_objectSpread"] Scope children mismatch: after transform: ScopeId(0): [ScopeId(1), ScopeId(2), ScopeId(3), ScopeId(4)] rebuilt : ScopeId(0): [ScopeId(1), ScopeId(2)] @@ -52709,68 +52847,68 @@ tasks/coverage/typescript/tests/cases/conformance/jsx/tsxSpreadAttributesResolut semantic error: Missing SymbolId: "React" Missing ReferenceId: "require" Bindings mismatch: -after transform: ScopeId(0): ["Poisoned", "PoisonedProp", "React", "_jsxFileName", "_reactJsxRuntime", "obj", "p", "y"] -rebuilt : ScopeId(0): ["Poisoned", "React", "_jsxFileName", "_reactJsxRuntime", "obj", "p", "y"] +after transform: ScopeId(0): ["Poisoned", "PoisonedProp", "React", "_jsxFileName", "_objectSpread", "_reactJsxRuntime", "obj", "p", "y"] +rebuilt : ScopeId(0): ["Poisoned", "React", "_jsxFileName", "_objectSpread", "_reactJsxRuntime", "obj", "p", "y"] Scope children mismatch: after transform: ScopeId(0): [ScopeId(1), ScopeId(2)] rebuilt : ScopeId(0): [ScopeId(1)] Reference symbol mismatch for "React": after transform: SymbolId(0) "React" -rebuilt : SymbolId(2) "React" +rebuilt : SymbolId(3) "React" Unresolved reference IDs mismatch for "require": -after transform: [ReferenceId(11)] -rebuilt : [ReferenceId(0), ReferenceId(1)] +after transform: [ReferenceId(12), ReferenceId(13)] +rebuilt : [ReferenceId(0), ReferenceId(1), ReferenceId(2)] tasks/coverage/typescript/tests/cases/conformance/jsx/tsxSpreadAttributesResolution7.tsx semantic error: Missing SymbolId: "React" Missing ReferenceId: "require" Bindings mismatch: -after transform: ScopeId(0): ["React", "TextComponent", "TextProps", "_jsxFileName", "_reactJsxRuntime", "textPropsFalse", "textPropsTrue", "y1", "y2"] -rebuilt : ScopeId(0): ["React", "TextComponent", "_jsxFileName", "_reactJsxRuntime", "textPropsFalse", "textPropsTrue", "y1", "y2"] +after transform: ScopeId(0): ["React", "TextComponent", "TextProps", "_jsxFileName", "_objectSpread", "_reactJsxRuntime", "textPropsFalse", "textPropsTrue", "y1", "y2"] +rebuilt : ScopeId(0): ["React", "TextComponent", "_jsxFileName", "_objectSpread", "_reactJsxRuntime", "textPropsFalse", "textPropsTrue", "y1", "y2"] Scope children mismatch: after transform: ScopeId(0): [ScopeId(1), ScopeId(2), ScopeId(4)] rebuilt : ScopeId(0): [ScopeId(1), ScopeId(3)] Reference symbol mismatch for "React": after transform: SymbolId(0) "React" -rebuilt : SymbolId(2) "React" +rebuilt : SymbolId(3) "React" Unresolved references mismatch: after transform: ["require", "true"] rebuilt : ["require"] Unresolved reference IDs mismatch for "require": -after transform: [ReferenceId(15)] -rebuilt : [ReferenceId(0), ReferenceId(1)] +after transform: [ReferenceId(17), ReferenceId(18)] +rebuilt : [ReferenceId(0), ReferenceId(1), ReferenceId(2)] tasks/coverage/typescript/tests/cases/conformance/jsx/tsxSpreadAttributesResolution8.tsx semantic error: Missing SymbolId: "React" Missing ReferenceId: "require" Bindings mismatch: -after transform: ScopeId(0): ["OverWriteAttr", "Prop", "React", "_jsxFileName", "_reactJsxRuntime", "obj", "obj1", "obj3", "x", "x1"] -rebuilt : ScopeId(0): ["OverWriteAttr", "React", "_jsxFileName", "_reactJsxRuntime", "obj", "obj1", "obj3", "x", "x1"] +after transform: ScopeId(0): ["OverWriteAttr", "Prop", "React", "_jsxFileName", "_objectSpread", "_reactJsxRuntime", "obj", "obj1", "obj3", "x", "x1"] +rebuilt : ScopeId(0): ["OverWriteAttr", "React", "_jsxFileName", "_objectSpread", "_reactJsxRuntime", "obj", "obj1", "obj3", "x", "x1"] Scope children mismatch: after transform: ScopeId(0): [ScopeId(1), ScopeId(2)] rebuilt : ScopeId(0): [ScopeId(1)] Reference symbol mismatch for "React": after transform: SymbolId(0) "React" -rebuilt : SymbolId(2) "React" +rebuilt : SymbolId(3) "React" Unresolved reference IDs mismatch for "require": -after transform: [ReferenceId(14)] -rebuilt : [ReferenceId(0), ReferenceId(1)] +after transform: [ReferenceId(18), ReferenceId(19)] +rebuilt : [ReferenceId(0), ReferenceId(1), ReferenceId(2)] tasks/coverage/typescript/tests/cases/conformance/jsx/tsxSpreadAttributesResolution9.tsx semantic error: Missing SymbolId: "React" Missing ReferenceId: "require" Bindings mismatch: -after transform: ScopeId(0): ["Opt", "OptionProp", "React", "_jsxFileName", "_reactJsxRuntime", "obj", "obj1", "p", "y", "y1", "y2", "y3"] -rebuilt : ScopeId(0): ["Opt", "React", "_jsxFileName", "_reactJsxRuntime", "obj", "obj1", "p", "y", "y1", "y2", "y3"] +after transform: ScopeId(0): ["Opt", "OptionProp", "React", "_jsxFileName", "_objectSpread", "_reactJsxRuntime", "obj", "obj1", "p", "y", "y1", "y2", "y3"] +rebuilt : ScopeId(0): ["Opt", "React", "_jsxFileName", "_objectSpread", "_reactJsxRuntime", "obj", "obj1", "p", "y", "y1", "y2", "y3"] Scope children mismatch: after transform: ScopeId(0): [ScopeId(1), ScopeId(2)] rebuilt : ScopeId(0): [ScopeId(1)] Reference symbol mismatch for "React": after transform: SymbolId(0) "React" -rebuilt : SymbolId(2) "React" +rebuilt : SymbolId(3) "React" Unresolved reference IDs mismatch for "require": -after transform: [ReferenceId(24)] -rebuilt : [ReferenceId(0), ReferenceId(1)] +after transform: [ReferenceId(28), ReferenceId(29)] +rebuilt : [ReferenceId(0), ReferenceId(1), ReferenceId(2)] tasks/coverage/typescript/tests/cases/conformance/jsx/tsxSpreadChildren.tsx semantic error: Spread children are not supported in React. @@ -52783,8 +52921,8 @@ tasks/coverage/typescript/tests/cases/conformance/jsx/tsxStatelessFunctionCompon semantic error: Missing SymbolId: "React" Missing ReferenceId: "require" Binding symbols mismatch: -after transform: ScopeId(0): [SymbolId(0), SymbolId(2), SymbolId(3), SymbolId(4), SymbolId(5), SymbolId(6), SymbolId(7), SymbolId(8), SymbolId(9), SymbolId(10), SymbolId(11), SymbolId(12), SymbolId(13), SymbolId(14), SymbolId(15), SymbolId(16), SymbolId(17)] -rebuilt : ScopeId(0): [SymbolId(0), SymbolId(1), SymbolId(2), SymbolId(3), SymbolId(4), SymbolId(5), SymbolId(6), SymbolId(7), SymbolId(8), SymbolId(9), SymbolId(10), SymbolId(11), SymbolId(12), SymbolId(13), SymbolId(14), SymbolId(15), SymbolId(16)] +after transform: ScopeId(0): [SymbolId(0), SymbolId(2), SymbolId(3), SymbolId(4), SymbolId(5), SymbolId(6), SymbolId(7), SymbolId(8), SymbolId(9), SymbolId(10), SymbolId(11), SymbolId(12), SymbolId(13), SymbolId(14), SymbolId(15), SymbolId(16), SymbolId(17), SymbolId(18)] +rebuilt : ScopeId(0): [SymbolId(0), SymbolId(1), SymbolId(2), SymbolId(3), SymbolId(4), SymbolId(5), SymbolId(6), SymbolId(7), SymbolId(8), SymbolId(9), SymbolId(10), SymbolId(11), SymbolId(12), SymbolId(13), SymbolId(14), SymbolId(15), SymbolId(16), SymbolId(17)] Scope children mismatch: after transform: ScopeId(0): [ScopeId(1), ScopeId(2)] rebuilt : ScopeId(0): [] @@ -52792,13 +52930,13 @@ Unresolved references mismatch: after transform: ["JSX", "OneThing", "require"] rebuilt : ["OneThing", "require"] Unresolved reference IDs mismatch for "require": -after transform: [ReferenceId(40)] -rebuilt : [ReferenceId(0), ReferenceId(1)] +after transform: [ReferenceId(51), ReferenceId(52)] +rebuilt : [ReferenceId(0), ReferenceId(1), ReferenceId(2)] tasks/coverage/typescript/tests/cases/conformance/jsx/tsxStatelessFunctionComponentOverload3.tsx semantic error: Bindings mismatch: -after transform: ScopeId(0): ["Context", "_jsxFileName", "_reactJsxRuntime", "obj2", "three1", "three2", "three3", "two1", "two2", "two3", "two4", "two5"] -rebuilt : ScopeId(0): ["_jsxFileName", "_reactJsxRuntime", "obj2", "three1", "three2", "three3", "two1", "two2", "two3", "two4", "two5"] +after transform: ScopeId(0): ["Context", "_jsxFileName", "_objectSpread", "_reactJsxRuntime", "obj2", "three1", "three2", "three3", "two1", "two2", "two3", "two4", "two5"] +rebuilt : ScopeId(0): ["_jsxFileName", "_objectSpread", "_reactJsxRuntime", "obj2", "three1", "three2", "three3", "two1", "two2", "two3", "two4", "two5"] Scope children mismatch: after transform: ScopeId(0): [ScopeId(1), ScopeId(2), ScopeId(3), ScopeId(4), ScopeId(5), ScopeId(6)] rebuilt : ScopeId(0): [] @@ -52810,8 +52948,8 @@ tasks/coverage/typescript/tests/cases/conformance/jsx/tsxStatelessFunctionCompon semantic error: Missing SymbolId: "React" Missing ReferenceId: "require" Bindings mismatch: -after transform: ScopeId(0): ["ButtonProps", "ClickableProps", "HyphenProps", "LinkProps", "MainButton", "React", "_jsx", "_jsxFileName", "b0", "b1", "b10", "b11", "b12", "b2", "b3", "b4", "b5", "b6", "b7", "b8", "b9", "obj", "obj1", "obj2"] -rebuilt : ScopeId(0): ["MainButton", "React", "_jsx", "_jsxFileName", "b0", "b1", "b10", "b11", "b12", "b2", "b3", "b4", "b5", "b6", "b7", "b8", "b9", "obj", "obj1", "obj2"] +after transform: ScopeId(0): ["ButtonProps", "ClickableProps", "HyphenProps", "LinkProps", "MainButton", "React", "_jsx", "_jsxFileName", "_objectSpread", "b0", "b1", "b10", "b11", "b12", "b2", "b3", "b4", "b5", "b6", "b7", "b8", "b9", "obj", "obj1", "obj2"] +rebuilt : ScopeId(0): ["MainButton", "React", "_jsx", "_jsxFileName", "_objectSpread", "b0", "b1", "b10", "b11", "b12", "b2", "b3", "b4", "b5", "b6", "b7", "b8", "b9", "obj", "obj1", "obj2"] Scope children mismatch: after transform: ScopeId(0): [ScopeId(1), ScopeId(2), ScopeId(3), ScopeId(4), ScopeId(5), ScopeId(6), ScopeId(7), ScopeId(8), ScopeId(9), ScopeId(11), ScopeId(12), ScopeId(13), ScopeId(14)] rebuilt : ScopeId(0): [ScopeId(1), ScopeId(2), ScopeId(4), ScopeId(5), ScopeId(6), ScopeId(7)] @@ -52868,8 +53006,8 @@ tasks/coverage/typescript/tests/cases/conformance/jsx/tsxStatelessFunctionCompon semantic error: Missing SymbolId: "React" Missing ReferenceId: "require" Binding symbols mismatch: -after transform: ScopeId(0): [SymbolId(0), SymbolId(7), SymbolId(23), SymbolId(29), SymbolId(30)] -rebuilt : ScopeId(0): [SymbolId(0), SymbolId(1), SymbolId(2), SymbolId(3), SymbolId(13)] +after transform: ScopeId(0): [SymbolId(0), SymbolId(7), SymbolId(23), SymbolId(29), SymbolId(30), SymbolId(31)] +rebuilt : ScopeId(0): [SymbolId(0), SymbolId(1), SymbolId(2), SymbolId(3), SymbolId(4), SymbolId(14)] Scope children mismatch: after transform: ScopeId(0): [ScopeId(1), ScopeId(2), ScopeId(3), ScopeId(4), ScopeId(5), ScopeId(6), ScopeId(7)] rebuilt : ScopeId(0): [ScopeId(1), ScopeId(2)] @@ -52880,15 +53018,15 @@ Unresolved references mismatch: after transform: ["JSX", "Link", "OverloadComponent", "require"] rebuilt : ["Link", "OverloadComponent", "require"] Unresolved reference IDs mismatch for "require": -after transform: [ReferenceId(48)] -rebuilt : [ReferenceId(0), ReferenceId(1)] +after transform: [ReferenceId(59), ReferenceId(60)] +rebuilt : [ReferenceId(0), ReferenceId(1), ReferenceId(2)] tasks/coverage/typescript/tests/cases/conformance/jsx/tsxStatelessFunctionComponentsWithTypeArguments5.tsx semantic error: Missing SymbolId: "React" Missing ReferenceId: "require" Binding symbols mismatch: -after transform: ScopeId(0): [SymbolId(0), SymbolId(3), SymbolId(12), SymbolId(19), SymbolId(20)] -rebuilt : ScopeId(0): [SymbolId(0), SymbolId(1), SymbolId(2), SymbolId(3), SymbolId(7)] +after transform: ScopeId(0): [SymbolId(0), SymbolId(3), SymbolId(12), SymbolId(19), SymbolId(20), SymbolId(21)] +rebuilt : ScopeId(0): [SymbolId(0), SymbolId(1), SymbolId(2), SymbolId(3), SymbolId(4), SymbolId(8)] Scope children mismatch: after transform: ScopeId(0): [ScopeId(1), ScopeId(2), ScopeId(3), ScopeId(4), ScopeId(5)] rebuilt : ScopeId(0): [ScopeId(1), ScopeId(2)] @@ -52902,8 +53040,8 @@ Unresolved references mismatch: after transform: ["Component", "ComponentSpecific", "ComponentSpecific1", "JSX", "require"] rebuilt : ["Component", "ComponentSpecific", "ComponentSpecific1", "require"] Unresolved reference IDs mismatch for "require": -after transform: [ReferenceId(32)] -rebuilt : [ReferenceId(0), ReferenceId(1)] +after transform: [ReferenceId(43), ReferenceId(44)] +rebuilt : [ReferenceId(0), ReferenceId(1), ReferenceId(2)] tasks/coverage/typescript/tests/cases/conformance/jsx/tsxTypeArgumentsJsxPreserveOutput.tsx semantic error: Missing SymbolId: "React" @@ -55206,8 +55344,8 @@ rebuilt : SymbolId(0): [ReferenceId(7), ReferenceId(52), ReferenceId(54), tasks/coverage/typescript/tests/cases/conformance/types/literal/literalTypeWidening.ts semantic error: Bindings mismatch: -after transform: ScopeId(0): ["E", "FAILURE", "LangCode", "Obj", "Result", "Set", "TestEvent", "a", "arr", "b", "doWork", "f1", "f2", "f3", "f4", "f5", "f6", "increment", "isFailure", "isSuccess", "keys", "langCodeSet", "langCodes", "onMouseOver", "result", "test", "x"] -rebuilt : ScopeId(0): ["E", "FAILURE", "Set", "a", "arr", "b", "doWork", "f1", "f2", "f3", "f4", "f5", "f6", "increment", "isFailure", "isSuccess", "keys", "langCodeSet", "langCodes", "onMouseOver", "result", "test", "x"] +after transform: ScopeId(0): ["E", "FAILURE", "LangCode", "Obj", "Result", "Set", "TestEvent", "_excluded", "_objectSpread", "_objectWithoutProperties", "a", "arr", "b", "doWork", "f1", "f2", "f3", "f4", "f5", "f6", "increment", "isFailure", "isSuccess", "keys", "langCodeSet", "langCodes", "onMouseOver", "result", "test", "x"] +rebuilt : ScopeId(0): ["E", "FAILURE", "Set", "_excluded", "_objectSpread", "_objectWithoutProperties", "a", "arr", "b", "doWork", "f1", "f2", "f3", "f4", "f5", "f6", "increment", "isFailure", "isSuccess", "keys", "langCodeSet", "langCodes", "onMouseOver", "result", "test", "x"] Scope children mismatch: after transform: ScopeId(0): [ScopeId(1), ScopeId(2), ScopeId(3), ScopeId(4), ScopeId(5), ScopeId(6), ScopeId(7), ScopeId(8), ScopeId(9), ScopeId(10), ScopeId(11), ScopeId(12), ScopeId(13), ScopeId(14), ScopeId(15), ScopeId(16), ScopeId(17), ScopeId(18), ScopeId(20), ScopeId(21), ScopeId(22), ScopeId(23), ScopeId(24), ScopeId(25), ScopeId(26)] rebuilt : ScopeId(0): [ScopeId(1), ScopeId(2), ScopeId(3), ScopeId(4), ScopeId(5), ScopeId(6), ScopeId(7), ScopeId(8), ScopeId(9), ScopeId(10), ScopeId(11), ScopeId(12), ScopeId(13), ScopeId(15), ScopeId(16), ScopeId(17), ScopeId(18)] @@ -55237,25 +55375,25 @@ after transform: ScopeId(26): ScopeFlags(StrictMode) rebuilt : ScopeId(18): ScopeFlags(StrictMode | Function) Symbol flags mismatch for "FAILURE": after transform: SymbolId(63): SymbolFlags(BlockScopedVariable | ConstVariable | TypeAlias) -rebuilt : SymbolId(59): SymbolFlags(BlockScopedVariable | ConstVariable) +rebuilt : SymbolId(62): SymbolFlags(BlockScopedVariable | ConstVariable) Symbol span mismatch for "FAILURE": after transform: SymbolId(63): Span { start: 2229, end: 2236 } -rebuilt : SymbolId(59): Span { start: 2256, end: 2263 } +rebuilt : SymbolId(62): Span { start: 2256, end: 2263 } Symbol reference IDs mismatch for "FAILURE": after transform: SymbolId(63): [ReferenceId(55), ReferenceId(58), ReferenceId(66), ReferenceId(68)] -rebuilt : SymbolId(59): [ReferenceId(50), ReferenceId(54)] +rebuilt : SymbolId(62): [ReferenceId(50), ReferenceId(54)] Symbol redeclarations mismatch for "FAILURE": after transform: SymbolId(63): [Span { start: 2256, end: 2263 }] -rebuilt : SymbolId(59): [] +rebuilt : SymbolId(62): [] Symbol reference IDs mismatch for "langCodeSet": after transform: SymbolId(90): [ReferenceId(97), ReferenceId(99)] -rebuilt : SymbolId(76): [ReferenceId(70)] +rebuilt : SymbolId(79): [ReferenceId(70)] Symbol flags mismatch for "E": after transform: SymbolId(102): SymbolFlags(RegularEnum) -rebuilt : SymbolId(84): SymbolFlags(FunctionScopedVariable) +rebuilt : SymbolId(87): SymbolFlags(FunctionScopedVariable) Symbol reference IDs mismatch for "E": -after transform: SymbolId(102): [ReferenceId(112), ReferenceId(113), ReferenceId(120)] -rebuilt : SymbolId(84): [ReferenceId(80), ReferenceId(82)] +after transform: SymbolId(102): [ReferenceId(112), ReferenceId(113), ReferenceId(124)] +rebuilt : SymbolId(87): [ReferenceId(84), ReferenceId(86)] Unresolved references mismatch: after transform: ["NonNullable", "Object", "Record", "f", "nonWidening", "true", "widening"] rebuilt : ["Object", "f", "nonWidening", "widening"] @@ -55692,8 +55830,8 @@ rebuilt : ["applySpec", "clone", "f20", "f21", "f22", "f23", "f24", "vali tasks/coverage/typescript/tests/cases/conformance/types/mapped/mappedTypeConstraints.ts semantic error: Bindings mismatch: -after transform: ScopeId(0): ["TargetProps", "f0", "f1", "f2", "f3", "f4", "modifier"] -rebuilt : ScopeId(0): ["f0", "f1", "f2", "f3", "f4", "modifier"] +after transform: ScopeId(0): ["TargetProps", "_excluded", "_objectWithoutProperties", "f0", "f1", "f2", "f3", "f4", "modifier"] +rebuilt : ScopeId(0): ["_excluded", "_objectWithoutProperties", "f0", "f1", "f2", "f3", "f4", "modifier"] Scope children mismatch: after transform: ScopeId(0): [ScopeId(1), ScopeId(2), ScopeId(3), ScopeId(4), ScopeId(5), ScopeId(6), ScopeId(7)] rebuilt : ScopeId(0): [ScopeId(1), ScopeId(2), ScopeId(3), ScopeId(4), ScopeId(5), ScopeId(6)] @@ -55716,8 +55854,8 @@ Bindings mismatch: after transform: ScopeId(7): ["T", "bar", "rest", "targetProps"] rebuilt : ScopeId(6): ["bar", "rest", "targetProps"] Unresolved references mismatch: -after transform: ["Exclude", "Extract", "Pick", "Record"] -rebuilt : [] +after transform: ["Exclude", "Extract", "Pick", "Record", "require"] +rebuilt : ["require"] tasks/coverage/typescript/tests/cases/conformance/types/mapped/mappedTypeIndexSignatureModifiers.ts semantic error: Bindings mismatch: @@ -56581,8 +56719,8 @@ rebuilt : [ReferenceId(1)] tasks/coverage/typescript/tests/cases/conformance/types/rest/genericObjectRest.ts semantic error: Bindings mismatch: -after transform: ScopeId(0): ["Item", "a", "f1", "f2", "f3", "f4", "sa", "sb"] -rebuilt : ScopeId(0): ["a", "f1", "f2", "f3", "f4", "sa", "sb"] +after transform: ScopeId(0): ["Item", "_excluded", "_excluded2", "_excluded3", "_excluded4", "_extends", "_objectDestructuringEmpty", "_objectWithoutProperties", "_toPropertyKey", "a", "f1", "f2", "f3", "f4", "sa", "sb"] +rebuilt : ScopeId(0): ["_excluded", "_excluded2", "_excluded3", "_excluded4", "_extends", "_objectDestructuringEmpty", "_objectWithoutProperties", "_toPropertyKey", "a", "f1", "f2", "f3", "f4", "sa", "sb"] Scope children mismatch: after transform: ScopeId(0): [ScopeId(1), ScopeId(2), ScopeId(3), ScopeId(4), ScopeId(5)] rebuilt : ScopeId(0): [ScopeId(1), ScopeId(2), ScopeId(3), ScopeId(4)] @@ -56599,11 +56737,11 @@ Bindings mismatch: after transform: ScopeId(5): ["K1", "K2", "a1", "a2", "k1", "k2", "obj", "r1"] rebuilt : ScopeId(4): ["a1", "a2", "k1", "k2", "obj", "r1"] Symbol reference IDs mismatch for "sa": -after transform: SymbolId(16): [ReferenceId(10), ReferenceId(13)] -rebuilt : SymbolId(15): [ReferenceId(9)] +after transform: SymbolId(16): [ReferenceId(10), ReferenceId(13), ReferenceId(51)] +rebuilt : SymbolId(23): [ReferenceId(32), ReferenceId(37)] Symbol reference IDs mismatch for "sb": -after transform: SymbolId(17): [ReferenceId(11), ReferenceId(14)] -rebuilt : SymbolId(16): [ReferenceId(10)] +after transform: SymbolId(17): [ReferenceId(11), ReferenceId(14), ReferenceId(52)] +rebuilt : SymbolId(24): [ReferenceId(33), ReferenceId(38)] tasks/coverage/typescript/tests/cases/conformance/types/rest/genericRestParameters2.ts semantic error: Bindings mismatch: @@ -56873,6 +57011,23 @@ semantic error: Scope children mismatch: after transform: ScopeId(0): [ScopeId(1), ScopeId(2)] rebuilt : ScopeId(0): [ScopeId(1)] +tasks/coverage/typescript/tests/cases/conformance/types/rest/objectRestForOf.ts +semantic error: Bindings mismatch: +after transform: ScopeId(0): ["_excluded", "_excluded2", "_objectSpread", "_objectWithoutProperties", "array", "rrestOff", "xx"] +rebuilt : ScopeId(0): ["_excluded", "_excluded2", "_objectSpread", "_objectWithoutProperties", "_ref2", "_ref3", "array", "rrestOff", "xx"] +Bindings mismatch: +after transform: ScopeId(3): ["_ref2"] +rebuilt : ScopeId(3): [] +Bindings mismatch: +after transform: ScopeId(4): ["_ref3"] +rebuilt : ScopeId(4): [] +Symbol scope ID mismatch for "_ref2": +after transform: SymbolId(10): ScopeId(3) +rebuilt : SymbolId(10): ScopeId(0) +Symbol scope ID mismatch for "_ref3": +after transform: SymbolId(11): ScopeId(4) +rebuilt : SymbolId(11): ScopeId(0) + tasks/coverage/typescript/tests/cases/conformance/types/rest/objectRestParameter.ts semantic error: Scope children mismatch: after transform: ScopeId(0): [ScopeId(1), ScopeId(2), ScopeId(3), ScopeId(4), ScopeId(5), ScopeId(8)] @@ -56885,14 +57040,14 @@ rebuilt : ScopeId(0): [ScopeId(1), ScopeId(2), ScopeId(3), ScopeId(4), Sc tasks/coverage/typescript/tests/cases/conformance/types/rest/objectRestReadonly.ts semantic error: Bindings mismatch: -after transform: ScopeId(0): ["ObjType", "foo", "obj", "rest"] -rebuilt : ScopeId(0): ["foo", "obj", "rest"] +after transform: ScopeId(0): ["ObjType", "_objectWithoutProperties", "foo", "obj", "rest"] +rebuilt : ScopeId(0): ["_objectWithoutProperties", "foo", "obj", "rest"] Scope children mismatch: after transform: ScopeId(0): [ScopeId(1)] rebuilt : ScopeId(0): [] Unresolved references mismatch: -after transform: ["Readonly"] -rebuilt : [] +after transform: ["Readonly", "require"] +rebuilt : ["require"] tasks/coverage/typescript/tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayOfFunctionTypes3.ts semantic error: Bindings mismatch: @@ -57021,8 +57176,8 @@ rebuilt : [] tasks/coverage/typescript/tests/cases/conformance/types/spread/objectSpread.ts semantic error: Bindings mismatch: -after transform: ScopeId(0): ["C", "Header", "a", "addAfter", "addBefore", "anything", "c", "changeTypeAfter", "changeTypeBoth", "combined", "combinedAfter", "combinedNestedChangeType", "conditionalSpreadBoolean", "conditionalSpreadNumber", "conditionalSpreadString", "container", "cplus", "exclusive", "f", "from16326", "genericSpread", "getter", "nested", "o", "o2", "op", "overlap", "overlapConflict", "override", "overwriteId", "propertyNested", "shortCutted", "spreadAny", "spreadC", "spreadFunc", "spreadNonPrimitive", "swap"] -rebuilt : ScopeId(0): ["C", "a", "addAfter", "addBefore", "anything", "c", "changeTypeAfter", "changeTypeBoth", "combined", "combinedAfter", "combinedNestedChangeType", "conditionalSpreadBoolean", "conditionalSpreadNumber", "conditionalSpreadString", "container", "cplus", "exclusive", "f", "from16326", "genericSpread", "getter", "nested", "o", "o2", "op", "overlap", "overlapConflict", "override", "overwriteId", "propertyNested", "shortCutted", "spreadAny", "spreadC", "spreadFunc", "spreadNonPrimitive", "swap"] +after transform: ScopeId(0): ["C", "Header", "_objectSpread", "a", "addAfter", "addBefore", "anything", "c", "changeTypeAfter", "changeTypeBoth", "combined", "combinedAfter", "combinedNestedChangeType", "conditionalSpreadBoolean", "conditionalSpreadNumber", "conditionalSpreadString", "container", "cplus", "exclusive", "f", "from16326", "genericSpread", "getter", "nested", "o", "o2", "op", "overlap", "overlapConflict", "override", "overwriteId", "propertyNested", "shortCutted", "spreadAny", "spreadC", "spreadFunc", "spreadNonPrimitive", "swap"] +rebuilt : ScopeId(0): ["C", "_objectSpread", "a", "addAfter", "addBefore", "anything", "c", "changeTypeAfter", "changeTypeBoth", "combined", "combinedAfter", "combinedNestedChangeType", "conditionalSpreadBoolean", "conditionalSpreadNumber", "conditionalSpreadString", "container", "cplus", "exclusive", "f", "from16326", "genericSpread", "getter", "nested", "o", "o2", "op", "overlap", "overlapConflict", "override", "overwriteId", "propertyNested", "shortCutted", "spreadAny", "spreadC", "spreadFunc", "spreadNonPrimitive", "swap"] Scope children mismatch: after transform: ScopeId(0): [ScopeId(1), ScopeId(2), ScopeId(3), ScopeId(4), ScopeId(5), ScopeId(6), ScopeId(7), ScopeId(8), ScopeId(10), ScopeId(11), ScopeId(12), ScopeId(13), ScopeId(14)] rebuilt : ScopeId(0): [ScopeId(1), ScopeId(2), ScopeId(3), ScopeId(4), ScopeId(5), ScopeId(6), ScopeId(7), ScopeId(9), ScopeId(10), ScopeId(11), ScopeId(12)] @@ -57034,28 +57189,33 @@ after transform: ScopeId(14): ["T", "U", "obj", "t", "u", "v", "w", "x01", "x02" rebuilt : ScopeId(12): ["obj", "t", "u", "v", "w", "x01", "x02", "x03", "x04", "x05", "x06", "x07", "x09", "x10", "x11", "x12", "x13", "x14", "x15", "x16", "x17", "x18"] Symbol reference IDs mismatch for "C": after transform: SymbolId(32): [ReferenceId(36), ReferenceId(37)] -rebuilt : SymbolId(31): [ReferenceId(33)] +rebuilt : SymbolId(32): [ReferenceId(67)] + +tasks/coverage/typescript/tests/cases/conformance/types/spread/objectSpreadNoTransform.ts +semantic error: Reference flags mismatch for "b": +after transform: ReferenceId(1): ReferenceFlags(Write) +rebuilt : ReferenceId(6): ReferenceFlags(Read | Write) tasks/coverage/typescript/tests/cases/conformance/types/spread/objectSpreadRepeatedComplexity.ts semantic error: Unresolved references mismatch: -after transform: ["Record"] -rebuilt : [] +after transform: ["Record", "require"] +rebuilt : ["require"] tasks/coverage/typescript/tests/cases/conformance/types/spread/objectSpreadRepeatedNullCheckPerf.ts semantic error: Bindings mismatch: -after transform: ScopeId(0): ["Props", "parseWithSpread"] -rebuilt : ScopeId(0): ["parseWithSpread"] +after transform: ScopeId(0): ["Props", "_objectSpread", "parseWithSpread"] +rebuilt : ScopeId(0): ["_objectSpread", "parseWithSpread"] Scope children mismatch: after transform: ScopeId(0): [ScopeId(1), ScopeId(2)] rebuilt : ScopeId(0): [ScopeId(1)] Unresolved references mismatch: -after transform: ["Record", "undefined"] -rebuilt : ["undefined"] +after transform: ["Record", "require", "undefined"] +rebuilt : ["require", "undefined"] tasks/coverage/typescript/tests/cases/conformance/types/spread/spreadContextualTypedBindingPattern.ts semantic error: Bindings mismatch: -after transform: ScopeId(0): ["Person", "age", "alice", "bob", "naam"] -rebuilt : ScopeId(0): ["age", "naam"] +after transform: ScopeId(0): ["Person", "_objectSpread", "age", "alice", "bob", "naam"] +rebuilt : ScopeId(0): ["_objectSpread", "age", "naam"] Scope children mismatch: after transform: ScopeId(0): [ScopeId(1)] rebuilt : ScopeId(0): [] @@ -57066,32 +57226,32 @@ Reference symbol mismatch for "alice": after transform: SymbolId(2) "alice" rebuilt : Unresolved references mismatch: -after transform: [] -rebuilt : ["alice", "bob"] +after transform: ["require"] +rebuilt : ["alice", "bob", "require"] tasks/coverage/typescript/tests/cases/conformance/types/spread/spreadExcessProperty.ts semantic error: Bindings mismatch: -after transform: ScopeId(0): ["A", "a1", "extra1"] -rebuilt : ScopeId(0): ["a1", "extra1"] +after transform: ScopeId(0): ["A", "_objectSpread", "a1", "extra1"] +rebuilt : ScopeId(0): ["_objectSpread", "a1", "extra1"] Scope children mismatch: after transform: ScopeId(0): [ScopeId(1)] rebuilt : ScopeId(0): [] tasks/coverage/typescript/tests/cases/conformance/types/spread/spreadNonPrimitive.ts semantic error: Bindings mismatch: -after transform: ScopeId(0): ["o", "x"] -rebuilt : ScopeId(0): ["x"] +after transform: ScopeId(0): ["_objectSpread", "o", "x"] +rebuilt : ScopeId(0): ["_objectSpread", "x"] Reference symbol mismatch for "o": after transform: SymbolId(0) "o" rebuilt : Unresolved references mismatch: -after transform: [] -rebuilt : ["o"] +after transform: ["require"] +rebuilt : ["o", "require"] tasks/coverage/typescript/tests/cases/conformance/types/spread/spreadOverwritesProperty.ts semantic error: Bindings mismatch: -after transform: ScopeId(0): ["ab", "abq", "g", "h", "unused1", "unused2", "unused3"] -rebuilt : ScopeId(0): ["g", "h", "unused1", "unused2", "unused3"] +after transform: ScopeId(0): ["_objectSpread", "ab", "abq", "g", "h", "unused1", "unused2", "unused3"] +rebuilt : ScopeId(0): ["_objectSpread", "g", "h", "unused1", "unused2", "unused3"] Reference symbol mismatch for "ab": after transform: SymbolId(0) "ab" rebuilt : @@ -57105,13 +57265,13 @@ Reference symbol mismatch for "abq": after transform: SymbolId(1) "abq" rebuilt : Unresolved references mismatch: -after transform: [] -rebuilt : ["ab", "abq"] +after transform: ["require"] +rebuilt : ["ab", "abq", "require"] tasks/coverage/typescript/tests/cases/conformance/types/spread/spreadUnion4.ts semantic error: Bindings mismatch: -after transform: ScopeId(0): ["a", "b", "c"] -rebuilt : ScopeId(0): ["c"] +after transform: ScopeId(0): ["_objectSpread", "a", "b", "c"] +rebuilt : ScopeId(0): ["_objectSpread", "c"] Reference symbol mismatch for "a": after transform: SymbolId(0) "a" rebuilt : @@ -57119,8 +57279,8 @@ Reference symbol mismatch for "b": after transform: SymbolId(1) "b" rebuilt : Unresolved references mismatch: -after transform: [] -rebuilt : ["a", "b"] +after transform: ["require"] +rebuilt : ["a", "b", "require"] tasks/coverage/typescript/tests/cases/conformance/types/stringLiteral/stringLiteralCheckedInIf01.ts semantic error: Bindings mismatch: @@ -58554,8 +58714,8 @@ rebuilt : [] tasks/coverage/typescript/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/intersectionIncludingPropFromGlobalAugmentation.ts semantic error: Bindings mismatch: -after transform: ScopeId(0): ["Test1", "Test2", "hasOwn", "source", "target", "toString"] -rebuilt : ScopeId(0): ["hasOwn", "target", "toString"] +after transform: ScopeId(0): ["Test1", "Test2", "_objectSpread", "hasOwn", "source", "target", "toString"] +rebuilt : ScopeId(0): ["_objectSpread", "hasOwn", "target", "toString"] Scope children mismatch: after transform: ScopeId(0): [ScopeId(1), ScopeId(2)] rebuilt : ScopeId(0): [] diff --git a/tasks/coverage/snapshots/transformer_typescript.snap b/tasks/coverage/snapshots/transformer_typescript.snap index aa7a998abdb943..cec4ce20137729 100644 --- a/tasks/coverage/snapshots/transformer_typescript.snap +++ b/tasks/coverage/snapshots/transformer_typescript.snap @@ -2,5 +2,6 @@ commit: df9d1650 transformer_typescript Summary: AST Parsed : 6490/6490 (100.00%) -Positive Passed: 6489/6490 (99.98%) +Positive Passed: 6488/6490 (99.97%) +Mismatch: tasks/coverage/typescript/tests/cases/compiler/commentsAfterSpread.ts Mismatch: tasks/coverage/typescript/tests/cases/conformance/jsx/inline/inlineJsxAndJsxFragPragmaOverridesCompilerOptions.tsx diff --git a/tasks/transform_conformance/snapshots/babel.snap.md b/tasks/transform_conformance/snapshots/babel.snap.md index 19eea87d11d7ff..b7e0376b832314 100644 --- a/tasks/transform_conformance/snapshots/babel.snap.md +++ b/tasks/transform_conformance/snapshots/babel.snap.md @@ -1,6 +1,6 @@ commit: d20b314c -Passed: 319/633 +Passed: 324/610 # All Passed: * babel-plugin-transform-class-static-block @@ -296,52 +296,13 @@ x Output mismatch x Output mismatch -# babel-plugin-transform-object-rest-spread (5/59) -* assumption-ignoreFunctionLength/parameters-object-rest-used-in-default/input.js -x Output mismatch - -* assumption-objectRestNoSymbols/rest-assignment-expression/input.js -x Output mismatch - -* assumption-objectRestNoSymbols/rest-computed/input.js -x Output mismatch - -* assumption-objectRestNoSymbols/rest-nested/input.js -x Output mismatch - -* assumption-objectRestNoSymbols/rest-var-declaration/input.js -x Output mismatch - -* assumption-pureGetters/rest-remove-unused-excluded-keys/input.js -x Output mismatch - -* assumption-pureGetters/spread-single-call/input.js -x Output mismatch - -* assumption-setSpreadProperties/assignment/input.js -x Output mismatch - -* assumption-setSpreadProperties/expression/input.js -x Output mismatch - -* assumption-setSpreadProperties/targets-support-object-assign/input.js -x Output mismatch - -* assumption-setSpreadProperties-with-useBuiltIns/assignment/input.js -x Output mismatch - -* assumption-setSpreadProperties-with-useBuiltIns/expression/input.js -x Output mismatch - +# babel-plugin-transform-object-rest-spread (11/36) * object-rest/assignment-expression/input.js x Output mismatch * object-rest/catch-clause/input.js x Output mismatch -* object-rest/duplicate-decl-bug/input.js -x Output mismatch - * object-rest/export/input.mjs x Output mismatch @@ -381,12 +342,6 @@ x Output mismatch * object-rest/nested-order/input.js x Output mismatch -* object-rest/non-string-computed/input.js -x Output mismatch - -* object-rest/null-destructuring/input.js -x Output mismatch - * object-rest/object-ref-computed/input.js x Output mismatch @@ -396,73 +351,42 @@ x Output mismatch * object-rest/parameters-object-rest-used-in-default/input.js x Output mismatch -* object-rest/remove-unused-excluded-keys-loose/input.js -x Output mismatch - * object-rest/symbol/input.js x Output mismatch * object-rest/template-literal-allLiterals-true-no-hoisting/input.js x Output mismatch -* object-rest/template-literal-property-allLiterals-false/input.js -x Output mismatch - -* object-rest/template-literal-property-allLiterals-true/input.js -x Output mismatch - * object-rest/variable-destructuring/input.js x Output mismatch -* object-rest/with-array-rest/input.js -x Output mismatch - -* object-spread/expression/input.js -x Output mismatch - -* object-spread/side-effect/input.js -x Output mismatch - -* object-spread-loose/assignment/input.js -x Output mismatch - -* object-spread-loose/expression/input.js +* regression/gh-4904/input.js x Output mismatch -* object-spread-loose/parameters-object-rest-used-in-default/input.js +* regression/gh-5151/input.js x Output mismatch -* object-spread-loose/side-effect/input.js +* regression/gh-7304/input.mjs x Output mismatch -* object-spread-loose/variable-declaration/input.js -x Output mismatch +* regression/gh-8323/input.js -* object-spread-loose-builtins/expression/input.js -x Output mismatch + x Option `loose` is not implemented for object-rest-spread. -* object-spread-loose-builtins/side-effect/input.js -x Output mismatch -* regression/gh-4904/input.js -x Output mismatch -* regression/gh-5151/input.js -x Output mismatch +# babel-plugin-transform-async-to-generator (10/28) +* assumption-ignoreFunctionLength-true/basic/input.mjs -* regression/gh-7304/input.mjs -x Output mismatch + x Compiler assumption `ignoreFunctionLength` is not implemented for object- + | rest-spread. -* regression/gh-7388/input.js -x Output mismatch -* regression/gh-8323/input.js -x Output mismatch +* assumption-ignoreFunctionLength-true/export-default-function/input.mjs + x Compiler assumption `ignoreFunctionLength` is not implemented for object- + | rest-spread. -# babel-plugin-transform-async-to-generator (11/28) -* assumption-ignoreFunctionLength-true/basic/input.mjs -x Output mismatch * assumption-noNewArrows-false/basic/input.js x Output mismatch @@ -2274,10 +2198,17 @@ Spread children are not supported in React. pragma and pragmaFrag cannot be set when runtime is automatic. * spread-transform/transform-to-babel-extend/input.js -x Output mismatch + + x Option `loose` is not implemented for object-rest-spread. + * spread-transform/transform-to-object-assign/input.js -x Output mismatch + + x Option `loose` is not implemented for object-rest-spread. + + + x Option `useBuiltIns` is not implemented for object-rest-spread. + # babel-plugin-transform-react-jsx-development (8/11) diff --git a/tasks/transform_conformance/snapshots/babel_exec.snap.md b/tasks/transform_conformance/snapshots/babel_exec.snap.md index 293b58bda7efca..040c94ddc9b20a 100644 --- a/tasks/transform_conformance/snapshots/babel_exec.snap.md +++ b/tasks/transform_conformance/snapshots/babel_exec.snap.md @@ -11,156 +11,9 @@ Error: 'eval' and 'arguments' cannot be used as a binding identifier in strict m ❯ ssrTransformScript ../../node_modules/.pnpm/vite@5.4.8_@types+node@22.9.0/node_modules/vite/dist/node/chunks/dep-CDnG8rE7.js:52319:11 ❯ loadAndTransform ../../node_modules/.pnpm/vite@5.4.8_@types+node@22.9.0/node_modules/vite/dist/node/chunks/dep-CDnG8rE7.js:51917:72 -⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/14]⎯ +⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/6]⎯ -⎯⎯⎯⎯⎯⎯ Failed Tests 13 ⎯⎯⎯⎯⎯⎯⎯ - - FAIL fixtures/babel-plugin-transform-object-rest-spread-test-fixtures-assumption-objectRestNoSymbols-rest-ignore-symbols-exec.test.js > exec -AssertionError: expected true to be false // Object.is equality - -- Expected -+ Received - -- false -+ true - - ❯ fixtures/babel-plugin-transform-object-rest-spread-test-fixtures-assumption-objectRestNoSymbols-rest-ignore-symbols-exec.test.js:12:19 - 10| expect(a).toBe(1); - 11| expect(r.b).toBe(2); - 12| expect(sym in r).toBe(false); - | ^ - 13| }) - -⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[2/14]⎯ - - FAIL fixtures/babel-plugin-transform-object-rest-spread-test-fixtures-assumption-pureGetters-rest-remove-unused-excluded-keys-exec.test.js > exec -AssertionError: expected true to be false // Object.is equality - -- Expected -+ Received - -- false -+ true - - ❯ fixtures/babel-plugin-transform-object-rest-spread-test-fixtures-assumption-pureGetters-rest-remove-unused-excluded-keys-exec.test.js:10:17 - 8| let { foo,...rest } = obj; - 9| expect("foo" in rest).toBe(false); - 10| expect(called).toBe(false); - | ^ - 11| }) - -⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[3/14]⎯ - - FAIL fixtures/babel-plugin-transform-object-rest-spread-test-fixtures-assumption-pureGetters-spread-single-call-exec.test.js > exec -AssertionError: expected { foo: +0, middle: 1, bar: 1 } to deeply equal { foo: +0, middle: +0, bar: 1 } - -- Expected -+ Received - - Object { - "bar": 1, - "foo": 0, -- "middle": 0, -+ "middle": 1, - } - - ❯ fixtures/babel-plugin-transform-object-rest-spread-test-fixtures-assumption-pureGetters-spread-single-call-exec.test.js:12:14 - 10| } }; - 11| let res = _objectSpread(_objectSpread(_objectSpread({}, withFoo), { m… - 12| expect(res).toEqual({ - | ^ - 13| foo: 0, - 14| middle: 0, - -⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[4/14]⎯ - - FAIL fixtures/babel-plugin-transform-object-rest-spread-test-fixtures-assumption-setSpreadProperties-no-object-assign-exec-exec.test.js > exec -AssertionError: expected [Function] to throw an error - ❯ fixtures/babel-plugin-transform-object-rest-spread-test-fixtures-assumption-setSpreadProperties-no-object-assign-exec-exec.test.js:13:5 - 11| expect(() => { - 12| const objSpread = _objectSpread({}, obj); - 13| }).toThrow(); - | ^ - 14| const obj2 = { "NOWRITE": 456 }; - 15| expect(() => { - -⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[5/14]⎯ - - FAIL fixtures/babel-plugin-transform-object-rest-spread-test-fixtures-assumption-setSpreadProperties-with-useBuiltIns-no-object-assign-exec-exec.test.js > exec -AssertionError: expected [Function] to throw an error - ❯ fixtures/babel-plugin-transform-object-rest-spread-test-fixtures-assumption-setSpreadProperties-with-useBuiltIns-no-object-assign-exec-exec.test.js:13:5 - 11| expect(() => { - 12| const objSpread = _objectSpread({}, obj); - 13| }).toThrow(); - | ^ - 14| const obj2 = { "NOWRITE": 456 }; - 15| expect(() => { - -⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[6/14]⎯ - - FAIL fixtures/babel-plugin-transform-object-rest-spread-test-fixtures-object-spread-expression-exec.test.js > exec -AssertionError: expected [ 1, 2 ] to deeply equal [ 1 ] - -- Expected -+ Received - - Array [ - 1, -+ 2, - ] - - ❯ fixtures/babel-plugin-transform-object-rest-spread-test-fixtures-object-spread-expression-exec.test.js:10:14 - 8| log.push(2); - 9| } }); - 10| expect(log).toEqual([1]); - | ^ - 11| }) - -⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[7/14]⎯ - - FAIL fixtures/babel-plugin-transform-object-rest-spread-test-fixtures-object-spread-loose-builtins-side-effect-exec.test.js > exec -AssertionError: expected { a: 1, b: 1 } to deeply equal { a: 2, b: 1 } - -- Expected -+ Received - - Object { -- "a": 2, -+ "a": 1, - "b": 1, - } - - ❯ fixtures/babel-plugin-transform-object-rest-spread-test-fixtures-object-spread-loose-builtins-side-effect-exec.test.js:9:12 - 7| }; - 8| var o = Object.assign(Object.assign({ a: 3 }, k), { b: k.a++ }); - 9| expect(o).toEqual({ - | ^ - 10| a: 2, - 11| b: 1 - -⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[8/14]⎯ - - FAIL fixtures/babel-plugin-transform-object-rest-spread-test-fixtures-object-spread-loose-side-effect-exec.test.js > exec -AssertionError: expected { a: 1, b: 1 } to deeply equal { a: 2, b: 1 } - -- Expected -+ Received - - Object { -- "a": 2, -+ "a": 1, - "b": 1, - } - - ❯ fixtures/babel-plugin-transform-object-rest-spread-test-fixtures-object-spread-loose-side-effect-exec.test.js:9:12 - 7| }; - 8| var o = Object.assign(Object.assign({ a: 3 }, k), { b: k.a++ }); - 9| expect(o).toEqual({ - | ^ - 10| a: 2, - 11| b: 1 - -⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[9/14]⎯ +⎯⎯⎯⎯⎯⎯⎯ Failed Tests 5 ⎯⎯⎯⎯⎯⎯⎯ FAIL fixtures/babel-plugin-transform-react-jsx-source-test-fixtures-react-source-basic-sample-exec.test.js > exec ReferenceError: transformAsync is not defined @@ -172,7 +25,7 @@ ReferenceError: transformAsync is not defined 5| var expected = ` 6| var _jsxFileName = "/fake/path/mock.js"; -⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[10/14]⎯ +⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[2/6]⎯ FAIL fixtures/babel-plugin-transform-react-jsx-source-test-fixtures-react-source-with-source-exec.test.js > exec ReferenceError: transformAsync is not defined @@ -184,7 +37,7 @@ ReferenceError: transformAsync is not defined 5| var expected = "var x = ;"; 6| return actualP.then((actual) => { -⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[11/14]⎯ +⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[3/6]⎯ FAIL fixtures/babel-preset-env-test-fixtures-plugins-integration-issue-15170-exec.test.js > exec AssertionError: expected [Function] to not throw an error but 'ReferenceError: x is not defined' was thrown @@ -202,7 +55,7 @@ undefined | ^ 7| }) -⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[12/14]⎯ +⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[4/6]⎯ FAIL fixtures/babel-preset-env-test-fixtures-sanity-check-es2015-constants-exec.test.js > exec TypeError: Assignment to constant variable. @@ -213,7 +66,7 @@ TypeError: Assignment to constant variable. | ^ 6| }) -⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[13/14]⎯ +⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[5/6]⎯ FAIL fixtures/babel-preset-env-test-fixtures-sanity-regex-dot-all-exec.test.js > exec AssertionError: expected false to be true // Object.is equality @@ -232,5 +85,5 @@ AssertionError: expected false to be true // Object.is equality 11| expect(/hello.world/su.test(input)).toBe(true); 12| }) -⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[14/14]⎯ +⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[6/6]⎯ diff --git a/tasks/transform_conformance/snapshots/oxc.snap.md b/tasks/transform_conformance/snapshots/oxc.snap.md index 1cc7879ddaed13..2294e8050b7dfb 100644 --- a/tasks/transform_conformance/snapshots/oxc.snap.md +++ b/tasks/transform_conformance/snapshots/oxc.snap.md @@ -1,6 +1,6 @@ commit: d20b314c -Passed: 85/95 +Passed: 88/100 # All Passed: * babel-plugin-transform-class-static-block @@ -15,6 +15,18 @@ Passed: 85/95 * regexp +# babel-plugin-transform-object-rest-spread (3/5) +* object-rest/assignment-expression/input.js +Reference flags mismatch for "a2": +after transform: ReferenceId(2): ReferenceFlags(Write) +rebuilt : ReferenceId(4): ReferenceFlags(Read | Write) + +* object-rest/export/input.js +Symbol flags mismatch for "b0": +after transform: SymbolId(1): SymbolFlags(BlockScopedVariable | Export) +rebuilt : SymbolId(2): SymbolFlags(BlockScopedVariable) + + # babel-plugin-transform-typescript (2/9) * class-property-definition/input.ts Unresolved references mismatch: diff --git a/tasks/transform_conformance/src/constants.rs b/tasks/transform_conformance/src/constants.rs index dc0b3e7288cd92..10f52668d6103f 100644 --- a/tasks/transform_conformance/src/constants.rs +++ b/tasks/transform_conformance/src/constants.rs @@ -101,4 +101,9 @@ pub(crate) const SKIP_TESTS: &[&str] = &[ "babel-preset-env/test/fixtures/corejs3", "babel-preset-env/test/fixtures/debug", "babel-preset-env/test/fixtures/debug-babel-7", + // Assumptions are not implemented yet. + "babel-plugin-transform-object-rest-spread/test/fixtures/assumption", + "babel-plugin-transform-object-rest-spread/test/fixtures/object-spread-loose", + "babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/remove-unused-excluded-keys-loose", + "babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/regression/gh-8323" ]; diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/assignment-expression/input.js b/tasks/transform_conformance/tests/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/assignment-expression/input.js new file mode 100644 index 00000000000000..c4de05d8abb5d8 --- /dev/null +++ b/tasks/transform_conformance/tests/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/assignment-expression/input.js @@ -0,0 +1,8 @@ +({ a1 } = c1); +({ a2, ...b2 } = c2); +(a0, { a2, ...b2 } = c2); +(a0, { a2, ...b2 } = c2, a1); + +console.log({ a3, ...b3 } = c3); +console.log((a0, { a3, ...b3 } = c3)); +console.log((a0, { a3, ...b3 } = c3, a3)); diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/assignment-expression/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/assignment-expression/output.js new file mode 100644 index 00000000000000..067f7c7c93973a --- /dev/null +++ b/tasks/transform_conformance/tests/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/assignment-expression/output.js @@ -0,0 +1,13 @@ +({a1} = c1); +var _c; +_c = c2, {a2} = _c, b2 = babelHelpers.objectWithoutProperties(_c, ["a2"]), _c; +var _c2; +a0, _c2 = c2, {a2} = _c2, b2 = babelHelpers.objectWithoutProperties(_c2, ["a2"]), _c2; +var _c3; +a0, _c3 = c2, {a2} = _c3, b2 = babelHelpers.objectWithoutProperties(_c3, ["a2"]), _c3, a1; +var _c4; +console.log((_c4 = c3, {a3} = _c4, b3 = babelHelpers.objectWithoutProperties(_c4, ["a3"]), _c4)); +var _c5; +console.log((a0, _c5 = c3, {a3} = _c5, b3 = babelHelpers.objectWithoutProperties(_c5, ["a3"]), _c5)); +var _c6; +console.log((a0, _c6 = c3, {a3} = _c6, b3 = babelHelpers.objectWithoutProperties(_c6, ["a3"]), _c6, a3)); diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/complex/input.js b/tasks/transform_conformance/tests/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/complex/input.js new file mode 100644 index 00000000000000..ec37c9546ed174 --- /dev/null +++ b/tasks/transform_conformance/tests/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/complex/input.js @@ -0,0 +1,13 @@ +let [{...a0}] = z + +let [{...b0}, {...b1}] = z + +let { c0: { ...c1 } } = foo; + +let { d0: { d1, ...d2 } } = foo; + +let { e0: { e1: { e2, ...e3 }, ...e4 } } = foo; + +let { f0: { f1: { f2, ...f3 }, ...f4 }, ...f5 } = foo; + +let [{ g0: { g1: { g2, ...g3 }, ...g4 } }, { g5: [{ g6: [{ g7, ...g8 }], ...g9 }] }] = goo; diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/complex/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/complex/output.js new file mode 100644 index 00000000000000..e4fc44f134f460 --- /dev/null +++ b/tasks/transform_conformance/tests/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/complex/output.js @@ -0,0 +1,7 @@ +let [_ref] = z, a0 = babelHelpers.extends({}, (babelHelpers.objectDestructuringEmpty(_ref), _ref)); +let [_ref2, _ref3] = z, b0 = babelHelpers.extends({}, (babelHelpers.objectDestructuringEmpty(_ref2), _ref2)), b1 = babelHelpers.extends({}, (babelHelpers.objectDestructuringEmpty(_ref3), _ref3)); +let { c0: _ref4 } = foo, c1 = babelHelpers.extends({}, (babelHelpers.objectDestructuringEmpty(_ref4), _ref4)); +let { d0: _ref5 } = foo, { d1 } = _ref5, d2 = babelHelpers.objectWithoutProperties(_ref5, ["d1"]); +let { e0: _ref7 } = foo, { e1: _ref6 } = _ref7, e4 = babelHelpers.objectWithoutProperties(_ref7, ["e1"]), { e2 } = _ref6, e3 = babelHelpers.objectWithoutProperties(_ref6, ["e2"]); +let { f0: _ref9 } = foo, { f1: _ref8 } = _ref9, f4 = babelHelpers.objectWithoutProperties(_ref9, ["f1"]), { f2 } = _ref8, f3 = babelHelpers.objectWithoutProperties(_ref8, ["f2"]), f5 = babelHelpers.objectWithoutProperties(foo, ["f0"]); +let [{ g0: _ref11 }, { g5: [_ref13] }] = goo, { g1: _ref10 } = _ref11, g4 = babelHelpers.objectWithoutProperties(_ref11, ["g1"]), { g2 } = _ref10, g3 = babelHelpers.objectWithoutProperties(_ref10, ["g2"]), { g6: [_ref12] } = _ref13, g9 = babelHelpers.objectWithoutProperties(_ref13, ["g6"]), { g7 } = _ref12, g8 = babelHelpers.objectWithoutProperties(_ref12, ["g7"]); diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/export/input.js b/tasks/transform_conformance/tests/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/export/input.js new file mode 100644 index 00000000000000..bafc57408be1e2 --- /dev/null +++ b/tasks/transform_conformance/tests/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/export/input.js @@ -0,0 +1,2 @@ +export let { ...a0 } = foo; +export let [{...b0}] = z diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/export/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/export/output.js new file mode 100644 index 00000000000000..5c493b01e1dd63 --- /dev/null +++ b/tasks/transform_conformance/tests/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/export/output.js @@ -0,0 +1,2 @@ +export let a0 = babelHelpers.extends({}, (babelHelpers.objectDestructuringEmpty(foo), foo)); +export let [_ref] = z, b0 = babelHelpers.extends({}, (babelHelpers.objectDestructuringEmpty(_ref), _ref)); diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/keys/input.js b/tasks/transform_conformance/tests/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/keys/input.js new file mode 100644 index 00000000000000..28c4a9935ebe70 --- /dev/null +++ b/tasks/transform_conformance/tests/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/keys/input.js @@ -0,0 +1 @@ +let { [b0++]: {b1, ...b2}, [b0++]: {b3, ...b4} } = foo(); diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/keys/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/keys/output.js new file mode 100644 index 00000000000000..b9c54a5e7cd494 --- /dev/null +++ b/tasks/transform_conformance/tests/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/keys/output.js @@ -0,0 +1 @@ +let _foo = foo(), { [b0++]: _ref, [b0++]: _ref2 } = _foo, { b1 } = _ref, b2 = babelHelpers.objectWithoutProperties(_ref, ["b1"]), { b3 } = _ref2, b4 = babelHelpers.objectWithoutProperties(_ref2, ["b3"]); diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/options.json b/tasks/transform_conformance/tests/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/options.json new file mode 100644 index 00000000000000..85af630bdd1bca --- /dev/null +++ b/tasks/transform_conformance/tests/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/options.json @@ -0,0 +1,3 @@ +{ + "plugins": ["transform-object-rest-spread"] +} diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/simple/input.js b/tasks/transform_conformance/tests/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/simple/input.js new file mode 100644 index 00000000000000..4373e1ef0d34ac --- /dev/null +++ b/tasks/transform_conformance/tests/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/simple/input.js @@ -0,0 +1,22 @@ +let { ...a0 } = foo; +let { ...b0 } = foo(); + +let { c0, c1, ...c2 } = foo; +let { d0, d1, ...d2 } = foo(); + +let bar, { e0, ...e1 } = foo(), baz; + +for (let bar, { f0, ...f1 } = foo(), baz;;){} +for (let { g0, ...g1 } in foo){} +for (let { h0, ...h1 } of foo){} + +for (let bar, { i0, ...i1 } = ioo(), baz;;); +for (let { j0, ...j1 } in foo); +for (let { k0, ...k1 } of foo); + +for (let bar, { l0, ...l1 } = loo(), baz;;) void 0; +for (let { m0, ...m1 } in foo) void 0; +for (let { n0, ...n1 } of foo) void 0; + +let { [key]: x, ...rest } = foo; +let { [key1]: x2, ...rest2 } = foo(); diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/simple/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/simple/output.js new file mode 100644 index 00000000000000..43bb2034a412ab --- /dev/null +++ b/tasks/transform_conformance/tests/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/simple/output.js @@ -0,0 +1,31 @@ +const _excluded = ["f0"], _excluded2 = ["g0"], _excluded3 = ["h0"], _excluded4 = ["i0"], _excluded5 = ["j0"], _excluded6 = ["k0"], _excluded7 = ["l0"], _excluded8 = ["m0"], _excluded9 = ["n0"]; +let a0 = babelHelpers.extends({}, (babelHelpers.objectDestructuringEmpty(foo), foo)); +let _foo = foo(), b0 = babelHelpers.extends({}, (babelHelpers.objectDestructuringEmpty(_foo), _foo)); +let { c0, c1 } = foo, c2 = babelHelpers.objectWithoutProperties(foo, ["c0", "c1"]); +let _foo2 = foo(), { d0, d1 } = _foo2, d2 = babelHelpers.objectWithoutProperties(_foo2, ["d0", "d1"]); +let bar, _foo3 = foo(), { e0 } = _foo3, e1 = babelHelpers.objectWithoutProperties(_foo3, ["e0"]), baz; +for (let bar, _foo4 = foo(), { f0 } = _foo4, f1 = babelHelpers.objectWithoutProperties(_foo4, _excluded), baz;;) {} +for (let _ref in foo) { + let { g0 } = _ref, g1 = babelHelpers.objectWithoutProperties(_ref, _excluded2); +} +for (let _ref2 of foo) { + let { h0 } = _ref2, h1 = babelHelpers.objectWithoutProperties(_ref2, _excluded3); +} +for (let bar, _ioo = ioo(), { i0 } = _ioo, i1 = babelHelpers.objectWithoutProperties(_ioo, _excluded4), baz;;); +for (let _ref3 in foo) { + let { j0 } = _ref3, j1 = babelHelpers.objectWithoutProperties(_ref3, _excluded5); +} +for (let _ref4 of foo) { + let { k0 } = _ref4, k1 = babelHelpers.objectWithoutProperties(_ref4, _excluded6); +} +for (let bar, _loo = loo(), { l0 } = _loo, l1 = babelHelpers.objectWithoutProperties(_loo, _excluded7), baz;;) void 0; +for (let _ref5 in foo) { + let { m0 } = _ref5, m1 = babelHelpers.objectWithoutProperties(_ref5, _excluded8); + void 0; +} +for (let _ref6 of foo) { + let { n0 } = _ref6, n1 = babelHelpers.objectWithoutProperties(_ref6, _excluded9); + void 0; +} +let _key = key, { [_key]: x } = foo, rest = babelHelpers.objectWithoutProperties(foo, [_key].map(babelHelpers.toPropertyKey)); +let _foo5 = foo(), _key2 = key1, { [_key2]: x2 } = _foo5, rest2 = babelHelpers.objectWithoutProperties(_foo5, [_key2].map(babelHelpers.toPropertyKey));