diff --git a/crates/oxc_ast/src/ast/js.rs b/crates/oxc_ast/src/ast/js.rs index 233b734bc..394ed08ca 100644 --- a/crates/oxc_ast/src/ast/js.rs +++ b/crates/oxc_ast/src/ast/js.rs @@ -993,6 +993,7 @@ pub enum Declaration<'a> { VariableDeclaration(Box<'a, VariableDeclaration<'a>>), FunctionDeclaration(Box<'a, Function<'a>>), ClassDeclaration(Box<'a, Class<'a>>), + UsingDeclaration(Box<'a, UsingDeclaration<'a>>), TSTypeAliasDeclaration(Box<'a, TSTypeAliasDeclaration<'a>>), TSInterfaceDeclaration(Box<'a, TSInterfaceDeclaration<'a>>), @@ -1069,6 +1070,18 @@ pub struct VariableDeclarator<'a> { pub definite: bool, } +/// Using Declaration +/// +#[derive(Debug, Hash)] +#[cfg_attr(feature = "serde", derive(Serialize), serde(tag = "type", rename_all = "camelCase"))] +pub struct UsingDeclaration<'a> { + #[cfg_attr(feature = "serde", serde(flatten))] + pub span: Span, + pub is_await: bool, + #[cfg_attr(feature = "serde-impl", serde(default))] + pub declarations: Vec<'a, VariableDeclarator<'a>>, +} + /// Empty Statement #[derive(Debug, Hash)] #[cfg_attr(feature = "serde", derive(Serialize), serde(tag = "type"))] @@ -1134,6 +1147,7 @@ pub struct ForStatement<'a> { pub enum ForStatementInit<'a> { VariableDeclaration(Box<'a, VariableDeclaration<'a>>), Expression(Expression<'a>), + UsingDeclaration(Box<'a, UsingDeclaration<'a>>), } impl<'a> ForStatementInit<'a> { @@ -1172,6 +1186,7 @@ pub struct ForOfStatement<'a> { pub enum ForStatementLeft<'a> { VariableDeclaration(Box<'a, VariableDeclaration<'a>>), AssignmentTarget(AssignmentTarget<'a>), + UsingDeclaration(Box<'a, UsingDeclaration<'a>>), } impl<'a> ForStatementLeft<'a> { diff --git a/crates/oxc_ast/src/ast_builder.rs b/crates/oxc_ast/src/ast_builder.rs index 235fc885e..e950184d5 100644 --- a/crates/oxc_ast/src/ast_builder.rs +++ b/crates/oxc_ast/src/ast_builder.rs @@ -151,6 +151,19 @@ impl<'a> AstBuilder<'a> { Statement::DebuggerStatement(self.alloc(DebuggerStatement { span })) } + pub fn using_statement( + &self, + span: Span, + declarations: Vec<'a, VariableDeclarator<'a>>, + is_await: bool, + ) -> Statement<'a> { + Statement::Declaration(Declaration::UsingDeclaration(self.alloc(UsingDeclaration { + span, + is_await, + declarations, + }))) + } + pub fn do_while_statement( &self, span: Span, @@ -742,6 +755,15 @@ impl<'a> AstBuilder<'a> { VariableDeclarator { span, kind, id, init, definite } } + pub fn using_declaration( + &self, + span: Span, + declarations: Vec<'a, VariableDeclarator<'a>>, + is_await: bool, + ) -> UsingDeclaration<'a> { + UsingDeclaration { span, is_await, declarations } + } + /* ---------- Patterns ---------- */ pub fn binding_pattern( diff --git a/crates/oxc_ast/src/ast_kind.rs b/crates/oxc_ast/src/ast_kind.rs index 27c85086c..559207bbc 100644 --- a/crates/oxc_ast/src/ast_kind.rs +++ b/crates/oxc_ast/src/ast_kind.rs @@ -37,6 +37,8 @@ pub enum AstKind<'a> { VariableDeclaration(&'a VariableDeclaration<'a>), VariableDeclarator(&'a VariableDeclarator<'a>), + UsingDeclaration(&'a UsingDeclaration<'a>), + IdentifierName(&'a IdentifierName), IdentifierReference(&'a IdentifierReference), BindingIdentifier(&'a BindingIdentifier), @@ -271,6 +273,8 @@ impl<'a> GetSpan for AstKind<'a> { Self::VariableDeclaration(x) => x.span, Self::VariableDeclarator(x) => x.span, + Self::UsingDeclaration(x) => x.span, + Self::IdentifierName(x) => x.span, Self::IdentifierReference(x) => x.span, Self::BindingIdentifier(x) => x.span, @@ -421,6 +425,8 @@ impl<'a> AstKind<'a> { Self::VariableDeclaration(_) => "VariableDeclaration".into(), Self::VariableDeclarator(_) => "VariableDeclarator".into(), + Self::UsingDeclaration(_) => "UsingDeclaration".into(), + Self::IdentifierName(x) => format!("IdentifierName({})", x.name).into(), Self::IdentifierReference(x) => format!("IdentifierReference({})", x.name).into(), Self::BindingIdentifier(x) => format!("BindingIdentifier({})", x.name).into(), diff --git a/crates/oxc_ast/src/span.rs b/crates/oxc_ast/src/span.rs index 0dbccce50..bf638710c 100644 --- a/crates/oxc_ast/src/span.rs +++ b/crates/oxc_ast/src/span.rs @@ -169,6 +169,7 @@ impl<'a> GetSpan for Declaration<'a> { match self { Self::VariableDeclaration(decl) => decl.span, Self::FunctionDeclaration(decl) => decl.span, + Self::UsingDeclaration(decl) => decl.span, Self::ClassDeclaration(decl) => decl.span, Self::TSTypeAliasDeclaration(decl) => decl.span, Self::TSInterfaceDeclaration(decl) => decl.span, @@ -235,6 +236,7 @@ impl<'a> GetSpan for ForStatementInit<'a> { match self { Self::VariableDeclaration(x) => x.span, Self::Expression(x) => x.span(), + Self::UsingDeclaration(x) => x.span, } } } @@ -244,6 +246,7 @@ impl<'a> GetSpan for ForStatementLeft<'a> { match self { Self::VariableDeclaration(x) => x.span, Self::AssignmentTarget(x) => x.span(), + Self::UsingDeclaration(x) => x.span, } } } diff --git a/crates/oxc_ast/src/syntax_directed_operations.rs b/crates/oxc_ast/src/syntax_directed_operations.rs index 6e03c62f0..ebbc9525b 100644 --- a/crates/oxc_ast/src/syntax_directed_operations.rs +++ b/crates/oxc_ast/src/syntax_directed_operations.rs @@ -95,6 +95,14 @@ impl<'a> BoundNames for VariableDeclaration<'a> { } } +impl<'a> BoundNames for UsingDeclaration<'a> { + fn bound_names(&self, f: &mut F) { + for declarator in &self.declarations { + declarator.id.bound_names(f); + } + } +} + impl<'a> BoundName for Function<'a> { fn bound_name(&self, f: &mut F) { if let Some(ident) = &self.id { diff --git a/crates/oxc_ast/src/visit.rs b/crates/oxc_ast/src/visit.rs index e0a3b222b..0aa39c1d5 100644 --- a/crates/oxc_ast/src/visit.rs +++ b/crates/oxc_ast/src/visit.rs @@ -135,6 +135,9 @@ pub trait Visit<'a>: Sized { let kind = AstKind::ForStatementInit(init); self.enter_node(kind); match init { + ForStatementInit::UsingDeclaration(decl) => { + self.visit_using_declaration(decl); + } ForStatementInit::VariableDeclaration(decl) => { self.visit_variable_declaration(decl); } @@ -167,6 +170,9 @@ pub trait Visit<'a>: Sized { self.visit_variable_declaration(decl); } ForStatementLeft::AssignmentTarget(target) => self.visit_assignment_target(target), + ForStatementLeft::UsingDeclaration(decl) => { + self.visit_using_declaration(decl); + } } } @@ -450,6 +456,15 @@ pub trait Visit<'a>: Sized { self.leave_node(kind); } + fn visit_using_declaration(&mut self, decl: &'a UsingDeclaration<'a>) { + let kind = AstKind::UsingDeclaration(decl); + self.enter_node(kind); + for decl in &decl.declarations { + self.visit_variable_declarator(decl); + } + self.leave_node(kind); + } + /* ---------- Expression ---------- */ fn visit_expression(&mut self, expr: &'a Expression<'a>) { @@ -1264,6 +1279,7 @@ pub trait Visit<'a>: Sized { Declaration::VariableDeclaration(decl) => self.visit_variable_declaration(decl), Declaration::FunctionDeclaration(func) => self.visit_function(func), Declaration::ClassDeclaration(class) => self.visit_class(class), + Declaration::UsingDeclaration(decl) => self.visit_using_declaration(decl), Declaration::TSModuleDeclaration(module) => { self.visit_ts_module_declaration(module); } diff --git a/crates/oxc_ast/src/visit_mut.rs b/crates/oxc_ast/src/visit_mut.rs index 58acdfbff..22f8e793a 100644 --- a/crates/oxc_ast/src/visit_mut.rs +++ b/crates/oxc_ast/src/visit_mut.rs @@ -101,6 +101,9 @@ pub trait VisitMut<'a, 'b>: Sized { self.visit_variable_declaration(decl); } ForStatementInit::Expression(expr) => self.visit_expression(expr), + ForStatementInit::UsingDeclaration(decl) => { + self.visit_using_declaration(decl); + } } } @@ -122,6 +125,9 @@ pub trait VisitMut<'a, 'b>: Sized { self.visit_variable_declaration(decl); } ForStatementLeft::AssignmentTarget(target) => self.visit_assignment_target(target), + ForStatementLeft::UsingDeclaration(decl) => { + self.visit_using_declaration(decl); + } } } @@ -212,6 +218,12 @@ pub trait VisitMut<'a, 'b>: Sized { } } + fn visit_using_declaration(&mut self, declaration: &'b mut UsingDeclaration<'a>) { + for decl in declaration.declarations.iter_mut() { + self.visit_variable_declarator(decl); + } + } + /* ---------- Function ---------- */ fn visit_function(&mut self, func: &'b mut Function<'a>) { @@ -960,6 +972,7 @@ pub trait VisitMut<'a, 'b>: Sized { Declaration::VariableDeclaration(decl) => self.visit_variable_declaration(decl), Declaration::FunctionDeclaration(func) => self.visit_function(func), Declaration::ClassDeclaration(class) => self.visit_class(class), + Declaration::UsingDeclaration(decl) => self.visit_using_declaration(decl), Declaration::TSModuleDeclaration(module) => { self.visit_ts_module_declaration(module); } diff --git a/crates/oxc_formatter/src/gen.rs b/crates/oxc_formatter/src/gen.rs index 6a02642d3..c54f2b841 100644 --- a/crates/oxc_formatter/src/gen.rs +++ b/crates/oxc_formatter/src/gen.rs @@ -161,6 +161,7 @@ impl<'a> Gen for ForStatement<'a> { match init { ForStatementInit::Expression(expr) => expr.gen(p), ForStatementInit::VariableDeclaration(var) => var.gen(p), + ForStatementInit::UsingDeclaration(decl) => decl.gen(p), } } @@ -225,6 +226,7 @@ impl<'a> Gen for ForStatementLeft<'a> { match &self { ForStatementLeft::VariableDeclaration(var) => var.gen(p), ForStatementLeft::AssignmentTarget(target) => target.gen(p), + ForStatementLeft::UsingDeclaration(decl) => decl.gen(p), } } } @@ -447,6 +449,10 @@ impl<'a> Gen for Declaration<'a> { declaration.gen(p); p.print_newline(); } + Self::UsingDeclaration(declaration) => { + declaration.gen(p); + p.print_newline(); + } Self::TSTypeAliasDeclaration(_) | Self::TSInterfaceDeclaration(_) | Self::TSEnumDeclaration(_) @@ -467,6 +473,18 @@ impl<'a> Gen for VariableDeclaration<'a> { p.print_list(&self.declarations); } } +impl<'a> Gen for UsingDeclaration<'a> { + fn gen(&self, p: &mut Formatter) { + if self.is_await { + p.print_str(b"await"); + p.print_space(); + } + p.print_str(b"using"); + p.print_space(); + p.print_list(&self.declarations); + p.print_semicolon(); + } +} impl<'a> Gen for VariableDeclarator<'a> { fn gen(&self, p: &mut Formatter) { diff --git a/crates/oxc_minifier/src/printer/gen.rs b/crates/oxc_minifier/src/printer/gen.rs index 4cda073d1..296b800b1 100644 --- a/crates/oxc_minifier/src/printer/gen.rs +++ b/crates/oxc_minifier/src/printer/gen.rs @@ -209,6 +209,7 @@ impl<'a> Gen for ForStatement<'a> { if let Some(init) = self.init.as_ref() { let ctx = Context::empty(); match init { + ForStatementInit::UsingDeclaration(decl) => decl.gen(p, ctx), ForStatementInit::Expression(expr) => { expr.gen_expr(p, Precedence::lowest(), ctx); } @@ -267,6 +268,7 @@ impl<'a> Gen for ForOfStatement<'a> { impl<'a> Gen for ForStatementLeft<'a> { fn gen(&self, p: &mut Printer, ctx: Context) { match &self { + ForStatementLeft::UsingDeclaration(var) => var.gen(p, ctx), ForStatementLeft::VariableDeclaration(var) => var.gen(p, ctx), ForStatementLeft::AssignmentTarget(target) => target.gen(p, ctx), } @@ -446,6 +448,9 @@ impl<'a> Gen for Declaration<'a> { Self::ClassDeclaration(declaration) => { declaration.gen(p, ctx); } + Self::UsingDeclaration(declaration) => { + declaration.gen(p, ctx); + } Self::TSEnumDeclaration(_) => {} } } @@ -462,6 +467,19 @@ impl<'a> Gen for VariableDeclaration<'a> { p.print_list(&self.declarations, ctx); } } +impl<'a> Gen for UsingDeclaration<'a> { + fn gen(&self, p: &mut Printer, ctx: Context) { + if self.is_await { + p.print_str(b"await"); + p.print(b' '); + } + p.print_str(b"using"); + p.print(b' '); + + p.print_list(&self.declarations, ctx); + p.print_semicolon(); + } +} impl<'a> Gen for VariableDeclarator<'a> { fn gen(&self, p: &mut Printer, ctx: Context) { diff --git a/crates/oxc_parser/src/diagnostics.rs b/crates/oxc_parser/src/diagnostics.rs index a476245b4..ee0d4ed6d 100644 --- a/crates/oxc_parser/src/diagnostics.rs +++ b/crates/oxc_parser/src/diagnostics.rs @@ -281,3 +281,33 @@ pub struct ReturnStatementOnlyInFunctionBody(#[label] pub Span); #[error("TS18007: JSX expressions may not use the comma operator.")] #[diagnostic(help("Did you mean to write an array?"))] pub struct JSXExpressionsMayNotUseTheCommaOperator(#[label] pub Span); + +#[derive(Debug, Error, Diagnostic)] +#[error("Line terminator not permitted before using declaration.")] +#[diagnostic()] +pub struct LineTerminatorBeforeUsingDeclaration(#[label] pub Span); + +#[derive(Debug, Error, Diagnostic)] +#[error("Await is not allowed in using declarations.")] +#[diagnostic()] +pub struct AwaitInUsingDeclaration(#[label] pub Span); + +#[derive(Debug, Error, Diagnostic)] +#[error("Using declarations may not have binding patterns.")] +#[diagnostic()] +pub struct InvalidIdentifierInUsingDeclaration(#[label] pub Span); + +#[derive(Debug, Error, Diagnostic)] +#[error("The left-hand side of a for...in statement cannot be an await using declaration.")] +#[diagnostic()] +pub struct AwaitUsingDeclarationNotAllowedInForInStatement(#[label] pub Span); + +#[derive(Debug, Error, Diagnostic)] +#[error("The left-hand side of a for...in statement cannot be an using declaration.")] +#[diagnostic()] +pub struct UsingDeclarationNotAllowedInForInStatement(#[label] pub Span); + +#[derive(Debug, Error, Diagnostic)] +#[error("Using declarations must have an initializer.")] +#[diagnostic()] +pub struct UsingDeclarationsMustBeInitialized(#[label] pub Span); diff --git a/crates/oxc_parser/src/js/declaration.rs b/crates/oxc_parser/src/js/declaration.rs index 4ef375dc1..4db87c6d0 100644 --- a/crates/oxc_parser/src/js/declaration.rs +++ b/crates/oxc_parser/src/js/declaration.rs @@ -42,6 +42,14 @@ impl<'a> Parser<'a> { } } + pub(crate) fn parse_using(&mut self) -> Result> { + let using_decl = self.parse_using_declaration(StatementContext::StatementList)?; + + self.asi()?; + + Ok(Statement::Declaration(Declaration::UsingDeclaration(self.ast.alloc(using_decl)))) + } + pub(crate) fn parse_variable_declaration( &mut self, start_span: Span, @@ -102,4 +110,59 @@ impl<'a> Parser<'a> { Ok(self.ast.variable_declarator(self.end_span(span), kind, id, init, definite)) } + + /// Section 14.3.1 Let, Const, and Using Declarations + /// UsingDeclaration[In, Yield, Await] : + /// using [no LineTerminator here] [lookahead ≠ await] BindingList[?In, ?Yield, ?Await, ~Pattern] ; + pub(crate) fn parse_using_declaration( + &mut self, + statement_ctx: StatementContext, + ) -> Result> { + let span = self.start_span(); + + let is_await = self.eat(Kind::Await); + + self.expect(Kind::Using)?; + + // `[no LineTerminator here]` + if self.cur_token().is_on_new_line { + self.error(diagnostics::LineTerminatorBeforeUsingDeclaration(self.cur_token().span())); + } + + // [lookahead ≠ await] + if self.cur_kind() == Kind::Await { + self.error(diagnostics::AwaitInUsingDeclaration(self.cur_token().span())); + self.eat(Kind::Await); + } + + // BindingList[?In, ?Yield, ?Await, ~Pattern] + let mut declarations: oxc_allocator::Vec<'_, VariableDeclarator<'_>> = self.ast.new_vec(); + loop { + let declaration = self.parse_variable_declarator( + VariableDeclarationContext::new(VariableDeclarationParent::Statement), + VariableDeclarationKind::Var, + )?; + + match declaration.id.kind { + BindingPatternKind::BindingIdentifier(_) => {} + _ => { + self.error(diagnostics::InvalidIdentifierInUsingDeclaration( + declaration.id.span(), + )); + } + } + + // Excluding `for` loops, an initializer is required in a UsingDeclaration. + if declaration.init.is_none() && !matches!(statement_ctx, StatementContext::For) { + self.error(diagnostics::UsingDeclarationsMustBeInitialized(declaration.id.span())); + } + + declarations.push(declaration); + if !self.eat(Kind::Comma) { + break; + } + } + + Ok(self.ast.using_declaration(self.end_span(span), declarations, is_await)) + } } diff --git a/crates/oxc_parser/src/js/statement.rs b/crates/oxc_parser/src/js/statement.rs index 9b26b6e33..b04645054 100644 --- a/crates/oxc_parser/src/js/statement.rs +++ b/crates/oxc_parser/src/js/statement.rs @@ -122,6 +122,12 @@ impl<'a> Parser<'a> { self.parse_variable_statement(stmt_ctx) } Kind::Let if !self.cur_token().escaped => self.parse_let(stmt_ctx), + Kind::Await + if self.peek_kind() == Kind::Using && self.nth_kind(2).is_binding_identifier() => + { + self.parse_using() + } + Kind::Using if self.peek_kind().is_binding_identifier() => self.parse_using(), _ if self.at_function_with_async() => self.parse_function_declaration(stmt_ctx), _ if self.ts_enabled() && self.at_start_of_ts_declaration() => { self.parse_ts_declaration_statement(start_span) @@ -253,20 +259,13 @@ impl<'a> Parser<'a> { || self.at(Kind::Var) || (self.at(Kind::Let) && self.peek_kind().is_after_let()) { - let start_span = self.start_span(); - let init_declaration = self.without_context(Context::In, |p| { - let decl_ctx = VariableDeclarationContext::new(VariableDeclarationParent::For); - p.parse_variable_declaration(start_span, decl_ctx, Modifiers::empty()) - })?; + return self.parse_variable_declaration_for_statement(span, r#await); + } - // for (.. a in) for (.. a of) - if matches!(self.cur_kind(), Kind::In | Kind::Of) { - let init = ForStatementLeft::VariableDeclaration(init_declaration); - return self.parse_for_in_or_of_loop(span, r#await, init); - } - - let init = Some(ForStatementInit::VariableDeclaration(init_declaration)); - return self.parse_for_loop(span, init, r#await); + if (self.cur_kind() == Kind::Await && self.peek_kind() == Kind::Using) + || (self.cur_kind() == Kind::Using && self.peek_kind() == Kind::Ident) + { + return self.parse_using_declaration_for_statement(span, r#await); } let is_let_of = self.at(Kind::Let) && self.peek_at(Kind::Of); @@ -297,6 +296,55 @@ impl<'a> Parser<'a> { self.parse_for_loop(span, Some(ForStatementInit::Expression(init_expression)), r#await) } + fn parse_variable_declaration_for_statement( + &mut self, + span: Span, + r#await: bool, + ) -> Result> { + let start_span = self.start_span(); + let init_declaration = self.without_context(Context::In, |p| { + let decl_ctx = VariableDeclarationContext::new(VariableDeclarationParent::For); + p.parse_variable_declaration(start_span, decl_ctx, Modifiers::empty()) + })?; + + // for (.. a in) for (.. a of) + if matches!(self.cur_kind(), Kind::In | Kind::Of) { + let init = ForStatementLeft::VariableDeclaration(init_declaration); + return self.parse_for_in_or_of_loop(span, r#await, init); + } + + let init = Some(ForStatementInit::VariableDeclaration(init_declaration)); + self.parse_for_loop(span, init, r#await) + } + + fn parse_using_declaration_for_statement( + &mut self, + span: Span, + r#await: bool, + ) -> Result> { + let using_decl = self.parse_using_declaration(StatementContext::For)?; + + if matches!(self.cur_kind(), Kind::In) { + if using_decl.is_await { + self.error(diagnostics::AwaitUsingDeclarationNotAllowedInForInStatement( + using_decl.span, + )); + } else { + self.error(diagnostics::UsingDeclarationNotAllowedInForInStatement( + using_decl.span, + )); + } + } + + if matches!(self.cur_kind(), Kind::In | Kind::Of) { + let init = ForStatementLeft::UsingDeclaration(self.ast.alloc(using_decl)); + return self.parse_for_in_or_of_loop(span, r#await, init); + } + + let init = Some(ForStatementInit::UsingDeclaration(self.ast.alloc(using_decl))); + self.parse_for_loop(span, init, r#await) + } + fn parse_for_loop( &mut self, span: Span, diff --git a/crates/oxc_parser/src/lexer/kind.rs b/crates/oxc_parser/src/lexer/kind.rs index c5dbd9254..89e2aed7e 100644 --- a/crates/oxc_parser/src/lexer/kind.rs +++ b/crates/oxc_parser/src/lexer/kind.rs @@ -87,6 +87,7 @@ pub enum Kind { Type, Undefined, Unique, + Using, Unknown, Global, BigInt, @@ -341,7 +342,7 @@ impl Kind { matches!(self, Async | From | Get | Meta | Of | Set | Target | Accessor | Abstract | As | Asserts | Assert | Any | Boolean | Constructor | Declare | Infer | Intrinsic | Is | KeyOf | Module | Namespace | Never | Out | Readonly | Require | Number | Object | Satisfies | String - | Symbol | Type | Undefined | Unique | Unknown | Global | BigInt | Override) + | Symbol | Type | Undefined | Unique | Unknown | Using | Global | BigInt | Override) } #[rustfmt::skip] @@ -441,6 +442,7 @@ impl Kind { "target" => Target, "typeof" => Typeof, "unique" => Unique, + "using" => Using, "asserts" => Asserts, "boolean" => Boolean, @@ -505,6 +507,7 @@ impl Kind { Finally => "finally", For => "for", Function => "function", + Using => "using", If => "if", Import => "import", In => "in", diff --git a/crates/oxc_parser/src/lexer/mod.rs b/crates/oxc_parser/src/lexer/mod.rs index 5ed7a1e03..1631753cb 100644 --- a/crates/oxc_parser/src/lexer/mod.rs +++ b/crates/oxc_parser/src/lexer/mod.rs @@ -1788,6 +1788,7 @@ const L_T: ByteHandler = |lexer| match &lexer.identifier_name_handler()[1..] { const L_U: ByteHandler = |lexer| match &lexer.identifier_name_handler()[1..] { "ndefined" => Kind::Undefined, + "sing" => Kind::Using, "nique" => Kind::Unique, "nknown" => Kind::Unknown, _ => Kind::Ident, diff --git a/crates/oxc_type_synthesis/src/statements_and_declarations.rs b/crates/oxc_type_synthesis/src/statements_and_declarations.rs index 54b6cadd7..8cc6dec2a 100644 --- a/crates/oxc_type_synthesis/src/statements_and_declarations.rs +++ b/crates/oxc_type_synthesis/src/statements_and_declarations.rs @@ -29,6 +29,7 @@ pub(crate) fn hoist_statements( for (idx, statement) in statements.iter().enumerate() { if let Statement::Declaration(declaration) = statement { match declaration { + ast::Declaration::UsingDeclaration(_) => todo!(), ast::Declaration::VariableDeclaration(_) | ast::Declaration::FunctionDeclaration(_) => {} ast::Declaration::ClassDeclaration(_) => {} @@ -69,6 +70,7 @@ pub(crate) fn hoist_statements( match statement { Statement::ModuleDeclaration(_) => {} Statement::Declaration(declaration) => match declaration { + ast::Declaration::UsingDeclaration(_) => todo!(), ast::Declaration::VariableDeclaration(declaration) => { let is_declare = declaration.modifiers.contains(ast::ModifierKind::Declare); let is_const = matches!(declaration.kind, ast::VariableDeclarationKind::Const); @@ -363,6 +365,8 @@ pub(crate) fn synthesize_declaration( checking_data: &mut CheckingData, ) { match declaration { + ast::Declaration::UsingDeclaration(_) => todo!(), + ast::Declaration::VariableDeclaration(variable_declaration) => { if variable_declaration.modifiers.contains(ast::ModifierKind::Declare) { return; diff --git a/tasks/coverage/babel b/tasks/coverage/babel index d062d47d5..b5d6c3c82 160000 --- a/tasks/coverage/babel +++ b/tasks/coverage/babel @@ -1 +1 @@ -Subproject commit d062d47d57a679953144ccf1e60b3efc297e5b43 +Subproject commit b5d6c3c820af3c049b476df6e885fef33fa953f1 diff --git a/tasks/coverage/formatter_babel.snap b/tasks/coverage/formatter_babel.snap index d0fe18010..517c0e933 100644 --- a/tasks/coverage/formatter_babel.snap +++ b/tasks/coverage/formatter_babel.snap @@ -1,6 +1,6 @@ formatter_babel Summary: -AST Parsed : 2078/2078 (100.00%) -Positive Passed: 2055/2078 (98.89%) +AST Parsed : 2096/2096 (100.00%) +Positive Passed: 2073/2096 (98.90%) Expect to Parse: "typescript/cast/nested-parenthesized-assert-and-assign/input.ts" Expect to Parse: "typescript/class/abstract/input.ts" Expect to Parse: "typescript/class/declare/input.ts" diff --git a/tasks/coverage/formatter_test262.snap b/tasks/coverage/formatter_test262.snap index 1372f618f..69413fed8 100644 --- a/tasks/coverage/formatter_test262.snap +++ b/tasks/coverage/formatter_test262.snap @@ -1,3 +1,3 @@ formatter_test262 Summary: -AST Parsed : 44738/44738 (100.00%) -Positive Passed: 44738/44738 (100.00%) +AST Parsed : 45488/45488 (100.00%) +Positive Passed: 45488/45488 (100.00%) diff --git a/tasks/coverage/minifier_test262.snap b/tasks/coverage/minifier_test262.snap index cb57fc58a..f78226b29 100644 --- a/tasks/coverage/minifier_test262.snap +++ b/tasks/coverage/minifier_test262.snap @@ -1,3 +1,3 @@ minifier_test262 Summary: -AST Parsed : 44738/44738 (100.00%) -Positive Passed: 44738/44738 (100.00%) +AST Parsed : 45374/45374 (100.00%) +Positive Passed: 45374/45374 (100.00%) diff --git a/tasks/coverage/parser_babel.snap b/tasks/coverage/parser_babel.snap index b69ec2c94..a84e44f82 100644 --- a/tasks/coverage/parser_babel.snap +++ b/tasks/coverage/parser_babel.snap @@ -1,7 +1,7 @@ parser_babel Summary: -AST Parsed : 2072/2078 (99.71%) -Positive Passed: 2069/2078 (99.57%) -Negative Passed: 1342/1507 (89.05%) +AST Parsed : 2090/2096 (99.71%) +Positive Passed: 2087/2096 (99.57%) +Negative Passed: 1349/1499 (89.99%) Expect Syntax Error: "annex-b/disabled/1.1-html-comments-close/input.js" Expect Syntax Error: "annex-b/disabled/3.1-sloppy-labeled-functions/input.js" Expect Syntax Error: "annex-b/disabled/3.1-sloppy-labeled-functions-if-body/input.js" @@ -21,11 +21,9 @@ Expect Syntax Error: "es2015/class-methods/direct-super-in-object-method/input.j Expect Syntax Error: "es2015/destructuring/error-operator-for-default/input.js" Expect Syntax Error: "es2015/for-of/invalid-let-as-identifier/input.js" Expect Syntax Error: "es2015/object/disallow-duplicate-method-params/input.js" -Expect Syntax Error: "es2015/uncategorised/.191/input.js" -Expect Syntax Error: "es2015/uncategorised/.335/input.js" -Expect Syntax Error: "es2015/uncategorised/.343/input.js" Expect Syntax Error: "es2015/uncategorised/220/input.js" Expect Syntax Error: "es2015/uncategorised/297/input.js" +Expect Syntax Error: "es2015/uncategorised/335/input.js" Expect Syntax Error: "es2017/async-functions/await-binding-inside-arrow-params-inside-async-arrow-params/input.js" Expect Syntax Error: "es2017/trailing-function-commas/7/input.js" Expect Syntax Error: "es2018/object-rest-spread/24/input.js" @@ -35,20 +33,11 @@ Expect Syntax Error: "es2018/object-rest-spread/comma-after-spread-nested/input. Expect Syntax Error: "es2018/object-rest-spread/no-pattern-in-rest/input.js" Expect Syntax Error: "es2018/object-rest-spread/no-pattern-in-rest-with-ts/input.js" Expect Syntax Error: "es2020/dynamic-import/invalid-trailing-comma/input.js" +Expect Syntax Error: "es2020/dynamic-import-createImportExpression-false/invalid-trailing-comma/input.js" Expect Syntax Error: "esprima/es2015-arrow-function/invalid-param-strict-mode/input.js" -Expect Syntax Error: "esprima/es2015-generator/.generator-parameter-binding-property-reserved/input.js" -Expect Syntax Error: "esprima/es2015-identifier/.invalid_function_wait/input.js" -Expect Syntax Error: "esprima/expression-primary-literal-regular-expression/.migrated_0005/input.js" -Expect Syntax Error: "esprima/expression-primary-literal-regular-expression/.migrated_0006/input.js" -Expect Syntax Error: "esprima/expression-primary-literal-regular-expression/.u-flag-invalid-range-4-hex/input.js" -Expect Syntax Error: "esprima/expression-primary-literal-regular-expression/.u-flag-invalid-range-var-hex/input.js" -Expect Syntax Error: "esprima/invalid-syntax/.GH-1106-09/input.js" -Expect Syntax Error: "esprima/invalid-syntax/.migrated_0035/input.js" +Expect Syntax Error: "esprima/es2015-generator/generator-parameter-binding-property-reserved/input.js" Expect Syntax Error: "esprima/invalid-syntax/migrated_0101/input.js" Expect Syntax Error: "esprima/rest-parameter/invalid-setter-rest/input.js" -Expect Syntax Error: "esprima/statement-if/.migrated_0003/input.js" -Expect Syntax Error: "esprima/statement-iteration/.migrated_0021/input.js" -Expect Syntax Error: "esprima/statement-iteration/.pattern-in-for-in/input.js" Expect Syntax Error: "typescript/arrow-function/async-rest-optional-parameter/input.ts" Expect Syntax Error: "typescript/cast/satisfies-const-error/input.ts" Expect Syntax Error: "typescript/cast/unparenthesized-assert-and-assign/input.ts" @@ -161,12 +150,8 @@ Expect Syntax Error: "typescript/types/read-only-1/input.ts" Expect Syntax Error: "typescript/types/read-only-2/input.ts" Expect Syntax Error: "typescript/types/read-only-3/input.ts" Expect Syntax Error: "typescript/types/read-only-4/input.ts" -Expect Syntax Error: "typescript/types/tuple-labeled-after-unlabeled/input.ts" -Expect Syntax Error: "typescript/types/tuple-labeled-before-unlabeled/input.ts" Expect Syntax Error: "typescript/types/tuple-optional-invalid/input.ts" Expect Syntax Error: "typescript/types/tuple-required-after-labeled-optional/input.ts" -Expect Syntax Error: "typescript/types/tuple-unlabeled-spread-after-labeled/input.ts" -Expect Syntax Error: "typescript/types/tuple-unlabeled-spread-before-labeled/input.ts" Expect to Parse: "core/opts/allowNewTargetOutsideFunction-true/input.js" × Unexpected new.target expression ╭─[core/opts/allowNewTargetOutsideFunction-true/input.js:1:1] @@ -599,12 +584,24 @@ Expect to Parse: "typescript/types/const-type-parameters-babel-7/input.ts" · ──────── ╰──── + × A 'get' accessor must not have any formal parameters. + ╭─[core/object/invalid-getter-param/input.js:1:1] + 1 │ ({ get prop(x) {} }) + · ─── + ╰──── + × A 'set' accessor must have exactly one parameter. - ╭─[core/object/invalid-setter/input.js:1:1] + ╭─[core/object/invalid-setter-no-param/input.js:1:1] 1 │ ({ set x(){} }) · ── ╰──── + × A 'set' accessor must have exactly one parameter. + ╭─[core/object/invalid-setter-two-params/input.js:1:1] + 1 │ ({ set prop(x, y) {} }) + · ────── + ╰──── + × Expected `(` but found `await` ╭─[core/opts/allowAwaitOutsideFunction-false/input.js:1:1] 1 │ for await (const i of imports) {} @@ -931,24 +928,6 @@ Expect to Parse: "typescript/types/const-type-parameters-babel-7/input.ts" ╰──── help: In strict mode code, functions can only be declared at top level or inside a block - × A 'get' accessor must not have any formal parameters. - ╭─[core/uncategorised/.542/input.js:1:1] - 1 │ ({ get prop(x) {} }) - · ─── - ╰──── - - × A 'set' accessor must have exactly one parameter. - ╭─[core/uncategorised/.543/input.js:1:1] - 1 │ ({ set prop() {} }) - · ── - ╰──── - - × A 'set' accessor must have exactly one parameter. - ╭─[core/uncategorised/.544/input.js:1:1] - 1 │ ({ set prop(x, y) {} }) - · ────── - ╰──── - × Expected a semicolon or an implicit semicolon after a statement, but found none ╭─[core/uncategorised/108/input.js:1:1] 1 │ var x = /[P QR]/\u0067 @@ -3365,24 +3344,6 @@ Expect to Parse: "typescript/types/const-type-parameters-babel-7/input.ts" 3 │ `; ╰──── - × A 'yield' expression is only allowed in a generator body. - ╭─[es2015/uncategorised/.260/input.js:1:1] - 1 │ (function() { "use strict"; f(yield v) }) - · ───── - ╰──── - - × A 'get' accessor must not have any formal parameters. - ╭─[es2015/uncategorised/.345/input.js:1:1] - 1 │ class A { get prop(x) {} } - · ─── - ╰──── - - × A 'set' accessor must have exactly one parameter. - ╭─[es2015/uncategorised/.346/input.js:1:1] - 1 │ class A { set prop() {} } - · ── - ╰──── - × for-of loop variable declaration may not have an initializer ╭─[es2015/uncategorised/109/input.js:1:1] 1 │ for (var x = 42 of list) process(x); @@ -3756,6 +3717,12 @@ Expect to Parse: "typescript/types/const-type-parameters-babel-7/input.ts" · ╰── `]` expected ╰──── + × A 'yield' expression is only allowed in a generator body. + ╭─[es2015/uncategorised/260/input.js:1:1] + 1 │ (function() { "use strict"; f(yield v) }) + · ───── + ╰──── + × Expected `(` but found `**` ╭─[es2015/uncategorised/261/input.js:1:1] 1 │ var obj = { *test** } @@ -4020,6 +3987,18 @@ Expect to Parse: "typescript/types/const-type-parameters-babel-7/input.ts" · ───── ╰──── + × A 'get' accessor must not have any formal parameters. + ╭─[es2015/uncategorised/345/input.js:1:1] + 1 │ class A { get prop(x) {} } + · ─── + ╰──── + + × A 'set' accessor must have exactly one parameter. + ╭─[es2015/uncategorised/346/input.js:1:1] + 1 │ class A { set prop() {} } + · ── + ╰──── + × A 'set' accessor must have exactly one parameter. ╭─[es2015/uncategorised/347/input.js:1:1] 1 │ class A { set prop(x, y) {} } @@ -5328,6 +5307,12 @@ Expect to Parse: "typescript/types/const-type-parameters-babel-7/input.ts" · ─── ╰──── + × Unexpected token + ╭─[es2020/dynamic-import/invalid-lone-import/input.js:1:1] + 1 │ (import) + · ─ + ╰──── + × Cannot use new with dynamic import ╭─[es2020/dynamic-import/invalid-new/input.js:1:1] 1 │ new import("foo"); @@ -5347,6 +5332,45 @@ Expect to Parse: "typescript/types/const-type-parameters-babel-7/input.ts" · ─ ╰──── + × The only valid meta property for import is import.meta + ╭─[es2020/dynamic-import-createImportExpression-false/direct-calls-only/input.js:1:1] + 1 │ function failsParse() { + 2 │ return import.then(); + · ─────────── + 3 │ } + ╰──── + + × Unexpected token + ╭─[es2020/dynamic-import-createImportExpression-false/invalid-arguments-spread/input.js:1:1] + 1 │ import(...[1]) + · ─── + ╰──── + + × Unexpected token + ╭─[es2020/dynamic-import-createImportExpression-false/invalid-lone-import/input.js:1:1] + 1 │ (import) + · ─ + ╰──── + + × Cannot use new with dynamic import + ╭─[es2020/dynamic-import-createImportExpression-false/invalid-new/input.js:1:1] + 1 │ new import("foo"); + · ───────────── + ╰──── + + × Expected `)` but found `string` + ╭─[es2020/dynamic-import-createImportExpression-false/multiple-args/input.js:1:1] + 1 │ import('hello', 'world', '!'); + · ─┬─ + · ╰── `)` expected + ╰──── + + × Unexpected token + ╭─[es2020/dynamic-import-createImportExpression-false/no-args/input.js:1:1] + 1 │ import(); + · ─ + ╰──── + × Unexpected import.meta expression ╭─[es2020/import-meta/error-in-script/input.js:1:1] 1 │ const x = import.meta; @@ -6737,12 +6761,6 @@ Expect to Parse: "typescript/types/const-type-parameters-babel-7/input.ts" · ╰── `x` has already been declared here ╰──── - × Unexpected trailing comma after rest element - ╭─[esprima/es2015-array-binding-pattern/.invalid-elision-after-rest/input.js:1:1] - 1 │ ([a,...b,])=>0; - · ─ - ╰──── - × Identifier `b` has already been declared ╭─[esprima/es2015-array-binding-pattern/invalid-dup-param/input.js:1:1] 1 │ ([a,[b],...b])=>0; @@ -6751,6 +6769,12 @@ Expect to Parse: "typescript/types/const-type-parameters-babel-7/input.ts" · ╰── `b` has already been declared here ╰──── + × Unexpected trailing comma after rest element + ╭─[esprima/es2015-array-binding-pattern/invalid-elision-after-rest/input.js:1:1] + 1 │ ([a,...b,])=>0; + · ─ + ╰──── + × Identifier `a` has already been declared ╭─[esprima/es2015-array-pattern/dupe-param-1/input.js:1:1] 1 │ "use strict"; @@ -6881,7 +6905,7 @@ Expect to Parse: "typescript/types/const-type-parameters-babel-7/input.ts" ╰──── × Cannot assign to 'eval' in strict mode - ╭─[esprima/es2015-class/.migrated_0026/input.js:1:1] + ╭─[esprima/es2015-class/invalid-eval-in-class-method-params/input.js:1:1] 1 │ class A {a(eval){}} · ──── ╰──── @@ -7088,19 +7112,6 @@ Expect to Parse: "typescript/types/const-type-parameters-babel-7/input.ts" · ─ ╰──── - × Invalid Unicode escape sequence - ╭─[esprima/es2015-identifier/.invalid_lone_surrogate/input.js:1:1] - 1 │ \uD800! - · ───── - ╰──── - - × Expected a semicolon or an implicit semicolon after a statement, but found none - ╭─[esprima/es2015-identifier/.invalid_lone_surrogate/input.js:1:1] - 1 │ \uD800! - · ▲ - ╰──── - help: Try insert a semicolon here - × Invalid Unicode escape sequence ╭─[esprima/es2015-identifier/invalid_escaped_surrogate_pairs/input.js:1:1] 1 │ var \uD83B\uDE00 @@ -7119,6 +7130,19 @@ Expect to Parse: "typescript/types/const-type-parameters-babel-7/input.ts" · ─ ╰──── + × Invalid Unicode escape sequence + ╭─[esprima/es2015-identifier/invalid_lone_surrogate/input.js:1:1] + 1 │ \uD800! + · ───── + ╰──── + + × Expected a semicolon or an implicit semicolon after a statement, but found none + ╭─[esprima/es2015-identifier/invalid_lone_surrogate/input.js:1:1] + 1 │ \uD800! + · ▲ + ╰──── + help: Try insert a semicolon here + × Cannot use export statement outside a module ╭─[esprima/es2015-identifier/invalid_var_await/input.js:1:1] 1 │ export var await; @@ -7337,7 +7361,7 @@ Expect to Parse: "typescript/types/const-type-parameters-babel-7/input.ts" ╰──── × 'super' can only be used with function calls or in property accesses - ╭─[esprima/es2015-super-property/.invalid_super_access/input.js:2:1] + ╭─[esprima/es2015-super-property/invalid_super_access/input.js:2:1] 2 │ constructor() { 3 │ (super)(); · ───── @@ -7346,7 +7370,7 @@ Expect to Parse: "typescript/types/const-type-parameters-babel-7/input.ts" help: replace with `super()` or `super.prop` or `super[prop]` × 'super' can only be used with function calls or in property accesses - ╭─[esprima/es2015-super-property/.invalid_super_id/input.js:1:1] + ╭─[esprima/es2015-super-property/invalid_super_id/input.js:1:1] 1 │ class A { 2 │ foo() { new super + 3 } · ───── @@ -7356,7 +7380,7 @@ Expect to Parse: "typescript/types/const-type-parameters-babel-7/input.ts" × Super calls are not permitted outside constructors or in nested functions inside constructors. │ - ╭─[esprima/es2015-super-property/.invalid_super_id/input.js:1:1] + ╭─[esprima/es2015-super-property/invalid_super_id/input.js:1:1] 1 │ class A { 2 │ foo() { new super + 3 } · ───────── @@ -7370,18 +7394,6 @@ Expect to Parse: "typescript/types/const-type-parameters-babel-7/input.ts" · ─────── ╰──── - × Bad escape sequence in untagged template literal - ╭─[esprima/es2015-template-literals/.octal-literal/input.js:1:1] - 1 │ `\00`; - · ─── - ╰──── - - × Bad escape sequence in untagged template literal - ╭─[esprima/es2015-template-literals/.strict-octal-literal/input.js:1:1] - 1 │ 'use strict'; `\00`; - · ─── - ╰──── - × Expected `(` but found `${}` ╭─[esprima/es2015-template-literals/after-switch/input.js:1:1] 1 │ switch `test` @@ -7395,6 +7407,18 @@ Expect to Parse: "typescript/types/const-type-parameters-babel-7/input.ts" · ── ╰──── + × Bad escape sequence in untagged template literal + ╭─[esprima/es2015-template-literals/invalid-octal-literal/input.js:1:1] + 1 │ `\00`; + · ─── + ╰──── + + × Bad escape sequence in untagged template literal + ╭─[esprima/es2015-template-literals/invalid-strict-octal-literal/input.js:1:1] + 1 │ 'use strict'; `\00`; + · ─── + ╰──── + × Unterminated string ╭─[esprima/es2015-template-literals/unclosed/input.js:1:1] 1 │ `test @@ -7660,6 +7684,13 @@ Expect to Parse: "typescript/types/const-type-parameters-babel-7/input.ts" · ───── ╰──── + × Invalid escape sequence + ╭─[esprima/invalid-syntax/GH-1106-09/input.js:1:1] + 1 │ "\9"; + · ──── + ╰──── + help: \8 and \9 are not allowed in strict mode + × Expected `}` but found `EOF` ╭─[esprima/invalid-syntax/migrated_0000/input.js:1:1] 1 │ { diff --git a/tasks/coverage/parser_test262.snap b/tasks/coverage/parser_test262.snap index 1d85424ac..121f7c776 100644 --- a/tasks/coverage/parser_test262.snap +++ b/tasks/coverage/parser_test262.snap @@ -1,6 +1,6 @@ parser_test262 Summary: -AST Parsed : 44219/44219 (100.00%) -Positive Passed: 44219/44219 (100.00%) +AST Parsed : 44964/44964 (100.00%) +Positive Passed: 44964/44964 (100.00%) Negative Passed: 3919/3947 (99.29%) Expect Syntax Error: "built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-01.js" Expect Syntax Error: "built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-02.js" @@ -13006,13 +13006,6 @@ Expect Syntax Error: "built-ins/RegExp/prototype/unicodeSets/breaking-change-fro · ───────────────── ╰──── - × The keyword 'yield' is reserved - ╭─[language/expressions/dynamic-import/2nd-param-yield-ident-invalid.js:18:1] - 18 │ - 19 │ import('./empty_FIXTURE.js', yield); - · ───── - ╰──── - × Keywords cannot contain escape characters ╭─[language/expressions/dynamic-import/escape-sequence-import.js:34:1] 34 │ @@ -13020,6 +13013,13 @@ Expect Syntax Error: "built-ins/RegExp/prototype/unicodeSets/breaking-change-fro · ─────────── ╰──── + × The keyword 'yield' is reserved + ╭─[language/expressions/dynamic-import/import-assertions/2nd-param-yield-ident-invalid.js:18:1] + 18 │ + 19 │ import('./empty_FIXTURE.js', yield); + · ───── + ╰──── + × Cannot assign to this expression ╭─[language/expressions/dynamic-import/syntax/invalid/invalid-assignmenttargettype-syntax-error-1-update-expression.js:45:1] 45 │ @@ -19355,45 +19355,6 @@ Expect Syntax Error: "built-ins/RegExp/prototype/unicodeSets/breaking-change-fro · ─ ╰──── - × Identifier `test262_a` has already been declared - ╭─[language/module-code/early-dup-assert-key-export.js:20:1] - 20 │ export * from './import-assertion-3_FIXTURE.js' assert { - 21 │ test262_a: '', - · ────┬──── - · ╰── `test262_a` has already been declared here - 22 │ test262_b: '', - 23 │ 'test262_\u0061': '' - · ────────┬─────── - · ╰── It can not be redeclared here - 24 │ }; - ╰──── - - × Identifier `test262_a` has already been declared - ╭─[language/module-code/early-dup-assert-key-import-nobinding.js:21:1] - 21 │ import './import-assertion-2_FIXTURE.js' assert { - 22 │ test262_a: '', - · ────┬──── - · ╰── `test262_a` has already been declared here - 23 │ test262_b: '', - 24 │ 'test262_\u0061': '' - · ────────┬─────── - · ╰── It can not be redeclared here - 25 │ }; - ╰──── - - × Identifier `test262_a` has already been declared - ╭─[language/module-code/early-dup-assert-key-import-withbinding.js:21:1] - 21 │ import x from './import-assertion-1_FIXTURE.js' assert { - 22 │ test262_a: '', - · ────┬──── - · ╰── `test262_a` has already been declared here - 23 │ test262_b: '', - 24 │ 'test262_\u0061': '' - · ────────┬─────── - · ╰── It can not be redeclared here - 25 │ }; - ╰──── - × Duplicated export 'z' ╭─[language/module-code/early-dup-export-as-star-as.js:17:1] 17 │ var x; @@ -19774,6 +19735,42 @@ Expect Syntax Error: "built-ins/RegExp/prototype/unicodeSets/breaking-change-fro 22 │ ╰──── + × Identifier `type` has already been declared + ╭─[language/module-code/import-assertions/early-dup-assert-key-export.js:20:1] + 20 │ export * from './import-assertion-3_FIXTURE.js' assert { + 21 │ type: 'json', + · ──┬─ + · ╰── `type` has already been declared here + 22 │ 'typ\u0065': '' + · ─────┬───── + · ╰── It can not be redeclared here + 23 │ }; + ╰──── + + × Identifier `type` has already been declared + ╭─[language/module-code/import-assertions/early-dup-assert-key-import-nobinding.js:21:1] + 21 │ import './import-assertion-2_FIXTURE.js' assert { + 22 │ type: 'json', + · ──┬─ + · ╰── `type` has already been declared here + 23 │ 'typ\u0065': '' + · ─────┬───── + · ╰── It can not be redeclared here + 24 │ }; + ╰──── + + × Identifier `type` has already been declared + ╭─[language/module-code/import-assertions/early-dup-assert-key-import-withbinding.js:21:1] + 21 │ import x from './import-assertion-1_FIXTURE.js' assert { + 22 │ type: 'json', + · ──┬─ + · ╰── `type` has already been declared here + 23 │ 'typ\u0065': '' + · ─────┬───── + · ╰── It can not be redeclared here + 24 │ }; + ╰──── + × Private identifier '#x' is not allowed outside class bodies ╭─[language/module-code/invalid-private-names-call-expression-bad-reference.js:39:1] 39 │ diff --git a/tasks/coverage/parser_typescript.snap b/tasks/coverage/parser_typescript.snap index 2380d173b..cf2220485 100644 --- a/tasks/coverage/parser_typescript.snap +++ b/tasks/coverage/parser_typescript.snap @@ -1,7 +1,7 @@ parser_typescript Summary: -AST Parsed : 5060/5063 (99.94%) -Positive Passed: 5051/5063 (99.76%) -Negative Passed: 994/4761 (20.88%) +AST Parsed : 5167/5171 (99.92%) +Positive Passed: 5159/5171 (99.77%) +Negative Passed: 1023/4841 (21.13%) Expect Syntax Error: "compiler/ClassDeclaration10.ts" Expect Syntax Error: "compiler/ClassDeclaration11.ts" Expect Syntax Error: "compiler/ClassDeclaration13.ts" @@ -79,6 +79,7 @@ Expect Syntax Error: "compiler/argumentsObjectIterator02_ES5.ts" Expect Syntax Error: "compiler/argumentsObjectIterator03_ES5.ts" Expect Syntax Error: "compiler/argumentsPropertyNameInJsMode1.ts" Expect Syntax Error: "compiler/argumentsReferenceInConstructor4_Js.ts" +Expect Syntax Error: "compiler/argumentsReferenceInFunction1_Js.ts" Expect Syntax Error: "compiler/argumentsReferenceInMethod4_Js.ts" Expect Syntax Error: "compiler/argumentsReferenceInObjectLiteral_Js.ts" Expect Syntax Error: "compiler/argumentsSpreadRestIterables.tsx" @@ -253,6 +254,7 @@ Expect Syntax Error: "compiler/checkSuperCallBeforeThisAccessing5.ts" Expect Syntax Error: "compiler/checkSuperCallBeforeThisAccessing8.ts" Expect Syntax Error: "compiler/checkTypePredicateForRedundantProperties.ts" Expect Syntax Error: "compiler/circularAccessorAnnotations.ts" +Expect Syntax Error: "compiler/circularBaseConstraint.ts" Expect Syntax Error: "compiler/circularBaseTypes.ts" Expect Syntax Error: "compiler/circularConstraintYieldsAppropriateError.ts" Expect Syntax Error: "compiler/circularModuleImports.ts" @@ -274,6 +276,11 @@ Expect Syntax Error: "compiler/classExtendsInterfaceThatExtendsClassWithPrivates Expect Syntax Error: "compiler/classExtendsInterface_not.ts" Expect Syntax Error: "compiler/classExtendsMultipleBaseClasses.ts" Expect Syntax Error: "compiler/classExtendsNull.ts" +Expect Syntax Error: "compiler/classExtendsNull2.ts" +Expect Syntax Error: "compiler/classExtendsNull3.ts" +Expect Syntax Error: "compiler/classFieldSuperAccessibleJs1.ts" +Expect Syntax Error: "compiler/classFieldSuperNotAccessible.ts" +Expect Syntax Error: "compiler/classFieldSuperNotAccessibleJs.ts" Expect Syntax Error: "compiler/classImplementsClass2.ts" Expect Syntax Error: "compiler/classImplementsClass4.ts" Expect Syntax Error: "compiler/classImplementsClass5.ts" @@ -405,7 +412,9 @@ Expect Syntax Error: "compiler/contextualTypingOfGenericFunctionTypedArguments1. Expect Syntax Error: "compiler/contextualTypingOfLambdaReturnExpression.ts" Expect Syntax Error: "compiler/contextualTypingOfObjectLiterals2.ts" Expect Syntax Error: "compiler/contextualTypingWithFixedTypeParameters1.ts" +Expect Syntax Error: "compiler/contextuallyTypedParametersOptionalInJSDoc.ts" Expect Syntax Error: "compiler/contextuallyTypedParametersWithInitializers.ts" +Expect Syntax Error: "compiler/contextuallyTypedParametersWithQuestionToken.ts" Expect Syntax Error: "compiler/contextuallyTypingRestParameters.ts" Expect Syntax Error: "compiler/continueInIterationStatement4.ts" Expect Syntax Error: "compiler/continueNotInIterationStatement4.ts" @@ -467,6 +476,7 @@ Expect Syntax Error: "compiler/deepKeysIndexing.ts" Expect Syntax Error: "compiler/deeplyNestedAssignabilityErrorsCombined.ts" Expect Syntax Error: "compiler/deeplyNestedAssignabilityIssue.ts" Expect Syntax Error: "compiler/deeplyNestedCheck.ts" +Expect Syntax Error: "compiler/deeplyNestedMappedTypes.ts" Expect Syntax Error: "compiler/defaultArgsInFunctionExpressions.ts" Expect Syntax Error: "compiler/defaultArgsInOverloads.ts" Expect Syntax Error: "compiler/defaultBestCommonTypesHaveDecls.ts" @@ -476,6 +486,7 @@ Expect Syntax Error: "compiler/defaultValueInFunctionTypes.ts" Expect Syntax Error: "compiler/definiteAssignmentWithErrorStillStripped.ts" Expect Syntax Error: "compiler/deleteOperator1.ts" Expect Syntax Error: "compiler/deleteReadonly.ts" +Expect Syntax Error: "compiler/deleteReadonlyInStrictNullChecks.ts" Expect Syntax Error: "compiler/derivedClassOverridesPrivateFunction1.ts" Expect Syntax Error: "compiler/derivedClasses.ts" Expect Syntax Error: "compiler/derivedInterfaceCallSignature.ts" @@ -495,12 +506,14 @@ Expect Syntax Error: "compiler/didYouMeanElaborationsForExpressionsWhichCouldBeC Expect Syntax Error: "compiler/didYouMeanStringLiteral.ts" Expect Syntax Error: "compiler/didYouMeanSuggestionErrors.ts" Expect Syntax Error: "compiler/differentTypesWithSameName.ts" +Expect Syntax Error: "compiler/discriminateWithMissingProperty.ts" Expect Syntax Error: "compiler/discriminatedUnionErrorMessage.ts" Expect Syntax Error: "compiler/dissallowSymbolAsWeakType.ts" Expect Syntax Error: "compiler/divergentAccessorsTypes2.ts" Expect Syntax Error: "compiler/divergentAccessorsTypes4.ts" Expect Syntax Error: "compiler/divergentAccessorsTypes5.ts" Expect Syntax Error: "compiler/divergentAccessorsTypes6.ts" +Expect Syntax Error: "compiler/divergentAccessorsTypes8.ts" Expect Syntax Error: "compiler/divergentAccessorsVisibility1.ts" Expect Syntax Error: "compiler/doNotElaborateAssignabilityToTypeParameters.ts" Expect Syntax Error: "compiler/doYouNeedToChangeYourTargetLibraryES2015.ts" @@ -622,6 +635,7 @@ Expect Syntax Error: "compiler/esModuleInteropUsesExportStarWhenDefaultPlusNames Expect Syntax Error: "compiler/evalAfter0.ts" Expect Syntax Error: "compiler/evolvingArrayResolvedAssert.ts" Expect Syntax Error: "compiler/exactSpellingSuggestion.ts" +Expect Syntax Error: "compiler/excessPropertiesInOverloads.ts" Expect Syntax Error: "compiler/excessPropertyCheckIntersectionWithIndexSignature.ts" Expect Syntax Error: "compiler/excessPropertyCheckIntersectionWithRecursiveType.ts" Expect Syntax Error: "compiler/excessPropertyCheckWithEmptyObject.ts" @@ -789,6 +803,7 @@ Expect Syntax Error: "compiler/genericGetter2.ts" Expect Syntax Error: "compiler/genericGetter3.ts" Expect Syntax Error: "compiler/genericImplements.ts" Expect Syntax Error: "compiler/genericIndexTypeHasSensibleErrorMessage.ts" +Expect Syntax Error: "compiler/genericIndexedAccessVarianceComparisonResultCorrect.ts" Expect Syntax Error: "compiler/genericInterfacesWithoutTypeArguments.ts" Expect Syntax Error: "compiler/genericLambaArgWithoutTypeArguments.ts" Expect Syntax Error: "compiler/genericMappedTypeAsClause.ts" @@ -902,12 +917,15 @@ Expect Syntax Error: "compiler/indexSignatureWithInitializer.ts" Expect Syntax Error: "compiler/indexWithUndefinedAndNull.ts" Expect Syntax Error: "compiler/indexWithUndefinedAndNullStrictNullChecks.ts" Expect Syntax Error: "compiler/indexWithoutParamType2.ts" +Expect Syntax Error: "compiler/indexedAccessConstraints.ts" Expect Syntax Error: "compiler/indexedAccessImplicitlyAny.ts" Expect Syntax Error: "compiler/indexedAccessPrivateMemberOfGenericConstraint.ts" Expect Syntax Error: "compiler/indexedAccessRelation.ts" Expect Syntax Error: "compiler/indexedAccessWithFreshObjectLiteral.ts" +Expect Syntax Error: "compiler/indexedAccessWithVariableElement.ts" Expect Syntax Error: "compiler/indexer2A.ts" Expect Syntax Error: "compiler/indexerConstraints.ts" +Expect Syntax Error: "compiler/indirectDiscriminantAndExcessProperty.ts" Expect Syntax Error: "compiler/indirectSelfReference.ts" Expect Syntax Error: "compiler/indirectSelfReferenceGeneric.ts" Expect Syntax Error: "compiler/inexistentPropertyInsideToStringType.ts" @@ -1019,12 +1037,15 @@ Expect Syntax Error: "compiler/jsFileCompilationAmbientVarDeclarationSyntax.ts" Expect Syntax Error: "compiler/jsFileCompilationBindDeepExportsAssignment.ts" Expect Syntax Error: "compiler/jsFileCompilationBindReachabilityErrors.ts" Expect Syntax Error: "compiler/jsFileCompilationClassMethodContainingArrowFunction.ts" +Expect Syntax Error: "compiler/jsFileCompilationConstructorOverloadSyntax.ts" Expect Syntax Error: "compiler/jsFileCompilationEnumSyntax.ts" Expect Syntax Error: "compiler/jsFileCompilationExportAssignmentSyntax.ts" +Expect Syntax Error: "compiler/jsFileCompilationFunctionOverloadSyntax.ts" Expect Syntax Error: "compiler/jsFileCompilationHeritageClauseSyntaxOfClass.ts" Expect Syntax Error: "compiler/jsFileCompilationImportEqualsSyntax.ts" Expect Syntax Error: "compiler/jsFileCompilationInterfaceSyntax.ts" Expect Syntax Error: "compiler/jsFileCompilationLetBeingRenamed.ts" +Expect Syntax Error: "compiler/jsFileCompilationMethodOverloadSyntax.ts" Expect Syntax Error: "compiler/jsFileCompilationModuleSyntax.ts" Expect Syntax Error: "compiler/jsFileCompilationNonNullAssertion.ts" Expect Syntax Error: "compiler/jsFileCompilationOptionalClassElementSyntaxOfClass.ts" @@ -1079,9 +1100,11 @@ Expect Syntax Error: "compiler/jsxFactoryIdentifierWithAbsentParameter.ts" Expect Syntax Error: "compiler/jsxFactoryMissingErrorInsideAClass.ts" Expect Syntax Error: "compiler/jsxFactoryQualifiedNameResolutionError.ts" Expect Syntax Error: "compiler/jsxImportSourceNonPragmaComment.tsx" +Expect Syntax Error: "compiler/jsxIntrinsicDeclaredUsingTemplateLiteralTypeSignatures.tsx" Expect Syntax Error: "compiler/jsxIntrinsicElementsTypeArgumentErrors.tsx" Expect Syntax Error: "compiler/jsxIssuesErrorWhenTagExpectsTooManyArguments.tsx" Expect Syntax Error: "compiler/jsxNamespacePrefixIntrinsics.tsx" +Expect Syntax Error: "compiler/jsxSpreadTag.ts" Expect Syntax Error: "compiler/keyofDoesntContainSymbols.ts" Expect Syntax Error: "compiler/keyofIsLiteralContexualType.ts" Expect Syntax Error: "compiler/knockout.ts" @@ -1189,6 +1212,7 @@ Expect Syntax Error: "compiler/multivar.ts" Expect Syntax Error: "compiler/mutuallyRecursiveCallbacks.ts" Expect Syntax Error: "compiler/namedFunctionExpressionCallErrors.ts" Expect Syntax Error: "compiler/namespaceDisambiguationInUnion.ts" +Expect Syntax Error: "compiler/namespaceNotMergedWithFunctionDefaultExport.ts" Expect Syntax Error: "compiler/namespacesDeclaration2.ts" Expect Syntax Error: "compiler/nanEquality.ts" Expect Syntax Error: "compiler/narrowByEquality.ts" @@ -1467,6 +1491,7 @@ Expect Syntax Error: "compiler/recursiveTypeParameterConstraintReferenceLacksTyp Expect Syntax Error: "compiler/recursiveTypeRelations.ts" Expect Syntax Error: "compiler/recursivelyExpandingUnionNoStackoverflow.ts" Expect Syntax Error: "compiler/redefineArray.ts" +Expect Syntax Error: "compiler/relationComplexityError.ts" Expect Syntax Error: "compiler/relationalOperatorComparable.ts" Expect Syntax Error: "compiler/renamingDestructuredPropertyInFunctionType.ts" Expect Syntax Error: "compiler/renamingDestructuredPropertyInFunctionType3.ts" @@ -2141,6 +2166,7 @@ Expect Syntax Error: "conformance/classes/staticIndexSignature/staticIndexSignat Expect Syntax Error: "conformance/classes/staticIndexSignature/staticIndexSignature3.ts" Expect Syntax Error: "conformance/classes/staticIndexSignature/staticIndexSignature7.ts" Expect Syntax Error: "conformance/constEnums/constEnum2.ts" +Expect Syntax Error: "conformance/constEnums/constEnumNoObjectPrototypePropertyAccess.ts" Expect Syntax Error: "conformance/constEnums/constEnumPropertyAccess1.ts" Expect Syntax Error: "conformance/constEnums/constEnumPropertyAccess2.ts" Expect Syntax Error: "conformance/controlFlow/controlFlowAliasing.ts" @@ -2193,7 +2219,9 @@ Expect Syntax Error: "conformance/dynamicImport/importCallExpressionSpecifierNot Expect Syntax Error: "conformance/enums/enumConstantMemberWithString.ts" Expect Syntax Error: "conformance/enums/enumConstantMemberWithTemplateLiterals.ts" Expect Syntax Error: "conformance/enums/enumConstantMembers.ts" +Expect Syntax Error: "conformance/enums/enumErrorOnConstantBindingWithInitializer.ts" Expect Syntax Error: "conformance/enums/enumMergingErrors.ts" +Expect Syntax Error: "conformance/enums/enumShadowedInfinityNaN.ts" Expect Syntax Error: "conformance/es2017/useObjectValuesAndEntries2.ts" Expect Syntax Error: "conformance/es2017/useObjectValuesAndEntries3.ts" Expect Syntax Error: "conformance/es2017/useSharedArrayBuffer2.ts" @@ -2229,6 +2257,7 @@ Expect Syntax Error: "conformance/es6/Symbols/symbolProperty32.ts" Expect Syntax Error: "conformance/es6/Symbols/symbolProperty33.ts" Expect Syntax Error: "conformance/es6/Symbols/symbolProperty34.ts" Expect Syntax Error: "conformance/es6/Symbols/symbolProperty35.ts" +Expect Syntax Error: "conformance/es6/Symbols/symbolProperty36.ts" Expect Syntax Error: "conformance/es6/Symbols/symbolProperty39.ts" Expect Syntax Error: "conformance/es6/Symbols/symbolProperty42.ts" Expect Syntax Error: "conformance/es6/Symbols/symbolProperty43.ts" @@ -2590,6 +2619,7 @@ Expect Syntax Error: "conformance/expressions/binaryOperators/comparisonOperator Expect Syntax Error: "conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithTypeParameter.ts" Expect Syntax Error: "conformance/expressions/binaryOperators/inOperator/inOperatorWithInvalidOperands.ts" Expect Syntax Error: "conformance/expressions/binaryOperators/inOperator/inOperatorWithValidOperands.ts" +Expect Syntax Error: "conformance/expressions/binaryOperators/instanceofOperator/instanceofOperatorWithInvalidOperands.es2015.ts" Expect Syntax Error: "conformance/expressions/binaryOperators/instanceofOperator/instanceofOperatorWithInvalidOperands.ts" Expect Syntax Error: "conformance/expressions/binaryOperators/logicalAndOperator/logicalAndOperatorStrictMode.ts" Expect Syntax Error: "conformance/expressions/binaryOperators/logicalAndOperator/logicalAndOperatorWithEveryType.ts" @@ -2664,6 +2694,7 @@ Expect Syntax Error: "conformance/expressions/typeGuards/typeGuardsInIfStatement Expect Syntax Error: "conformance/expressions/typeGuards/typeGuardsWithAny.ts" Expect Syntax Error: "conformance/expressions/typeGuards/typeGuardsWithInstanceOf.ts" Expect Syntax Error: "conformance/expressions/typeGuards/typeGuardsWithInstanceOfByConstructorSignature.ts" +Expect Syntax Error: "conformance/expressions/typeGuards/typeGuardsWithInstanceOfBySymbolHasInstance.ts" Expect Syntax Error: "conformance/expressions/typeSatisfaction/typeSatisfaction.ts" Expect Syntax Error: "conformance/expressions/typeSatisfaction/typeSatisfaction_contextualTyping2.ts" Expect Syntax Error: "conformance/expressions/typeSatisfaction/typeSatisfaction_js.ts" @@ -2973,6 +3004,7 @@ Expect Syntax Error: "conformance/jsx/tsxUnionElementType3.tsx" Expect Syntax Error: "conformance/jsx/tsxUnionElementType4.tsx" Expect Syntax Error: "conformance/jsx/tsxUnionElementType6.tsx" Expect Syntax Error: "conformance/jsx/tsxUnionTypeComponent2.tsx" +Expect Syntax Error: "conformance/jsx/unicodeEscapesInJsxtags.tsx" Expect Syntax Error: "conformance/override/override1.ts" Expect Syntax Error: "conformance/override/override11.ts" Expect Syntax Error: "conformance/override/override13.ts" @@ -3195,6 +3227,7 @@ Expect Syntax Error: "conformance/parser/ecmascript5/Statements/parserExpression Expect Syntax Error: "conformance/parser/ecmascript5/Statements/parserForInStatement1.d.ts" Expect Syntax Error: "conformance/parser/ecmascript5/Statements/parserForInStatement4.ts" Expect Syntax Error: "conformance/parser/ecmascript5/Statements/parserForInStatement5.ts" +Expect Syntax Error: "conformance/parser/ecmascript5/Statements/parserForInStatement8.ts" Expect Syntax Error: "conformance/parser/ecmascript5/Statements/parserForStatement1.d.ts" Expect Syntax Error: "conformance/parser/ecmascript5/Statements/parserForStatement2.ts" Expect Syntax Error: "conformance/parser/ecmascript5/Statements/parserForStatement3.ts" @@ -3301,6 +3334,7 @@ Expect Syntax Error: "conformance/parser/ecmascript6/Iterators/parserForOfStatem Expect Syntax Error: "conformance/parser/ecmascript6/Iterators/parserForOfStatement15.ts" Expect Syntax Error: "conformance/parser/ecmascript6/Iterators/parserForOfStatement16.ts" Expect Syntax Error: "conformance/parser/ecmascript6/Iterators/parserForOfStatement20.ts" +Expect Syntax Error: "conformance/parser/ecmascript6/Iterators/parserForOfStatement25.ts" Expect Syntax Error: "conformance/parser/ecmascript6/Iterators/parserForOfStatement5.ts" Expect Syntax Error: "conformance/parser/ecmascript6/Iterators/parserForOfStatement8.ts" Expect Syntax Error: "conformance/parser/ecmascript6/Iterators/parserForOfStatement9.ts" @@ -3318,6 +3352,7 @@ Expect Syntax Error: "conformance/salsa/moduleExportAliasUnknown.ts" Expect Syntax Error: "conformance/salsa/moduleExportsAliasLoop1.ts" Expect Syntax Error: "conformance/salsa/moduleExportsAliasLoop2.ts" Expect Syntax Error: "conformance/salsa/multipleDeclarations.ts" +Expect Syntax Error: "conformance/salsa/plainJSTypeErrors.ts" Expect Syntax Error: "conformance/salsa/propertyAssignmentOnUnresolvedImportedSymbol.ts" Expect Syntax Error: "conformance/salsa/propertyAssignmentUseParentType2.ts" Expect Syntax Error: "conformance/salsa/thisPropertyAssignment.ts" @@ -3349,6 +3384,21 @@ Expect Syntax Error: "conformance/scanner/ecmascript5/scannerS7.6_A4.2_T1.ts" Expect Syntax Error: "conformance/scanner/ecmascript5/scannertest1.ts" Expect Syntax Error: "conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts" Expect Syntax Error: "conformance/statements/VariableStatements/invalidMultipleVariableDeclarations.ts" +Expect Syntax Error: "conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarations.1.ts" +Expect Syntax Error: "conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarations.10.ts" +Expect Syntax Error: "conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarations.12.ts" +Expect Syntax Error: "conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarations.13.ts" +Expect Syntax Error: "conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarations.14.ts" +Expect Syntax Error: "conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarations.2.ts" +Expect Syntax Error: "conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarations.3.ts" +Expect Syntax Error: "conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarations.9.ts" +Expect Syntax Error: "conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarationsInForOf.2.ts" +Expect Syntax Error: "conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarationsWithImportHelpers.ts" +Expect Syntax Error: "conformance/statements/VariableStatements/usingDeclarations/usingDeclarations.10.ts" +Expect Syntax Error: "conformance/statements/VariableStatements/usingDeclarations/usingDeclarations.14.ts" +Expect Syntax Error: "conformance/statements/VariableStatements/usingDeclarations/usingDeclarations.4.ts" +Expect Syntax Error: "conformance/statements/VariableStatements/usingDeclarations/usingDeclarations.9.ts" +Expect Syntax Error: "conformance/statements/VariableStatements/usingDeclarations/usingDeclarationsWithImportHelpers.ts" Expect Syntax Error: "conformance/statements/breakStatements/invalidSwitchBreakStatement.ts" Expect Syntax Error: "conformance/statements/breakStatements/switchBreakStatements.ts" Expect Syntax Error: "conformance/statements/for-inStatements/for-inStatements.ts" @@ -3765,6 +3815,7 @@ Expect Syntax Error: "conformance/types/union/unionTypeWithIndexSignature.ts" Expect Syntax Error: "conformance/types/uniqueSymbol/uniqueSymbolsDeclarationsInJs.ts" Expect Syntax Error: "conformance/types/uniqueSymbol/uniqueSymbolsDeclarationsInJsErrors.ts" Expect Syntax Error: "conformance/types/uniqueSymbol/uniqueSymbolsErrors.ts" +Expect Syntax Error: "conformance/types/uniqueSymbol/uniqueSymbolsPropertyNames.ts" Expect Syntax Error: "conformance/types/unknown/unknownControlFlow.ts" Expect Syntax Error: "conformance/types/unknown/unknownType1.ts" Expect Syntax Error: "conformance/types/unknown/unknownType2.ts" @@ -3826,65 +3877,52 @@ Expect to Parse: "conformance/async/es6/asyncWithVarShadowing_es6.ts" Expect to Parse: "conformance/classes/propertyMemberDeclarations/staticPropertyNameConflicts.ts" × Classes may not have a static property named prototype - ╭─[conformance/classes/propertyMemberDeclarations/staticPropertyNameConflicts.ts:27:1] - 27 │ class StaticPrototype { - 28 │ static prototype: number; // always an error + ╭─[conformance/classes/propertyMemberDeclarations/staticPropertyNameConflicts.ts:55:1] + 55 │ class StaticPrototype { + 56 │ static prototype: number; // always an error · ───────── - 29 │ prototype: string; // ok + 57 │ prototype: string; // ok ╰──── × Classes may not have a static property named prototype - ╭─[conformance/classes/propertyMemberDeclarations/staticPropertyNameConflicts.ts:32:1] - 32 │ class StaticPrototypeFn { - 33 │ static prototype() {} // always an error + ╭─[conformance/classes/propertyMemberDeclarations/staticPropertyNameConflicts.ts:65:1] + 65 │ class StaticPrototypeFn { + 66 │ static prototype() {} // always an error · ───────── - 34 │ prototype() {} // ok + 67 │ prototype() {} // ok ╰──── × Classes may not have a static property named prototype - ╭─[conformance/classes/propertyMemberDeclarations/staticPropertyNameConflicts.ts:86:1] - 86 │ var StaticPrototype_Anonymous = class { - 87 │ static prototype: number; // always an error - · ───────── - 88 │ prototype: string; // ok - ╰──── - - × Classes may not have a static property named prototype - ╭─[conformance/classes/propertyMemberDeclarations/staticPropertyNameConflicts.ts:91:1] - 91 │ var StaticPrototypeFn_Anonymous = class { - 92 │ static prototype() {} // always an error - · ───────── - 93 │ prototype() {} // ok - ╰──── - - × Classes may not have a static property named prototype - ╭─[conformance/classes/propertyMemberDeclarations/staticPropertyNameConflicts.ts:153:1] - 153 │ export default class StaticPrototype { - 154 │ static prototype: number; // always an error - · ───────── - 155 │ prototype: string; // ok + ╭─[conformance/classes/propertyMemberDeclarations/staticPropertyNameConflicts.ts:163:1] + 163 │ var StaticPrototype_Anonymous = class { + 164 │ static prototype: number; // always an error + · ───────── + 165 │ prototype: string; // ok ╰──── × Classes may not have a static property named prototype - ╭─[conformance/classes/propertyMemberDeclarations/staticPropertyNameConflicts.ts:160:1] - 160 │ export default class StaticPrototypeFn { - 161 │ static prototype() {} // always an error - · ───────── - 162 │ prototype() {} // ok + ╭─[conformance/classes/propertyMemberDeclarations/staticPropertyNameConflicts.ts:173:1] + 173 │ var StaticPrototypeFn_Anonymous = class { + 174 │ static prototype() {} // always an error + · ───────── + 175 │ prototype() {} // ok ╰──── -Expect to Parse: "conformance/es6/for-ofStatements/for-of53.ts" - × Identifier `v` has already been declared - ╭─[conformance/es6/for-ofStatements/for-of53.ts:1:1] - 1 │ //@target: ES6 - 2 │ for (let v of []) { - · ┬ - · ╰── `v` has already been declared here - 3 │ var v; - · ┬ - · ╰── It can not be redeclared here - 4 │ } - ╰──── + × Classes may not have a static property named prototype + ╭─[conformance/classes/propertyMemberDeclarations/staticPropertyNameConflicts.ts:280:1] + 280 │ export default class StaticPrototype { + 281 │ static prototype: number; // always an error + · ───────── + 282 │ prototype: string; // ok + ╰──── + + × Classes may not have a static property named prototype + ╭─[conformance/classes/propertyMemberDeclarations/staticPropertyNameConflicts.ts:292:1] + 292 │ export default class StaticPrototypeFn { + 293 │ static prototype() {} // always an error + · ───────── + 294 │ prototype() {} // ok + ╰──── Expect to Parse: "conformance/es6/moduleExportsSystem/topLevelVarHoistingCommonJS.ts" × 'with' statements are not allowed @@ -3895,6 +3933,15 @@ Expect to Parse: "conformance/es6/moduleExportsSystem/topLevelVarHoistingCommonJ 69 │ var y = _; ╰──── +Expect to Parse: "conformance/esDecorators/esDecorators-preservesThis.ts" + × Unexpected token + ╭─[conformance/esDecorators/esDecorators-preservesThis.ts:26:1] + 26 │ class C { + 27 │ @super.decorate + · ───── + 28 │ method1() { } + ╰──── + Expect to Parse: "conformance/externalModules/topLevelAwait.2.ts" × Cannot use `await` as an identifier in an async context ╭─[conformance/externalModules/topLevelAwait.2.ts:6:1] @@ -8019,6 +8066,12 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" · ─ ╰──── + × Unexpected token + ╭─[compiler/parseUnmatchedTypeAssertion.ts:1:1] + 1 │ @<[[import(obju2c77, + · ─ + ╰──── + × Multiple constructor implementations are not allowed. ╭─[compiler/parserConstructorDeclaration12.ts:1:1] 1 │ class C { @@ -8180,6 +8233,62 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" 4 │ ╰──── + × Identifier `v` has already been declared + ╭─[compiler/shadowedFunctionScopedVariablesByBlockScopedOnes.ts:5:1] + 5 │ function test1() { + 6 │ for (let v; ; ) { var v; } + · ┬ ┬ + · │ ╰── It can not be redeclared here + · ╰── `v` has already been declared here + 7 │ } + ╰──── + + × Identifier `v` has already been declared + ╭─[compiler/shadowedFunctionScopedVariablesByBlockScopedOnes.ts:8:1] + 8 │ function test2() { + 9 │ for (let v in []) { var v; } + · ┬ ┬ + · │ ╰── It can not be redeclared here + · ╰── `v` has already been declared here + 10 │ } + ╰──── + + × Identifier `v` has already been declared + ╭─[compiler/shadowedFunctionScopedVariablesByBlockScopedOnes.ts:11:1] + 11 │ function test3() { + 12 │ for (let v of []) { var v; } + · ┬ ┬ + · │ ╰── It can not be redeclared here + · ╰── `v` has already been declared here + 13 │ } + ╰──── + + × Identifier `x` has already been declared + ╭─[compiler/shadowedFunctionScopedVariablesByBlockScopedOnes.ts:15:1] + 15 │ { + 16 │ let x; + · ┬ + · ╰── `x` has already been declared here + 17 │ { + 18 │ var x; + · ┬ + · ╰── It can not be redeclared here + 19 │ } + ╰──── + + × Identifier `x` has already been declared + ╭─[compiler/shadowedFunctionScopedVariablesByBlockScopedOnes.ts:24:1] + 24 │ { + 25 │ var x; + · ┬ + · ╰── `x` has already been declared here + 26 │ } + 27 │ let x; + · ┬ + · ╰── It can not be redeclared here + 28 │ } + ╰──── + × Identifier `x` has already been declared ╭─[compiler/shadowingViaLocalValue.ts:1:1] 1 │ { @@ -9460,6 +9569,15 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" · ╰── A newline is not expected here ╰──── + × Expected a semicolon or an implicit semicolon after a statement, but found none + ╭─[compiler/typeAliasDeclareKeywordNewlines.ts:3:1] + 3 │ // The following is invalid but should declare a type alias named 'T1': + 4 │ declare type /*unexpected newline*/ + · ─ + 5 │ T1 = null; + ╰──── + help: Try insert a semicolon here + × Cannot assign to 'eval' in strict mode ╭─[compiler/unaryOperatorsInStrictMode.ts:2:1] 2 │ @@ -9647,6 +9765,22 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" 3 │ } ╰──── + × Expected a semicolon or an implicit semicolon after a statement, but found none + ╭─[conformance/ambient/ambientModuleDeclarationWithReservedIdentifierInDottedPath.ts:12:1] + 12 │ + 13 │ declare module debugger {} // still an error + · ─ + ╰──── + help: Try insert a semicolon here + + × Expected a semicolon or an implicit semicolon after a statement, but found none + ╭─[conformance/ambient/ambientModuleDeclarationWithReservedIdentifierInDottedPath2.ts:10:1] + 10 │ + 11 │ declare namespace debugger {} // still an error + · ─ + ╰──── + help: Try insert a semicolon here + × Cannot use `await` as an identifier in an async context ╭─[conformance/async/es2017/asyncArrowFunction/asyncArrowFunction5_es2017.ts:3:1] 3 │ @@ -12473,6 +12607,14 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" 3 │ ({...[]} = {}); ╰──── + × Only a single declaration is allowed in a `for...of` statement + ╭─[conformance/es6/for-ofStatements/for-of-excess-declarations.ts:1:1] + 1 │ // @target: esnext + 2 │ for (const a, { [b]: c} of [1]) { + · ────────────────── + 3 │ + ╰──── + × Missing initializer in const declaration ╭─[conformance/es6/for-ofStatements/for-of2.ts:1:1] 1 │ //@target: ES6 @@ -12504,6 +12646,18 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" · ╰── `v` has already been declared here ╰──── + × Identifier `v` has already been declared + ╭─[conformance/es6/for-ofStatements/for-of53.ts:1:1] + 1 │ //@target: ES6 + 2 │ for (let v of []) { + · ┬ + · ╰── `v` has already been declared here + 3 │ var v; + · ┬ + · ╰── It can not be redeclared here + 4 │ } + ╰──── + × Identifier `v` has already been declared ╭─[conformance/es6/for-ofStatements/for-of54.ts:1:1] 1 │ //@target: ES6 @@ -14897,6 +15051,22 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" 3 │ } ╰──── + × Private identifier '#foo' is not allowed outside class bodies + ╭─[conformance/esDecorators/esDecorators-privateFieldAccess.ts:5:1] + 5 │ + 6 │ @dec(x => x.#foo) // error + · ──── + 7 │ class A { + ╰──── + + × Private identifier '#foo' is not allowed outside class bodies + ╭─[conformance/esDecorators/esDecorators-privateFieldAccess.ts:13:1] + 13 │ + 14 │ @dec((x: B) => x.#foo) // error + · ──── + 15 │ class B { + ╰──── + × Cannot assign to this expression ╭─[conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts:5:1] 5 │ class C { @@ -15645,6 +15815,29 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" 1 │ import * as f from "./first" assert { ╰──── + × Expected a semicolon or an implicit semicolon after a statement, but found none + ╭─[conformance/importAttributes/importAttributes4.ts:1:1] + 1 │ import * as f from "./first" with + · ─ + ╰──── + help: Try insert a semicolon here + + × Expected a semicolon or an implicit semicolon after a statement, but found none + ╭─[conformance/importAttributes/importAttributes5.ts:1:1] + 1 │ import * as f from "./first" with { + · ─ + ╰──── + help: Try insert a semicolon here + + × Expected a semicolon or an implicit semicolon after a statement, but found none + ╭─[conformance/importAttributes/importAttributes6.ts:2:1] + 2 │ // @filename: mod.mts + 3 │ import * as thing1 from "./mod.mjs" with { field: 0 }; + · ─ + 4 │ import * as thing2 from "./mod.mjs" with { field: `a` }; + ╰──── + help: Try insert a semicolon here + × The keyword 'interface' is reserved ╭─[conformance/interfaces/interfaceDeclarations/asiPreventsParsingAsInterface05.ts:2:1] 2 │ @@ -15757,6 +15950,29 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" ╰──── help: Did you mean to write an array? + × Missing initializer in const declaration + ╭─[conformance/jsx/jsxParsingErrorImmediateSpreadInAttributeValue.tsx:10:1] + 10 │ + 11 │ const X: any + · ─ + 12 │ const a: any + ╰──── + + × Missing initializer in const declaration + ╭─[conformance/jsx/jsxParsingErrorImmediateSpreadInAttributeValue.tsx:11:1] + 11 │ const X: any + 12 │ const a: any + · ─ + 13 │ + ╰──── + + × Unexpected token + ╭─[conformance/jsx/jsxParsingErrorImmediateSpreadInAttributeValue.tsx:13:1] + 13 │ + 14 │ + · ─── + ╰──── + × Unexpected token ╭─[conformance/jsx/jsxUnclosedParserRecovery.ts:13:1] 13 │ var donkey =
@@ -17998,6 +18214,14 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" 10 │ #p ╰──── + × Private field 'b' must be declared in an enclosing class + ╭─[conformance/salsa/plainJSGrammarErrors4.ts:9:1] + 9 │ this.#a; // ok + 10 │ this.#b; // error + · ── + 11 │ } + ╰──── + × Identifier `orbitol` has already been declared ╭─[conformance/salsa/plainJSRedeclare.ts:3:1] 3 │ // @filename: plainJSRedeclare.js @@ -18158,6 +18382,145 @@ Expect to Parse: "conformance/salsa/plainJSRedeclare3.ts" · ──────── ╰──── + × Unexpected token + ╭─[conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarations.11.ts:5:1] + 5 │ + 6 │ export await using x = null; + · ───── + 7 │ declare await using y: null; + ╰──── + + × Cannot assign to this expression + ╭─[conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarations.4.ts:6:1] + 6 │ { + 7 │ await using [a] = null; + · ─────────────── + 8 │ } + ╰──── + + × Using declarations may not have binding patterns. + ╭─[conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarations.5.ts:7:1] + 7 │ await using a = null, + 8 │ [b] = null, + · ─── + 9 │ c = null; + ╰──── + + × Expected a semicolon or an implicit semicolon after a statement, but found none + ╭─[conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarations.6.ts:6:1] + 6 │ { + 7 │ await using {a} = null; + · ─ + 8 │ } + ╰──── + help: Try insert a semicolon here + + × Using declarations may not have binding patterns. + ╭─[conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarations.7.ts:7:1] + 7 │ await using a = null, + 8 │ {b} = null, + · ─── + 9 │ c = null; + ╰──── + + × Using declarations must have an initializer. + ╭─[conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarations.8.ts:6:1] + 6 │ { + 7 │ await using a; + · ─ + 8 │ } + ╰──── + + × The left-hand side of a for...in statement cannot be an await using declaration. + ╭─[conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarationsInForIn.ts:6:1] + 6 │ async function main() { + 7 │ for (await using x in {}) { + · ───────────── + 8 │ } + ╰──── + + × Missing initializer in destructuring declaration + ╭─[conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarationsInForOf.3.ts:6:1] + 6 │ async function main() { + 7 │ for (await using {} of []) { + · ── + 8 │ } + ╰──── + + × Using declarations may not have binding patterns. + ╭─[conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarationsInForOf.3.ts:6:1] + 6 │ async function main() { + 7 │ for (await using {} of []) { + · ── + 8 │ } + ╰──── + + × Unexpected token + ╭─[conformance/statements/VariableStatements/usingDeclarations/usingDeclarations.13.ts:5:1] + 5 │ + 6 │ export using x = null; + · ───── + 7 │ declare using y: null; + ╰──── + + × Using declarations may not have binding patterns. + ╭─[conformance/statements/VariableStatements/usingDeclarations/usingDeclarations.5.ts:7:1] + 7 │ using a = null, + 8 │ [b] = null, + · ─── + 9 │ c = null; + ╰──── + + × Expected a semicolon or an implicit semicolon after a statement, but found none + ╭─[conformance/statements/VariableStatements/usingDeclarations/usingDeclarations.6.ts:6:1] + 6 │ { + 7 │ using {a} = null; + · ─ + 8 │ } + ╰──── + help: Try insert a semicolon here + + × Using declarations may not have binding patterns. + ╭─[conformance/statements/VariableStatements/usingDeclarations/usingDeclarations.7.ts:7:1] + 7 │ using a = null, + 8 │ {b} = null, + · ─── + 9 │ c = null; + ╰──── + + × Using declarations must have an initializer. + ╭─[conformance/statements/VariableStatements/usingDeclarations/usingDeclarations.8.ts:6:1] + 6 │ { + 7 │ using a; + · ─ + 8 │ } + ╰──── + + × The left-hand side of a for...in statement cannot be an using declaration. + ╭─[conformance/statements/VariableStatements/usingDeclarations/usingDeclarationsInForIn.ts:5:1] + 5 │ + 6 │ for (using x in {}) { + · ─────── + 7 │ } + ╰──── + + × Unexpected token + ╭─[conformance/statements/VariableStatements/usingDeclarations/usingDeclarationsInForOf.2.ts:5:1] + 5 │ + 6 │ for (using of of []) { + · ─ + 7 │ } + ╰──── + + × Expected `;` but found `{` + ╭─[conformance/statements/VariableStatements/usingDeclarations/usingDeclarationsInForOf.3.ts:5:1] + 5 │ + 6 │ for (using {} of []) { + · ┬ + · ╰── `;` expected + 7 │ } + ╰──── + × Illegal break statement ╭─[conformance/statements/breakStatements/invalidDoWhileBreakStatements.ts:6:1] 6 │ // naked break not allowed diff --git a/tasks/coverage/test262 b/tasks/coverage/test262 index c4642dd71..47eb8dd68 160000 --- a/tasks/coverage/test262 +++ b/tasks/coverage/test262 @@ -1 +1 @@ -Subproject commit c4642dd714175b5d27939c920abc6059c9fddb06 +Subproject commit 47eb8dd68506eeced55e5b8636b2f4636305dbc1 diff --git a/tasks/coverage/typescript b/tasks/coverage/typescript index 2f34e57ed..375216469 160000 --- a/tasks/coverage/typescript +++ b/tasks/coverage/typescript @@ -1 +1 @@ -Subproject commit 2f34e57ed39ba67b4c4b26bbcb6088cf39aa308a +Subproject commit 375216469400fab44cbcec99e7d14eb8f96fd059 diff --git a/tasks/transform_conformance/babel.snap.md b/tasks/transform_conformance/babel.snap.md index 7a1c45439..14ea69866 100644 --- a/tasks/transform_conformance/babel.snap.md +++ b/tasks/transform_conformance/babel.snap.md @@ -1,4 +1,4 @@ -Passed: 86/1071 +Passed: 87/1106 # babel-plugin-transform-class-properties * Failed: assumption-constantSuper/complex-super-class/input.js @@ -19,6 +19,7 @@ Passed: 86/1071 * Failed: assumption-setPublicClassFields/regression-T6719/input.js * Failed: assumption-setPublicClassFields/regression-T7364/input.mjs * Failed: assumption-setPublicClassFields/static/input.js +* Failed: assumption-setPublicClassFields/static-class-binding/input.js * Failed: assumption-setPublicClassFields/static-export/input.mjs * Failed: assumption-setPublicClassFields/static-infer-name/input.js * Failed: assumption-setPublicClassFields/static-super/input.js @@ -108,6 +109,7 @@ Passed: 86/1071 * Failed: private/regression-T7364/input.mjs * Failed: private/static/input.js * Failed: private/static-call/input.js +* Failed: private/static-class-binding/input.js * Failed: private/static-export/input.mjs * Failed: private/static-infer-name/input.js * Failed: private/static-inherited/input.js @@ -179,6 +181,7 @@ Passed: 86/1071 * Failed: private-loose/reference-in-other-property/input.js * Failed: private-loose/static/input.js * Failed: private-loose/static-call/input.js +* Failed: private-loose/static-class-binding/input.js * Failed: private-loose/static-export/input.mjs * Failed: private-loose/static-infer-name/input.js * Failed: private-loose/static-inherited/input.js @@ -216,6 +219,7 @@ Passed: 86/1071 * Failed: public/regression-T6719/input.js * Failed: public/regression-T7364/input.mjs * Failed: public/static/input.js +* Failed: public/static-class-binding/input.js * Failed: public/static-export/input.mjs * Failed: public/static-infer-name/input.js * Failed: public/static-super/input.js @@ -241,6 +245,7 @@ Passed: 86/1071 * Failed: public-loose/regression-T6719/input.js * Failed: public-loose/regression-T7364/input.mjs * Failed: public-loose/static/input.js +* Failed: public-loose/static-class-binding/input.js * Failed: public-loose/static-export/input.mjs * Failed: public-loose/static-infer-name/input.js * Failed: public-loose/static-super/input.js @@ -294,6 +299,7 @@ Passed: 86/1071 # babel-plugin-transform-private-methods * Failed: accessors/basic/input.js +* Failed: accessors/class-binding/input.js * Failed: accessors/get-only-setter/input.js * Failed: accessors/preserve-comments/input.js * Failed: accessors/reassignment/input.js @@ -302,17 +308,20 @@ Passed: 86/1071 * Failed: accessors/updates/input.js * Failed: accessors/updates-bigint/input.js * Failed: accessors-loose/basic/input.js +* Failed: accessors-loose/class-binding/input.js * Failed: accessors-loose/get-only-setter/input.js * Failed: accessors-loose/preserve-comments/input.js * Failed: accessors-loose/reassignment/input.js * Failed: accessors-loose/set-only-getter/input.js * Failed: accessors-loose/updates/input.js * Failed: accessors-privateFieldsAsProperties/basic/input.js +* Failed: accessors-privateFieldsAsProperties/class-binding/input.js * Failed: accessors-privateFieldsAsProperties/get-only-setter/input.js * Failed: accessors-privateFieldsAsProperties/preserve-comments/input.js * Failed: accessors-privateFieldsAsProperties/set-only-getter/input.js * Failed: accessors-privateFieldsAsProperties/updates/input.js * Failed: accessors-privateFieldsAsSymbols/basic/input.js +* Failed: accessors-privateFieldsAsSymbols/class-binding/input.js * Failed: accessors-privateFieldsAsSymbols/get-only-setter/input.js * Failed: accessors-privateFieldsAsSymbols/preserve-comments/input.js * Failed: accessors-privateFieldsAsSymbols/set-only-getter/input.js @@ -330,6 +339,7 @@ Passed: 86/1071 * Failed: private-method/assignment/input.js * Failed: private-method/async/input.js * Failed: private-method/before-fields/input.js +* Failed: private-method/class-binding/input.js * Failed: private-method/class-expression/input.js * Failed: private-method/context/input.js * Failed: private-method/exfiltrated/input.js @@ -342,6 +352,7 @@ Passed: 86/1071 * Failed: private-method-loose/assignment/input.js * Failed: private-method-loose/async/input.js * Failed: private-method-loose/before-fields/input.js +* Failed: private-method-loose/class-binding/input.js * Failed: private-method-loose/class-expression/input.js * Failed: private-method-loose/context/input.js * Failed: private-method-loose/exfiltrated/input.js @@ -352,6 +363,7 @@ Passed: 86/1071 * Failed: private-method-privateFieldsAsProperties/assignment/input.js * Failed: private-method-privateFieldsAsProperties/async/input.js * Failed: private-method-privateFieldsAsProperties/before-fields/input.js +* Failed: private-method-privateFieldsAsProperties/class-binding/input.js * Failed: private-method-privateFieldsAsProperties/class-expression/input.js * Failed: private-method-privateFieldsAsProperties/context/input.js * Failed: private-method-privateFieldsAsProperties/exfiltrated/input.js @@ -360,6 +372,7 @@ Passed: 86/1071 * Failed: private-method-privateFieldsAsSymbols/assignment/input.js * Failed: private-method-privateFieldsAsSymbols/async/input.js * Failed: private-method-privateFieldsAsSymbols/before-fields/input.js +* Failed: private-method-privateFieldsAsSymbols/class-binding/input.js * Failed: private-method-privateFieldsAsSymbols/class-expression/input.js * Failed: private-method-privateFieldsAsSymbols/context/input.js * Failed: private-method-privateFieldsAsSymbols/exfiltrated/input.js @@ -517,6 +530,12 @@ Passed: 86/1071 * Failed: amd/script/input.js * Failed: amd/to-string/input.js * Failed: amd/with-other-import-export/input.mjs +* Failed: amd-createImportExpression-false/missing-plugin/input.mjs +* Failed: amd-createImportExpression-false/module/input.mjs +* Failed: amd-createImportExpression-false/no-interop/input.js +* Failed: amd-createImportExpression-false/script/input.js +* Failed: amd-createImportExpression-false/to-string/input.js +* Failed: amd-createImportExpression-false/with-other-import-export/input.mjs * Failed: commonjs/missing-plugin/input.mjs * Failed: commonjs/module/input.mjs * Failed: commonjs/no-interop/input.js @@ -524,12 +543,23 @@ Passed: 86/1071 * Failed: commonjs/shadowed-require/input.js * Failed: commonjs/template-literal/input.js * Failed: commonjs/to-string/input.js -* Failed: systemjs/missing-plugin-babel-7/input.mjs +* Failed: commonjs-createImportExpression-false/missing-plugin/input.mjs +* Failed: commonjs-createImportExpression-false/module/input.mjs +* Failed: commonjs-createImportExpression-false/no-interop/input.js +* Failed: commonjs-createImportExpression-false/script/input.js +* Failed: commonjs-createImportExpression-false/shadowed-require/input.js +* Failed: commonjs-createImportExpression-false/template-literal/input.js +* Failed: commonjs-createImportExpression-false/to-string/input.js * Failed: systemjs/module/input.mjs * Failed: systemjs/script/input.js * Failed: systemjs/to-string/input.js +* Failed: systemjs-createImportExpression-false/missing-plugin-babel-7/input.mjs +* Failed: systemjs-createImportExpression-false/module/input.mjs +* Failed: systemjs-createImportExpression-false/script/input.js +* Failed: systemjs-createImportExpression-false/to-string/input.js * Passed: missing-module-transform/missing-module-transform/input.js * Passed: systemjs/missing-plugin/input.mjs +* Passed: systemjs-createImportExpression-false/missing-plugin/input.mjs # babel-plugin-transform-export-namespace-from * Failed: export-namespace/namespace-default/input.mjs @@ -565,6 +595,7 @@ Passed: 86/1071 * Failed: general/cast-to-boolean/input.js * Failed: general/containers/input.js * Failed: general/delete/input.js +* Failed: general/delete-in-function-params/input.js * Failed: general/function-call/input.js * Failed: general/function-call-loose/input.js * Failed: general/function-call-spread/input.js @@ -573,9 +604,6 @@ Passed: 86/1071 * Failed: general/in-method-key/input.js * Failed: general/in-method-key-loose/input.js * Failed: general/in-var-destructuring/input.js -* Failed: general/lhs-assignment/input.js -* Failed: general/lhs-assignment-read-and-update/input.js -* Failed: general/lhs-update/input.js * Failed: general/member-access/input.js * Failed: general/memoize/input.js * Failed: general/memoize-loose/input.js @@ -590,6 +618,7 @@ Passed: 86/1071 * Failed: loose/cast-to-boolean/input.js * Failed: regression/10959-transform-optional-chaining/input.ts * Failed: regression/10959-transform-ts-and-optional-chaining/input.ts +* Failed: regression/15887/input.js * Failed: regression/7642/input.js * Failed: transparent-expr-wrappers/ts-as-call-context/input.ts * Failed: transparent-expr-wrappers/ts-as-call-context-in-if/input.ts @@ -734,6 +763,7 @@ Passed: 86/1071 * Failed: export-async/default-export/input.mjs * Failed: export-async/import-and-export/input.mjs * Failed: export-async/lone-export/input.mjs +* Failed: regression/15978/input.js * Failed: regression/4599/input.js * Failed: regression/4943/input.js * Failed: regression/7178/input.js @@ -742,6 +772,7 @@ Passed: 86/1071 * Failed: regression/T7194/input.js * Failed: regression/gh-6923/input.js * Failed: regression/in-uncompiled-class-fields/input.js +* Failed: regression/regression-2765/input.js * Passed: assumption-noNewArrows-false/bluebird/input.js # babel-plugin-transform-exponentiation-operator @@ -870,6 +901,7 @@ Passed: 86/1071 * Failed: namespace/contentious-names/input.ts * Failed: namespace/declare/input.ts * Failed: namespace/declare-global-nested-namespace/input.ts +* Failed: namespace/empty-removed/input.ts * Failed: namespace/export/input.ts * Failed: namespace/module-nested/input.ts * Failed: namespace/module-nested-export/input.ts @@ -877,7 +909,9 @@ Passed: 86/1071 * Failed: namespace/namespace-nested-module/input.ts * Failed: namespace/nested/input.ts * Failed: namespace/nested-destructuring/input.ts +* Failed: namespace/nested-namespace/input.ts * Failed: namespace/nested-shorthand/input.ts +* Failed: namespace/nested-shorthand-export/input.ts * Failed: namespace/same-name/input.ts * Failed: namespace/undeclared/input.ts * Failed: optimize-const-enums/custom-values/input.ts @@ -894,6 +928,7 @@ Passed: 86/1071 * Failed: regression/10162/input.ts * Failed: regression/10338/input.ts * Failed: regression/11061/input.mjs +* Failed: regression/15768/input.ts * Failed: type-arguments/tsx/input.ts * Failed: type-arguments/tsx-babel-7/input.ts * Failed: variable-declaration/non-null-in-optional-chain/input.ts