refactor(semantic): always use SymbolFlags::Function for function id (#7479)

close #7402
related: #7470

The purpose of this PR is to keep the SymbolFlags of the function consistent.

Always use `SymbolFlags::Function` for the function id symbol, to avoid adding extra logic to find accurate `SymbolFlags` for the function in `transformer`. This change adds a fallback redeclaration check for case `async function foo() {}; var foo;` in `SemanticBuilder::check_redeclaraion`.

No performance difference here because redeclaration is always rare.
This commit is contained in:
Dunqing committed 2025-03-24 08:51:09 +00:00
1 parent be62d38398
commit 0fa58d786a
60 files changed
+32596 -654

No files matched your search

+8 -5
View File
@@ -1316,11 +1316,7 @@ impl<'a> Function<'a> {
/// Returns `true` if this function uses overload signatures or `declare function` statements.
pub fn is_typescript_syntax(&self) -> bool {
matches!(
self.r#type,
FunctionType::TSDeclareFunction | FunctionType::TSEmptyBodyFunctionExpression
) || self.body.is_none()
|| self.declare
self.r#type.is_typescript_syntax() || self.body.is_none() || self.declare
}
/// `true` for function expressions
@@ -1349,6 +1345,13 @@ impl<'a> Function<'a> {
}
}
impl FunctionType {
/// Returns `true` if it is a [`FunctionType::TSDeclareFunction`] or [`FunctionType::TSEmptyBodyFunctionExpression`].
pub fn is_typescript_syntax(&self) -> bool {
matches!(self, Self::TSDeclareFunction | Self::TSEmptyBodyFunctionExpression)
}
}
impl<'a> FormalParameters<'a> {
/// Number of parameters bound in this parameter list.
pub fn parameters_count(&self) -> usize {
@@ -616,9 +616,6 @@ impl<'a> Symbol<'_, 'a> {
let Some(ref_node) = self.get_ref_relevant_node(reference) else {
return false;
};
if !matches!(ref_node.kind(), AstKind::CallExpression(_) | AstKind::NewExpression(_)) {
return false;
}
// Do the easy/fast path if possible. If we know its a class/fn from
// flags, that means it's declared within this file in an understandable
@@ -132,7 +132,7 @@ source: crates/oxc_linter/src/tester.rs
╰────
help: Consider removing this declaration.
⚠ eslint(no-unused-vars): Variable 'a' is declared but never used.
⚠ eslint(no-unused-vars): Function 'a' is declared but never used.
╭─[no_unused_vars.tsx:1:29]
1 │ function f(){var x;function a(){x=42;}function b(){alert(x);}}
· ┬
@@ -140,7 +140,7 @@ source: crates/oxc_linter/src/tester.rs
╰────
help: Consider removing this declaration.
⚠ eslint(no-unused-vars): Variable 'b' is declared but never used.
⚠ eslint(no-unused-vars): Function 'b' is declared but never used.
╭─[no_unused_vars.tsx:1:48]
1 │ function f(){var x;function a(){x=42;}function b(){alert(x);}}
· ┬
@@ -17,7 +17,7 @@ source: crates/oxc_linter/src/tester.rs
╰────
help: Consider removing this declaration.
⚠ eslint(no-unused-vars): Variable 'bar' is declared but never used.
⚠ eslint(no-unused-vars): Function 'bar' is declared but never used.
╭─[no_unused_vars.tsx:1:30]
1 │ const foo = () => { function bar() { } }
· ─┬─
+32 -26
View File
@@ -141,6 +141,16 @@ fn function_as_var(flags: ScopeFlags, source_type: SourceType) -> bool {
flags.is_function() || (source_type.is_script() && flags.is_top())
}
/// Check if the function is not allowed to be redeclared.
pub fn is_function_redeclared_not_allowed(
func: &Function<'_>,
builder: &SemanticBuilder<'_>,
) -> bool {
let current_scope_flags = builder.current_scope_flags();
(current_scope_flags.is_strict_mode() || func.r#async || func.generator)
&& !function_as_var(current_scope_flags, builder.source_type)
}
/// Check for Annex B `if (foo) function a() {} else function b() {}`
fn is_function_part_of_if_statement(function: &Function, builder: &SemanticBuilder) -> bool {
if builder.current_scope_flags().is_strict_mode() {
@@ -165,8 +175,9 @@ fn is_function_part_of_if_statement(function: &Function, builder: &SemanticBuild
impl<'a> Binder<'a> for Function<'a> {
fn bind(&self, builder: &mut SemanticBuilder) {
let current_scope_id = builder.current_scope_id;
let scope_flags = builder.current_scope_flags();
if self.r#type.is_typescript_syntax() {
return;
}
if let Some(ident) = &self.id {
if is_function_part_of_if_statement(self, builder) {
let symbol_id = builder.scoping.create_symbol(
@@ -177,35 +188,30 @@ impl<'a> Binder<'a> for Function<'a> {
builder.current_node_id,
);
ident.symbol_id.set(Some(symbol_id));
} else if self.r#type == FunctionType::FunctionDeclaration {
// The visitor is already inside the function scope,
// retrieve the parent scope for the function id to bind to.
let (includes, excludes) =
if (scope_flags.is_strict_mode() || self.r#async || self.generator)
&& !function_as_var(scope_flags, builder.source_type)
{
(
SymbolFlags::Function | SymbolFlags::BlockScopedVariable,
SymbolFlags::BlockScopedVariableExcludes,
)
} else {
let excludes = if self.is_declaration() {
// The visitor is already inside the function scope,
// retrieve the parent scope for the function id to bind to.
if is_function_redeclared_not_allowed(self, builder) {
SymbolFlags::BlockScopedVariableExcludes
} else {
(
SymbolFlags::FunctionScopedVariable,
SymbolFlags::FunctionScopedVariableExcludes,
)
};
SymbolFlags::FunctionScopedVariableExcludes
}
} else if self.is_expression() {
// https://tc39.es/ecma262/#sec-runtime-semantics-instantiateordinaryfunctionexpression
// 5. Perform ! funcEnv.CreateImmutableBinding(name, false).
SymbolFlags::empty()
} else {
unreachable!(
"Currently we haven't create a symbol for typescript syntax function"
);
};
let symbol_id = builder.declare_symbol(ident.span, &ident.name, includes, excludes);
ident.symbol_id.set(Some(symbol_id));
} else if self.r#type == FunctionType::FunctionExpression {
// https://tc39.es/ecma262/#sec-runtime-semantics-instantiateordinaryfunctionexpression
// 5. Perform ! funcEnv.CreateImmutableBinding(name, false).
let symbol_id = builder.declare_symbol(
ident.span,
&ident.name,
SymbolFlags::Function,
SymbolFlags::empty(),
excludes,
);
ident.symbol_id.set(Some(symbol_id));
}
@@ -215,7 +221,7 @@ impl<'a> Binder<'a> for Function<'a> {
if let Some(AstKind::ObjectProperty(prop)) =
builder.nodes.parent_kind(builder.current_node_id)
{
let flags = builder.scoping.scope_flags_mut(current_scope_id);
let flags = builder.scoping.scope_flags_mut(builder.current_scope_id);
match prop.kind {
PropertyKind::Get => *flags |= ScopeFlags::GetAccessor,
PropertyKind::Set => *flags |= ScopeFlags::SetAccessor,
+35 -3
View File
@@ -25,7 +25,7 @@ use oxc_syntax::{
use crate::{
JSDocFinder, Semantic,
binder::Binder,
binder::{Binder, is_function_redeclared_not_allowed},
checker,
class::ClassTableBuilder,
diagnostics::redeclaration,
@@ -425,11 +425,43 @@ impl<'a> SemanticBuilder<'a> {
let symbol_id = self.scoping.get_binding(scope_id, name).or_else(|| {
self.hoisting_variables.get(&scope_id).and_then(|symbols| symbols.get(name).copied())
})?;
if report_error && self.scoping.symbol_flags(symbol_id).intersects(excludes) {
if report_error {
self.check_and_report_redeclaration(name, span, symbol_id, excludes);
}
Some(symbol_id)
}
/// Check if a symbol with the same name has already been declared but
/// it actually is not allowed to be redeclared.
fn check_and_report_redeclaration(
&self,
name: &str,
span: Span,
symbol_id: SymbolId,
excludes: SymbolFlags,
) {
let flags = self.scoping.symbol_flags(symbol_id);
let function_kind = if flags.is_function() {
self.nodes.kind(self.scoping.symbol_declaration(symbol_id)).as_function()
} else {
None
};
if (
flags.intersects(excludes)
// `function n() { let n; }`
// ^ is not a redeclaration
&& !function_kind.is_some_and(Function::is_expression))
// Needs to further check if the previous declaration is a function and the function
// is not allowed to be redeclared.
// For example: `async function goo(); var goo;`
// ^^^ Redeclare
|| (excludes == SymbolFlags::FunctionScopedVariableExcludes &&
function_kind.is_some_and(|func| is_function_redeclared_not_allowed(func, self)))
{
let symbol_span = self.scoping.symbol_span(symbol_id);
self.error(redeclaration(name, symbol_span, span));
}
Some(symbol_id)
}
/// Declare an unresolved reference in the current scope.
@@ -1,6 +1,7 @@
---
source: crates/oxc_semantic/tests/main.rs
input_file: crates/oxc_semantic/tests/fixtures/oxc/ts/functions/return-type.ts
snapshot_kind: text
---
[
{
@@ -84,7 +85,7 @@ input_file: crates/oxc_semantic/tests/fixtures/oxc/ts/functions/return-type.ts
]
},
{
"flags": "SymbolFlags(BlockScopedVariable | Function)",
"flags": "SymbolFlags(Function)",
"id": 1,
"name": "Foo",
"node": "Function(Foo)",
@@ -33,7 +33,7 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declarati
"node": "Program",
"symbols": [
{
"flags": "SymbolFlags(BlockScopedVariable | Function)",
"flags": "SymbolFlags(Function)",
"id": 0,
"name": "f",
"node": "Function(f)",
@@ -40,7 +40,7 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/class/declarati
"node": "Program",
"symbols": [
{
"flags": "SymbolFlags(BlockScopedVariable | Function)",
"flags": "SymbolFlags(Function)",
"id": 0,
"name": "f",
"node": "Function(f)",
@@ -48,7 +48,7 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/decorators/acce
"node": "Program",
"symbols": [
{
"flags": "SymbolFlags(BlockScopedVariable | Function)",
"flags": "SymbolFlags(Function)",
"id": 0,
"name": "decorator",
"node": "Function(decorator)",
@@ -25,7 +25,7 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/decorators/clas
"node": "Program",
"symbols": [
{
"flags": "SymbolFlags(BlockScopedVariable | Function)",
"flags": "SymbolFlags(Function)",
"id": 0,
"name": "decorator",
"node": "Function(decorator)",
@@ -25,7 +25,7 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/decorators/clas
"node": "Program",
"symbols": [
{
"flags": "SymbolFlags(BlockScopedVariable | Function)",
"flags": "SymbolFlags(Function)",
"id": 0,
"name": "decorator",
"node": "Function(decorator)",
@@ -33,7 +33,7 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/decorators/meth
"node": "Program",
"symbols": [
{
"flags": "SymbolFlags(BlockScopedVariable | Function)",
"flags": "SymbolFlags(Function)",
"id": 0,
"name": "decorator",
"node": "Function(decorator)",
@@ -48,7 +48,7 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/decorators/para
"node": "Program",
"symbols": [
{
"flags": "SymbolFlags(BlockScopedVariable | Function)",
"flags": "SymbolFlags(Function)",
"id": 0,
"name": "decorator",
"node": "Function(decorator)",
@@ -62,7 +62,7 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/decorators/para
"node": "Program",
"symbols": [
{
"flags": "SymbolFlags(BlockScopedVariable | Function)",
"flags": "SymbolFlags(Function)",
"id": 0,
"name": "decorator",
"node": "Function(decorator)",
@@ -41,7 +41,7 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/decorators/type
"node": "Program",
"symbols": [
{
"flags": "SymbolFlags(BlockScopedVariable | Function)",
"flags": "SymbolFlags(Function)",
"id": 0,
"name": "decorator",
"node": "Function(decorator)",
@@ -18,7 +18,7 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/export/default1
"node": "Program",
"symbols": [
{
"flags": "SymbolFlags(BlockScopedVariable | Function)",
"flags": "SymbolFlags(Function)",
"id": 0,
"name": "f",
"node": "Function(f)",
@@ -47,7 +47,7 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/funct
]
},
{
"flags": "SymbolFlags(BlockScopedVariable | Function)",
"flags": "SymbolFlags(Function)",
"id": 1,
"name": "foo",
"node": "Function(foo)",
@@ -40,7 +40,7 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/funct
]
},
{
"flags": "SymbolFlags(BlockScopedVariable | Function)",
"flags": "SymbolFlags(Function)",
"id": 1,
"name": "foo",
"node": "Function(foo)",
@@ -40,7 +40,7 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/funct
]
},
{
"flags": "SymbolFlags(BlockScopedVariable | Function)",
"flags": "SymbolFlags(Function)",
"id": 1,
"name": "foo",
"node": "Function(foo)",
@@ -55,7 +55,7 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/funct
]
},
{
"flags": "SymbolFlags(BlockScopedVariable | Function)",
"flags": "SymbolFlags(Function)",
"id": 1,
"name": "foo",
"node": "Function(foo)",
@@ -48,7 +48,7 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/funct
]
},
{
"flags": "SymbolFlags(BlockScopedVariable | Function)",
"flags": "SymbolFlags(Function)",
"id": 1,
"name": "foo",
"node": "Function(foo)",
@@ -47,7 +47,7 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/funct
"references": []
},
{
"flags": "SymbolFlags(BlockScopedVariable | Function)",
"flags": "SymbolFlags(Function)",
"id": 1,
"name": "foo",
"node": "Function(foo)",
@@ -40,7 +40,7 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/funct
]
},
{
"flags": "SymbolFlags(BlockScopedVariable | Function)",
"flags": "SymbolFlags(Function)",
"id": 1,
"name": "foo",
"node": "Function(foo)",
@@ -33,7 +33,7 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/funct
"node": "Program",
"symbols": [
{
"flags": "SymbolFlags(BlockScopedVariable | Function)",
"flags": "SymbolFlags(Function)",
"id": 0,
"name": "foo",
"node": "Function(foo)",
@@ -32,7 +32,7 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/funct
]
},
{
"flags": "SymbolFlags(BlockScopedVariable | Function)",
"flags": "SymbolFlags(Function)",
"id": 1,
"name": "foo",
"node": "Function(foo)",
@@ -26,7 +26,7 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/funct
"node": "Program",
"symbols": [
{
"flags": "SymbolFlags(BlockScopedVariable | Function)",
"flags": "SymbolFlags(Function)",
"id": 0,
"name": "Foo",
"node": "Function(Foo)",
@@ -62,7 +62,7 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/funct
"node": "Program",
"symbols": [
{
"flags": "SymbolFlags(BlockScopedVariable | Function)",
"flags": "SymbolFlags(Function)",
"id": 2,
"name": "foo",
"node": "Function(foo)",
@@ -95,7 +95,7 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/funct
]
},
{
"flags": "SymbolFlags(BlockScopedVariable | Function)",
"flags": "SymbolFlags(Function)",
"id": 1,
"name": "foo",
"node": "Function(foo)",
@@ -40,7 +40,7 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/funct
"node": "Program",
"symbols": [
{
"flags": "SymbolFlags(BlockScopedVariable | Function)",
"flags": "SymbolFlags(Function)",
"id": 0,
"name": "foo",
"node": "Function(foo)",
@@ -40,7 +40,7 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/funct
"node": "Program",
"symbols": [
{
"flags": "SymbolFlags(BlockScopedVariable | Function)",
"flags": "SymbolFlags(Function)",
"id": 0,
"name": "foo",
"node": "Function(foo)",
@@ -40,7 +40,7 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/funct
"node": "Program",
"symbols": [
{
"flags": "SymbolFlags(BlockScopedVariable | Function)",
"flags": "SymbolFlags(Function)",
"id": 0,
"name": "foo",
"node": "Function(foo)",
@@ -33,7 +33,7 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/funct
"node": "Program",
"symbols": [
{
"flags": "SymbolFlags(BlockScopedVariable | Function)",
"flags": "SymbolFlags(Function)",
"id": 0,
"name": "foo",
"node": "Function(foo)",
@@ -40,7 +40,7 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/funct
"node": "Program",
"symbols": [
{
"flags": "SymbolFlags(BlockScopedVariable | Function)",
"flags": "SymbolFlags(Function)",
"id": 0,
"name": "foo",
"node": "Function(foo)",
@@ -33,7 +33,7 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/funct
"node": "Program",
"symbols": [
{
"flags": "SymbolFlags(BlockScopedVariable | Function)",
"flags": "SymbolFlags(Function)",
"id": 0,
"name": "foo",
"node": "Function(foo)",
@@ -26,7 +26,7 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/funct
"node": "Program",
"symbols": [
{
"flags": "SymbolFlags(BlockScopedVariable | Function)",
"flags": "SymbolFlags(Function)",
"id": 0,
"name": "foo",
"node": "Function(foo)",
@@ -47,7 +47,7 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/funct
]
},
{
"flags": "SymbolFlags(BlockScopedVariable | Function)",
"flags": "SymbolFlags(Function)",
"id": 1,
"name": "foo",
"node": "Function(foo)",
@@ -33,7 +33,7 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/funct
"node": "Program",
"symbols": [
{
"flags": "SymbolFlags(BlockScopedVariable | Function)",
"flags": "SymbolFlags(Function)",
"id": 0,
"name": "foo",
"node": "Function(foo)",
@@ -54,7 +54,7 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/functions/funct
]
},
{
"flags": "SymbolFlags(BlockScopedVariable | Function)",
"flags": "SymbolFlags(Function)",
"id": 1,
"name": "foo",
"node": "Function(foo)",
@@ -18,7 +18,7 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/global-resoluti
"node": "Program",
"symbols": [
{
"flags": "SymbolFlags(BlockScopedVariable | Function)",
"flags": "SymbolFlags(Function)",
"id": 0,
"name": "top",
"node": "Function(top)",
@@ -18,7 +18,7 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/global-resoluti
"node": "Program",
"symbols": [
{
"flags": "SymbolFlags(BlockScopedVariable | Function)",
"flags": "SymbolFlags(Function)",
"id": 0,
"name": "top",
"node": "Function(top)",
@@ -69,7 +69,7 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/instantiation-e
"node": "Program",
"symbols": [
{
"flags": "SymbolFlags(BlockScopedVariable | Function)",
"flags": "SymbolFlags(Function)",
"id": 0,
"name": "makeBox",
"node": "Function(makeBox)",
@@ -18,7 +18,7 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/jsx/component-i
"node": "Program",
"symbols": [
{
"flags": "SymbolFlags(BlockScopedVariable | Function)",
"flags": "SymbolFlags(Function)",
"id": 0,
"name": "div",
"node": "Function(div)",
@@ -18,7 +18,7 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/jsx/component.t
"node": "Program",
"symbols": [
{
"flags": "SymbolFlags(BlockScopedVariable | Function)",
"flags": "SymbolFlags(Function)",
"id": 0,
"name": "Foo",
"node": "Function(Foo)",
@@ -75,7 +75,7 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/jsx/namespaced-
]
},
{
"flags": "SymbolFlags(BlockScopedVariable | Function)",
"flags": "SymbolFlags(Function)",
"id": 4,
"name": "Foo",
"node": "Function(Foo)",
@@ -33,7 +33,7 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/ts-module/decla
"node": "Program",
"symbols": [
{
"flags": "SymbolFlags(BlockScopedVariable | Function | NameSpaceModule | ValueModule)",
"flags": "SymbolFlags(Function | NameSpaceModule | ValueModule)",
"id": 0,
"name": "Foo",
"node": "Function(Foo)",
@@ -47,7 +47,7 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-annotation
]
},
{
"flags": "SymbolFlags(BlockScopedVariable | Function)",
"flags": "SymbolFlags(Function)",
"id": 1,
"name": "foo",
"node": "Function(foo)",
@@ -47,7 +47,7 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-annotation
]
},
{
"flags": "SymbolFlags(BlockScopedVariable | Function)",
"flags": "SymbolFlags(Function)",
"id": 1,
"name": "foo",
"node": "Function(foo)",
@@ -47,7 +47,7 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-annotation
]
},
{
"flags": "SymbolFlags(BlockScopedVariable | Function)",
"flags": "SymbolFlags(Function)",
"id": 1,
"name": "foo",
"node": "Function(foo)",
@@ -47,7 +47,7 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-annotation
]
},
{
"flags": "SymbolFlags(BlockScopedVariable | Function)",
"flags": "SymbolFlags(Function)",
"id": 1,
"name": "foo",
"node": "Function(foo)",
@@ -47,7 +47,7 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-annotation
]
},
{
"flags": "SymbolFlags(BlockScopedVariable | Function)",
"flags": "SymbolFlags(Function)",
"id": 1,
"name": "foo",
"node": "Function(foo)",
@@ -54,7 +54,7 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio
]
},
{
"flags": "SymbolFlags(BlockScopedVariable | Function)",
"flags": "SymbolFlags(Function)",
"id": 1,
"name": "div",
"node": "Function(div)",
@@ -69,7 +69,7 @@ input_file: crates/oxc_semantic/tests/fixtures/typescript-eslint/type-declaratio
"node": "Program",
"symbols": [
{
"flags": "SymbolFlags(BlockScopedVariable | Function)",
"flags": "SymbolFlags(Function)",
"id": 0,
"name": "foo",
"node": "Function(foo)",
+5 -5
View File
@@ -133,18 +133,18 @@ bitflags! {
const BlockScoped = Self::BlockScopedVariable.bits() | Self::Enum.bits() | Self::Class.bits();
const Value = Self::Variable.bits() | Self::Class.bits() | Self::Enum.bits() | Self::EnumMember.bits() | Self::ValueModule.bits();
const Value = Self::Variable.bits() | Self::Class.bits() | Self::Function.bits() | Self::Enum.bits() | Self::EnumMember.bits() | Self::ValueModule.bits();
const Type = Self::Class.bits() | Self::Interface.bits() | Self::Enum.bits() | Self::EnumMember.bits() | Self::TypeParameter.bits() | Self::TypeAlias.bits();
/// Variables can be redeclared, but can not redeclare a block-scoped declaration with the
/// same name, or any other value that is not a variable, e.g. ValueModule or Class
const FunctionScopedVariableExcludes = Self::Value.bits() - Self::FunctionScopedVariable.bits();
const FunctionScopedVariableExcludes = Self::Value.bits() - Self::FunctionScopedVariable.bits() - Self::Function.bits();
/// Block-scoped declarations are not allowed to be re-declared
/// they can not merge with anything in the value space
const BlockScopedVariableExcludes = Self::Value.bits();
const ClassExcludes = (Self::Value.bits() | Self::TypeAlias.bits()) & !(Self::ValueModule.bits() | Self::Interface.bits() | Self::Function.bits());
const ClassExcludes = (Self::Value.bits() | Self::TypeAlias.bits()) & !(Self::ValueModule.bits() | Self::Interface.bits());
const ImportBindingExcludes = Self::Import.bits() | Self::TypeImport.bits();
// Type specific excludes
const TypeAliasExcludes = Self::Type.bits();
@@ -178,7 +178,7 @@ impl SymbolFlags {
/// If true, then the symbol is a value, such as a Variable, Function, or Class
#[inline]
pub fn is_value(&self) -> bool {
self.intersects(Self::Value | Self::Import | Self::Function)
self.intersects(Self::Value | Self::Import)
}
#[inline]
@@ -246,7 +246,7 @@ impl SymbolFlags {
/// If true, then the symbol can be referenced by a value reference
#[inline]
pub fn can_be_referenced_by_value(&self) -> bool {
self.intersects(Self::Value | Self::Import | Self::Function)
self.is_value()
}
/// If true, then the symbol can be referenced by a value_as_type reference
+216 -25
View File
@@ -2,7 +2,7 @@ commit: 578ac4df
semantic_babel Summary:
AST Parsed : 2322/2322 (100.00%)
Positive Passed: 1902/2322 (81.91%)
Positive Passed: 1868/2322 (80.45%)
tasks/coverage/babel/packages/babel-parser/test/fixtures/annex-b/enabled/3.3-function-in-if-body/input.js
semantic error: Symbol scope ID mismatch for "f":
after transform: SymbolId(0): ScopeId(4294967294)
@@ -11,6 +11,21 @@ Symbol scope ID mismatch for "g":
after transform: SymbolId(1): ScopeId(4294967294)
rebuilt : SymbolId(1): ScopeId(4294967294)
tasks/coverage/babel/packages/babel-parser/test/fixtures/comments/basic/async-function/input.js
semantic error: Symbol flags mismatch for "_f":
after transform: SymbolId(1): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(2): SymbolFlags(Function)
tasks/coverage/babel/packages/babel-parser/test/fixtures/comments/basic/class-method/input.js
semantic error: Symbol flags mismatch for "_f":
after transform: SymbolId(2): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(3): SymbolFlags(Function)
tasks/coverage/babel/packages/babel-parser/test/fixtures/comments/basic/class-private-method/input.js
semantic error: Symbol flags mismatch for "_f":
after transform: SymbolId(1): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(2): SymbolFlags(Function)
tasks/coverage/babel/packages/babel-parser/test/fixtures/core/opts/allowNewTargetOutsideFunction-true/input.js
semantic error: Unexpected new.target expression
Unexpected new.target expression
@@ -36,10 +51,136 @@ semantic error: A 'return' statement can only be used within a function body.
tasks/coverage/babel/packages/babel-parser/test/fixtures/core/uncategorised/328/input.js
semantic error: A 'return' statement can only be used within a function body.
tasks/coverage/babel/packages/babel-parser/test/fixtures/es2015/uncategorised/385/input.js
semantic error: Symbol flags mismatch for "_foo":
after transform: SymbolId(1): SymbolFlags(BlockScopedVariable | Function)
rebuilt : SymbolId(2): SymbolFlags(Function)
tasks/coverage/babel/packages/babel-parser/test/fixtures/es2016/simple-parameter-list/async-arrow-function-concise-body/input.js
semantic error: Symbol flags mismatch for "a":
after transform: SymbolId(3): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(4): SymbolFlags(Function)
tasks/coverage/babel/packages/babel-parser/test/fixtures/es2017/async-functions/12/input.js
semantic error: Symbol flags mismatch for "_foo":
after transform: SymbolId(3): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(3): SymbolFlags(Function)
tasks/coverage/babel/packages/babel-parser/test/fixtures/es2017/async-functions/13/input.js
semantic error: Symbol flags mismatch for "_inner":
after transform: SymbolId(2): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(3): SymbolFlags(Function)
tasks/coverage/babel/packages/babel-parser/test/fixtures/es2017/async-functions/14/input.js
semantic error: Symbol flags mismatch for "foo":
after transform: SymbolId(4): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(4): SymbolFlags(Function)
tasks/coverage/babel/packages/babel-parser/test/fixtures/es2017/async-functions/25/input.js
semantic error: Symbol flags mismatch for "_foo":
after transform: SymbolId(1): SymbolFlags(BlockScopedVariable | Function)
rebuilt : SymbolId(2): SymbolFlags(Function)
tasks/coverage/babel/packages/babel-parser/test/fixtures/es2017/async-functions/31/input.js
semantic error: Symbol flags mismatch for "foo":
after transform: SymbolId(4): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(4): SymbolFlags(Function)
tasks/coverage/babel/packages/babel-parser/test/fixtures/es2017/async-functions/32/input.js
semantic error: Symbol flags mismatch for "foo":
after transform: SymbolId(4): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(4): SymbolFlags(Function)
tasks/coverage/babel/packages/babel-parser/test/fixtures/es2017/async-functions/33/input.js
semantic error: Symbol flags mismatch for "foo":
after transform: SymbolId(4): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(4): SymbolFlags(Function)
tasks/coverage/babel/packages/babel-parser/test/fixtures/es2017/async-functions/34/input.js
semantic error: Symbol flags mismatch for "foo":
after transform: SymbolId(4): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(4): SymbolFlags(Function)
tasks/coverage/babel/packages/babel-parser/test/fixtures/es2017/async-functions/await-async-function-declaration-name/input.js
semantic error: Symbol flags mismatch for "_await":
after transform: SymbolId(1): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(2): SymbolFlags(Function)
tasks/coverage/babel/packages/babel-parser/test/fixtures/es2017/async-functions/await-function-expression-name-inside-async-function/input.js
semantic error: Symbol flags mismatch for "_fn":
after transform: SymbolId(2): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(2): SymbolFlags(Function)
tasks/coverage/babel/packages/babel-parser/test/fixtures/es2017/async-functions/await-identifier-inside-parameters-of-nested-function/input.js
semantic error: Symbol flags mismatch for "_fn":
after transform: SymbolId(3): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(2): SymbolFlags(Function)
tasks/coverage/babel/packages/babel-parser/test/fixtures/es2017/async-functions/await-inside-arguments-of-async-function-call/input.js
semantic error: Symbol flags mismatch for "_fn":
after transform: SymbolId(1): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(2): SymbolFlags(Function)
tasks/coverage/babel/packages/babel-parser/test/fixtures/es2017/async-functions/await-inside-async-call-inside-parameters-of-function-inside-async-function/input.js
semantic error: Symbol flags mismatch for "_f":
after transform: SymbolId(3): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(2): SymbolFlags(Function)
tasks/coverage/babel/packages/babel-parser/test/fixtures/es2017/async-functions/await-inside-parenthesized-assign/input.js
semantic error: Symbol flags mismatch for "_fn":
after transform: SymbolId(1): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(2): SymbolFlags(Function)
tasks/coverage/babel/packages/babel-parser/test/fixtures/es2017/async-functions/context-division-after-expression/input.js
semantic error: Symbol flags mismatch for "fn":
after transform: SymbolId(0): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(2): SymbolFlags(Function)
tasks/coverage/babel/packages/babel-parser/test/fixtures/es2017/async-functions/context-regex-after-statement/input.js
semantic error: Symbol flags mismatch for "_fn":
after transform: SymbolId(1): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(2): SymbolFlags(Function)
tasks/coverage/babel/packages/babel-parser/test/fixtures/es2017/async-functions/export/input.js
semantic error: Symbol flags mismatch for "_foo":
after transform: SymbolId(2): SymbolFlags(BlockScopedVariable | Function)
rebuilt : SymbolId(2): SymbolFlags(Function)
Symbol flags mismatch for "_bar":
after transform: SymbolId(4): SymbolFlags(BlockScopedVariable | Function)
rebuilt : SymbolId(4): SymbolFlags(Function)
tasks/coverage/babel/packages/babel-parser/test/fixtures/es2017/async-functions/object-default-params/input.js
semantic error: Symbol flags mismatch for "b":
after transform: SymbolId(4): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(4): SymbolFlags(Function)
tasks/coverage/babel/packages/babel-parser/test/fixtures/es2017/async-functions/valid-await-expr-using-in/input.js
semantic error: Symbol flags mismatch for "_f":
after transform: SymbolId(1): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(2): SymbolFlags(Function)
tasks/coverage/babel/packages/babel-parser/test/fixtures/es2017/async-functions/valid-await-expr-using-instanceof/input.js
semantic error: Symbol flags mismatch for "_f":
after transform: SymbolId(1): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(2): SymbolFlags(Function)
tasks/coverage/babel/packages/babel-parser/test/fixtures/es2018/async-generators/for-await/input.js
semantic error: Symbol flags mismatch for "_f":
after transform: SymbolId(9): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(3): SymbolFlags(Function)
tasks/coverage/babel/packages/babel-parser/test/fixtures/es2018/async-generators/for-await-async-of/input.js
semantic error: Symbol flags mismatch for "_f":
after transform: SymbolId(8): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(3): SymbolFlags(Function)
tasks/coverage/babel/packages/babel-parser/test/fixtures/es2022/class-private-methods/async/input.js
semantic error: Scope flags mismatch:
after transform: ScopeId(2): ScopeFlags(StrictMode | Function)
rebuilt : ScopeId(4): ScopeFlags(Function)
Symbol flags mismatch for "_evil":
after transform: SymbolId(1): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(4): SymbolFlags(Function)
tasks/coverage/babel/packages/babel-parser/test/fixtures/es2022/class-private-methods/async-generator/input.js
semantic error: Scope flags mismatch:
@@ -54,6 +195,70 @@ rebuilt : ScopeId(6): ScopeFlags(0x0)
Scope flags mismatch:
after transform: ScopeId(5): ScopeFlags(StrictMode)
rebuilt : ScopeId(7): ScopeFlags(0x0)
Symbol flags mismatch for "_readLines":
after transform: SymbolId(3): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(5): SymbolFlags(Function)
tasks/coverage/babel/packages/babel-parser/test/fixtures/es2022/class-private-methods/combined/input.js
semantic error: Symbol flags mismatch for "_a":
after transform: SymbolId(2): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(6): SymbolFlags(Function)
Symbol flags mismatch for "_set_c":
after transform: SymbolId(4): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(7): SymbolFlags(Function)
Symbol flags mismatch for "_d":
after transform: SymbolId(5): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(9): SymbolFlags(Function)
tasks/coverage/babel/packages/babel-parser/test/fixtures/es2022/class-private-methods/generator/input.js
semantic error: Symbol flags mismatch for "_evil":
after transform: SymbolId(1): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(3): SymbolFlags(Function)
tasks/coverage/babel/packages/babel-parser/test/fixtures/es2022/class-private-methods/get-set/input.js
semantic error: Symbol flags mismatch for "_get_evil":
after transform: SymbolId(2): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(3): SymbolFlags(Function)
Symbol flags mismatch for "_set_evil":
after transform: SymbolId(3): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(4): SymbolFlags(Function)
tasks/coverage/babel/packages/babel-parser/test/fixtures/es2022/class-private-methods/method/input.js
semantic error: Symbol flags mismatch for "_getBanned":
after transform: SymbolId(1): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(3): SymbolFlags(Function)
tasks/coverage/babel/packages/babel-parser/test/fixtures/es2022/class-private-names-duplicated/instance-get-instance-set/input.js
semantic error: Symbol flags mismatch for "_get_x":
after transform: SymbolId(2): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(3): SymbolFlags(Function)
Symbol flags mismatch for "_set_x":
after transform: SymbolId(3): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(4): SymbolFlags(Function)
tasks/coverage/babel/packages/babel-parser/test/fixtures/es2022/class-private-names-duplicated/instance-set-instance-get/input.js
semantic error: Symbol flags mismatch for "_set_x":
after transform: SymbolId(2): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(3): SymbolFlags(Function)
Symbol flags mismatch for "_get_x":
after transform: SymbolId(3): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(5): SymbolFlags(Function)
tasks/coverage/babel/packages/babel-parser/test/fixtures/es2022/class-private-names-duplicated/static-get-static-set/input.js
semantic error: Symbol flags mismatch for "_get_x":
after transform: SymbolId(2): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(1): SymbolFlags(Function)
Symbol flags mismatch for "_set_x":
after transform: SymbolId(3): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(2): SymbolFlags(Function)
tasks/coverage/babel/packages/babel-parser/test/fixtures/es2022/class-private-names-duplicated/static-set-static-get/input.js
semantic error: Symbol flags mismatch for "_set_x":
after transform: SymbolId(2): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(1): SymbolFlags(Function)
Symbol flags mismatch for "_get_x":
after transform: SymbolId(3): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(3): SymbolFlags(Function)
tasks/coverage/babel/packages/babel-parser/test/fixtures/es2022/class-private-properties/await-identifier-in-property-in-arguments-of-async-call/input.js
semantic error: Unexpected token
@@ -94,20 +299,6 @@ Unexpected new.target expression
Unexpected new.target expression
Unexpected new.target expression
tasks/coverage/babel/packages/babel-parser/test/fixtures/es2022/class-static-block/await-binding-in-function-in-static-block/input.js
semantic error: Symbol flags mismatch for "f":
after transform: SymbolId(1): SymbolFlags(BlockScopedVariable | Function)
rebuilt : SymbolId(1): SymbolFlags(FunctionScopedVariable)
Symbol flags mismatch for "f":
after transform: SymbolId(2): SymbolFlags(BlockScopedVariable | Function)
rebuilt : SymbolId(2): SymbolFlags(FunctionScopedVariable)
Symbol flags mismatch for "f":
after transform: SymbolId(4): SymbolFlags(BlockScopedVariable | Function)
rebuilt : SymbolId(4): SymbolFlags(FunctionScopedVariable)
Symbol flags mismatch for "f":
after transform: SymbolId(6): SymbolFlags(BlockScopedVariable | Function)
rebuilt : SymbolId(6): SymbolFlags(FunctionScopedVariable)
tasks/coverage/babel/packages/babel-parser/test/fixtures/es2022/class-static-block/await-binding-in-initializer-in-static-block/input.js
semantic error: Unexpected token
@@ -508,7 +699,7 @@ after transform: ScopeId(1): [ScopeId(2), ScopeId(3), ScopeId(5)]
rebuilt : ScopeId(1): [ScopeId(2)]
Symbol flags mismatch for "_f":
after transform: SymbolId(4): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(3): SymbolFlags(BlockScopedVariable | Function)
rebuilt : SymbolId(3): SymbolFlags(Function)
tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/class/properties/input.ts
semantic error: Identifier `x` has already been declared
@@ -523,7 +714,7 @@ semantic error: Function implementation is missing or not immediately following
tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/class/static-asi/input.ts
semantic error: Symbol flags mismatch for "_method":
after transform: SymbolId(2): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(3): SymbolFlags(BlockScopedVariable | Function)
rebuilt : SymbolId(3): SymbolFlags(Function)
tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/const/initializer-ambient-context/input.ts
semantic error: Bindings mismatch:
@@ -1659,8 +1850,8 @@ Scope children mismatch:
after transform: ScopeId(0): [ScopeId(1), ScopeId(2)]
rebuilt : ScopeId(0): [ScopeId(1)]
Symbol flags mismatch for "A":
after transform: SymbolId(0): SymbolFlags(BlockScopedVariable | Function | Interface)
rebuilt : SymbolId(0): SymbolFlags(BlockScopedVariable | Function)
after transform: SymbolId(0): SymbolFlags(Function | Interface)
rebuilt : SymbolId(0): SymbolFlags(Function)
Symbol redeclarations mismatch for "A":
after transform: SymbolId(0): [Span { start: 26, end: 27 }]
rebuilt : SymbolId(0): []
@@ -1673,8 +1864,8 @@ Scope children mismatch:
after transform: ScopeId(0): [ScopeId(1), ScopeId(2)]
rebuilt : ScopeId(0): [ScopeId(1)]
Symbol flags mismatch for "A":
after transform: SymbolId(0): SymbolFlags(BlockScopedVariable | Function | TypeAlias)
rebuilt : SymbolId(0): SymbolFlags(BlockScopedVariable | Function)
after transform: SymbolId(0): SymbolFlags(Function | TypeAlias)
rebuilt : SymbolId(0): SymbolFlags(Function)
Symbol redeclarations mismatch for "A":
after transform: SymbolId(0): [Span { start: 21, end: 22 }]
rebuilt : SymbolId(0): []
@@ -2088,8 +2279,8 @@ Scope children mismatch:
after transform: ScopeId(0): [ScopeId(1), ScopeId(2)]
rebuilt : ScopeId(0): [ScopeId(1)]
Symbol flags mismatch for "A":
after transform: SymbolId(0): SymbolFlags(BlockScopedVariable | Function | Interface)
rebuilt : SymbolId(0): SymbolFlags(BlockScopedVariable | Function)
after transform: SymbolId(0): SymbolFlags(Function | Interface)
rebuilt : SymbolId(0): SymbolFlags(Function)
Symbol span mismatch for "A":
after transform: SymbolId(0): Span { start: 10, end: 11 }
rebuilt : SymbolId(0): Span { start: 24, end: 25 }
@@ -2172,8 +2363,8 @@ Scope children mismatch:
after transform: ScopeId(0): [ScopeId(1), ScopeId(2)]
rebuilt : ScopeId(0): [ScopeId(1)]
Symbol flags mismatch for "A":
after transform: SymbolId(0): SymbolFlags(BlockScopedVariable | Function | TypeAlias)
rebuilt : SymbolId(0): SymbolFlags(BlockScopedVariable | Function)
after transform: SymbolId(0): SymbolFlags(Function | TypeAlias)
rebuilt : SymbolId(0): SymbolFlags(Function)
Symbol span mismatch for "A":
after transform: SymbolId(0): Span { start: 5, end: 6 }
rebuilt : SymbolId(0): Span { start: 26, end: 27 }
+15 -1
View File
@@ -1,6 +1,6 @@
semantic_misc Summary:
AST Parsed : 33/33 (100.00%)
Positive Passed: 19/33 (57.58%)
Positive Passed: 18/33 (54.55%)
tasks/coverage/misc/pass/oxc-1288.ts
semantic error: Bindings mismatch:
after transform: ScopeId(0): ["from"]
@@ -11,6 +11,11 @@ semantic error: Bindings mismatch:
after transform: ScopeId(0): ["infer", "target", "type"]
rebuilt : ScopeId(0): []
tasks/coverage/misc/pass/oxc-1740.tsx
semantic error: Symbol flags mismatch for "render":
after transform: SymbolId(5): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(6): SymbolFlags(Function)
tasks/coverage/misc/pass/oxc-2087.ts
semantic error: Scope children mismatch:
after transform: ScopeId(0): [ScopeId(1)]
@@ -85,6 +90,15 @@ rebuilt : SymbolId(26): [ReferenceId(16)]
Symbol reference IDs mismatch for "TestWorkingCopyBackupTracker":
after transform: SymbolId(39): [ReferenceId(42), ReferenceId(74), ReferenceId(154), ReferenceId(215)]
rebuilt : SymbolId(35): [ReferenceId(66), ReferenceId(218)]
Symbol flags mismatch for "_createTracker":
after transform: SymbolId(137): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(50): SymbolFlags(Function)
Symbol flags mismatch for "_untitledBackupTest":
after transform: SymbolId(140): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(57): SymbolFlags(Function)
Symbol flags mismatch for "_restoreBackupsInit":
after transform: SymbolId(141): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(74): SymbolFlags(Function)
Unresolved reference IDs mismatch for "Promise":
after transform: [ReferenceId(36), ReferenceId(39), ReferenceId(82), ReferenceId(114), ReferenceId(153), ReferenceId(282)]
rebuilt : [ReferenceId(291)]
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -1,6 +1,6 @@
commit: 578ac4df
Passed: 713/1191
Passed: 644/1191
# All Passed:
* babel-plugin-transform-logical-assignment-operators
@@ -363,6 +363,15 @@ rebuilt : ScopeId(4): ScopeFlags(Function)
Scope flags mismatch:
after transform: ScopeId(6): ScopeFlags(StrictMode | Function)
rebuilt : ScopeId(6): ScopeFlags(Function)
Symbol flags mismatch for "_bar":
after transform: SymbolId(5): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(3): SymbolFlags(Function)
Symbol flags mismatch for "_method":
after transform: SymbolId(6): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(4): SymbolFlags(Function)
Symbol flags mismatch for "_method_shadowed":
after transform: SymbolId(7): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(6): SymbolFlags(Function)
* private/static-shadow/input.js
x Output mismatch
@@ -466,11 +475,82 @@ x Output mismatch
x Output mismatch
# babel-plugin-transform-private-methods (46/148)
# babel-plugin-transform-private-methods (7/148)
* accessors/arguments/input.js
Symbol flags mismatch for "_get_privateFieldValue":
after transform: SymbolId(4): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(4): SymbolFlags(Function)
Symbol flags mismatch for "_set_privateFieldValue":
after transform: SymbolId(5): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(5): SymbolFlags(Function)
* accessors/basic/input.js
Symbol flags mismatch for "_get_privateFieldValue":
after transform: SymbolId(4): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(4): SymbolFlags(Function)
Symbol flags mismatch for "_set_privateFieldValue":
after transform: SymbolId(5): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(5): SymbolFlags(Function)
* accessors/class-binding/input.js
Symbol flags mismatch for "_get_getA":
after transform: SymbolId(1): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(3): SymbolFlags(Function)
* accessors/destructuring/input.js
Symbol flags mismatch for "_set_setter":
after transform: SymbolId(2): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(2): SymbolFlags(Function)
Symbol flags mismatch for "_get_getter":
after transform: SymbolId(3): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(4): SymbolFlags(Function)
* accessors/get-only-setter/input.js
Symbol flags mismatch for "_set_privateFieldValue":
after transform: SymbolId(3): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(3): SymbolFlags(Function)
* accessors/preserve-comments/input.js
Symbol flags mismatch for "_get_a":
after transform: SymbolId(2): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(2): SymbolFlags(Function)
Symbol flags mismatch for "_set_a":
after transform: SymbolId(3): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(3): SymbolFlags(Function)
* accessors/reassignment/input.js
Symbol flags mismatch for "_get_privateFieldValue":
after transform: SymbolId(2): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(3): SymbolFlags(Function)
* accessors/set-only-getter/input.js
Symbol flags mismatch for "_get_privateFieldValue":
after transform: SymbolId(3): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(3): SymbolFlags(Function)
* accessors/tagged-template/input.js
Scope flags mismatch:
after transform: ScopeId(3): ScopeFlags(StrictMode | Function | Arrow)
rebuilt : ScopeId(4): ScopeFlags(Function | Arrow)
Symbol flags mismatch for "_get_tag":
after transform: SymbolId(1): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(2): SymbolFlags(Function)
* accessors/updates/input.js
Symbol flags mismatch for "_get_privateFieldValue":
after transform: SymbolId(5): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(8): SymbolFlags(Function)
Symbol flags mismatch for "_set_privateFieldValue":
after transform: SymbolId(6): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(9): SymbolFlags(Function)
* accessors/updates-bigint/input.js
Symbol flags mismatch for "_get_privateFieldValue":
after transform: SymbolId(5): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(8): SymbolFlags(Function)
Symbol flags mismatch for "_set_privateFieldValue":
after transform: SymbolId(6): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(9): SymbolFlags(Function)
* accessors-loose/basic/input.js
x Output mismatch
@@ -532,9 +612,107 @@ x Output mismatch
* assumption-constantSuper/private-method-super/input.js
x Output mismatch
* duplicated-names/get-set/input.js
Symbol flags mismatch for "_get_getSet":
after transform: SymbolId(3): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(3): SymbolFlags(Function)
Symbol flags mismatch for "_set_getSet":
after transform: SymbolId(4): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(4): SymbolFlags(Function)
* duplicated-names/set-get/input.js
Symbol flags mismatch for "_set_getSet":
after transform: SymbolId(3): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(3): SymbolFlags(Function)
Symbol flags mismatch for "_get_getSet":
after transform: SymbolId(4): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(5): SymbolFlags(Function)
* misc/multiple/input.js
Symbol flags mismatch for "_method":
after transform: SymbolId(3): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(2): SymbolFlags(Function)
Symbol flags mismatch for "_get_getter":
after transform: SymbolId(4): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(3): SymbolFlags(Function)
Symbol flags mismatch for "_set_setter":
after transform: SymbolId(5): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(4): SymbolFlags(Function)
Symbol flags mismatch for "_get_getset":
after transform: SymbolId(6): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(6): SymbolFlags(Function)
Symbol flags mismatch for "_set_getset":
after transform: SymbolId(7): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(7): SymbolFlags(Function)
* private-method/assignment/input.js
Symbol flags mismatch for "_privateMethod":
after transform: SymbolId(1): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(2): SymbolFlags(Function)
* private-method/async/input.js
Symbol flags mismatch for "_foo":
after transform: SymbolId(1): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(2): SymbolFlags(Function)
* private-method/before-fields/input.js
Symbol flags mismatch for "_method":
after transform: SymbolId(3): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(3): SymbolFlags(Function)
* private-method/class-binding/input.js
Symbol flags mismatch for "_getA":
after transform: SymbolId(1): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(3): SymbolFlags(Function)
* private-method/class-expression/input.js
Symbol flags mismatch for "_foo":
after transform: SymbolId(1): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(2): SymbolFlags(Function)
* private-method/context/input.js
Symbol flags mismatch for "_getStatus":
after transform: SymbolId(5): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(6): SymbolFlags(Function)
* private-method/destructuring/input.js
Symbol flags mismatch for "_method":
after transform: SymbolId(1): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(2): SymbolFlags(Function)
* private-method/exfiltrated/input.js
Symbol flags mismatch for "_privateMethod":
after transform: SymbolId(2): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(3): SymbolFlags(Function)
* private-method/generator/input.js
Symbol flags mismatch for "_foo":
after transform: SymbolId(1): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(2): SymbolFlags(Function)
* private-method/preserve-comments/input.js
Symbol flags mismatch for "_a":
after transform: SymbolId(1): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(2): SymbolFlags(Function)
* private-method/read-only/input.js
Symbol flags mismatch for "_method":
after transform: SymbolId(1): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(2): SymbolFlags(Function)
* private-method/reassignment/input.js
Symbol flags mismatch for "_privateFieldValue":
after transform: SymbolId(2): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(3): SymbolFlags(Function)
* private-method/super/input.js
x Output mismatch
* private-method/tagged-template/input.js
Symbol flags mismatch for "_tag":
after transform: SymbolId(1): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(2): SymbolFlags(Function)
* private-method-loose/assignment/input.js
x Output mismatch
@@ -633,9 +811,57 @@ x Output mismatch
`----
* private-static-method/basic/input.js
Symbol flags mismatch for "_privateStaticMethod":
after transform: SymbolId(1): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(1): SymbolFlags(Function)
* private-static-method/class-check/input.js
Symbol flags mismatch for "_privateStaticMethod":
after transform: SymbolId(2): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(2): SymbolFlags(Function)
* private-static-method/class-expression/input.js
Symbol flags mismatch for "_foo":
after transform: SymbolId(1): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(2): SymbolFlags(Function)
* private-static-method/exfiltrated/input.js
Symbol flags mismatch for "_privateStaticMethod":
after transform: SymbolId(2): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(2): SymbolFlags(Function)
* private-static-method/generator/input.js
Symbol flags mismatch for "_foo":
after transform: SymbolId(1): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(1): SymbolFlags(Function)
* private-static-method/preserve-comments/input.js
Symbol flags mismatch for "_a":
after transform: SymbolId(1): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(1): SymbolFlags(Function)
* private-static-method/read-only/input.js
x Output mismatch
* private-static-method/super/input.js
Symbol flags mismatch for "_subStaticPrivateMethod":
after transform: SymbolId(2): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(3): SymbolFlags(Function)
* private-static-method/tagged-template/input.js
Symbol flags mismatch for "_tag":
after transform: SymbolId(1): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(2): SymbolFlags(Function)
* private-static-method/this/input.js
Symbol flags mismatch for "_getA":
after transform: SymbolId(4): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(3): SymbolFlags(Function)
Symbol flags mismatch for "_getB":
after transform: SymbolId(5): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(4): SymbolFlags(Function)
* private-static-method-loose/async/input.js
x TS(1108): A 'return' statement can only be used within a function body.
@@ -744,9 +970,30 @@ x Output mismatch
* private-static-method-privateFieldsAsSymbols/this/input.js
x Output mismatch
* static-accessors/basic/input.js
Symbol flags mismatch for "_get_privateStaticFieldValue":
after transform: SymbolId(3): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(1): SymbolFlags(Function)
Symbol flags mismatch for "_set_privateStaticFieldValue":
after transform: SymbolId(4): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(2): SymbolFlags(Function)
* static-accessors/destructure-set/input.js
Symbol flags mismatch for "_set_p":
after transform: SymbolId(2): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(1): SymbolFlags(Function)
* static-accessors/get-only-setter/input.js
x Output mismatch
* static-accessors/preserve-comments/input.js
Symbol flags mismatch for "_get_a":
after transform: SymbolId(2): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(1): SymbolFlags(Function)
Symbol flags mismatch for "_set_a":
after transform: SymbolId(3): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(2): SymbolFlags(Function)
* static-accessors/set-only-getter/input.js
x Output mismatch
@@ -754,6 +1001,17 @@ x Output mismatch
Scope flags mismatch:
after transform: ScopeId(3): ScopeFlags(StrictMode | Function)
rebuilt : ScopeId(4): ScopeFlags(Function)
Symbol flags mismatch for "_get_tag":
after transform: SymbolId(2): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(2): SymbolFlags(Function)
* static-accessors/updates/input.js
Symbol flags mismatch for "_get_privateFieldValue":
after transform: SymbolId(5): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(6): SymbolFlags(Function)
Symbol flags mismatch for "_set_privateFieldValue":
after transform: SymbolId(6): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(7): SymbolFlags(Function)
* static-accessors-loose/basic/input.js
x Output mismatch
@@ -810,7 +1068,7 @@ x Output mismatch
x Output mismatch
# babel-plugin-transform-private-property-in-object (25/59)
# babel-plugin-transform-private-property-in-object (14/59)
* assumption-privateFieldsAsProperties/accessor/input.js
x Output mismatch
@@ -871,6 +1129,26 @@ x Output mismatch
* assumption-privateFieldsAsSymbols/static-method/input.js
x Output mismatch
* private/accessor/input.js
Symbol flags mismatch for "_get_foo":
after transform: SymbolId(2): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(3): SymbolFlags(Function)
* private/method/input.js
Symbol flags mismatch for "_foo":
after transform: SymbolId(2): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(3): SymbolFlags(Function)
* private/static-accessor/input.js
Symbol flags mismatch for "_get_foo":
after transform: SymbolId(2): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(2): SymbolFlags(Function)
* private/static-method/input.js
Symbol flags mismatch for "_foo":
after transform: SymbolId(2): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(2): SymbolFlags(Function)
* private/static-shadow/input.js
x Output mismatch
@@ -904,9 +1182,47 @@ x Output mismatch
* private-loose/static-shadow/input.js
x Output mismatch
* to-native-fields/accessor/input.js
Symbol flags mismatch for "_get_foo":
after transform: SymbolId(2): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(3): SymbolFlags(Function)
* to-native-fields/class-expression-in-default-param/input.js
x Output mismatch
* to-native-fields/half-constructed-instance/input.js
Symbol flags mismatch for "_get_w":
after transform: SymbolId(1): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(4): SymbolFlags(Function)
Symbol flags mismatch for "_z":
after transform: SymbolId(4): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(5): SymbolFlags(Function)
* to-native-fields/half-constructed-static/input.js
Symbol flags mismatch for "_z":
after transform: SymbolId(3): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(1): SymbolFlags(Function)
* to-native-fields/method/input.js
Symbol flags mismatch for "_foo":
after transform: SymbolId(2): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(3): SymbolFlags(Function)
* to-native-fields/multiple-checks/input.js
Symbol flags mismatch for "_m":
after transform: SymbolId(2): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(3): SymbolFlags(Function)
* to-native-fields/static-accessor/input.js
Symbol flags mismatch for "_get_foo":
after transform: SymbolId(2): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(2): SymbolFlags(Function)
* to-native-fields/static-method/input.js
Symbol flags mismatch for "_foo":
after transform: SymbolId(2): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(2): SymbolFlags(Function)
* to-native-fields/static-shadow/input.js
x Output mismatch
@@ -978,10 +1294,73 @@ after transform: ["ExampleType", "o"]
rebuilt : ["o"]
# babel-plugin-transform-async-generator-functions (19/20)
# babel-plugin-transform-async-generator-functions (7/20)
* async-generators/class-private-method/input.js
x Output mismatch
* async-generators/declaration/input.js
Symbol flags mismatch for "_agf":
after transform: SymbolId(1): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(1): SymbolFlags(Function)
* async-generators/expression/input.js
Symbol flags mismatch for "agf":
after transform: SymbolId(0): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(1): SymbolFlags(Function)
* async-generators/transform-class-keys/input.js
Symbol flags mismatch for "_fn":
after transform: SymbolId(3): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(1): SymbolFlags(Function)
* async-generators/yield-star/input.js
Symbol flags mismatch for "_g":
after transform: SymbolId(1): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(1): SymbolFlags(Function)
* for-await/async-function/input.js
Symbol flags mismatch for "_f":
after transform: SymbolId(8): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(1): SymbolFlags(Function)
* for-await/async-generator/input.js
Symbol flags mismatch for "_g":
after transform: SymbolId(8): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(1): SymbolFlags(Function)
* for-await/create-async-from-sync-iterator/input.js
Symbol flags mismatch for "_fn":
after transform: SymbolId(8): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(1): SymbolFlags(Function)
* for-await/destructuring/input.js
Symbol flags mismatch for "_f":
after transform: SymbolId(9): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(1): SymbolFlags(Function)
* nested/arrows-in-declaration/input.js
Symbol flags mismatch for "_g":
after transform: SymbolId(3): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(1): SymbolFlags(Function)
* nested/async-in-params/input.js
Symbol flags mismatch for "_g":
after transform: SymbolId(2): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(1): SymbolFlags(Function)
* nested/generator-in-async/input.js
Symbol flags mismatch for "_f":
after transform: SymbolId(3): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(1): SymbolFlags(Function)
Symbol flags mismatch for "_g":
after transform: SymbolId(2): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(3): SymbolFlags(Function)
* yield-star/create-async-from-sync-iterator/input.js
Symbol flags mismatch for "_fn":
after transform: SymbolId(1): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(1): SymbolFlags(Function)
# babel-plugin-transform-object-rest-spread (28/36)
* object-rest/for-x/input.js
@@ -1008,7 +1387,7 @@ after transform: ScopeId(7): ["_ref5"]
rebuilt : ScopeId(7): []
Symbol flags mismatch for "a":
after transform: SymbolId(0): SymbolFlags(BlockScopedVariable)
rebuilt : SymbolId(8): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(8): SymbolFlags(Function)
Symbol span mismatch for "a":
after transform: SymbolId(0): Span { start: 27, end: 28 }
rebuilt : SymbolId(8): Span { start: 86, end: 87 }
@@ -1220,7 +1599,7 @@ rebuilt : [ReferenceId(0), ReferenceId(7)]
# babel-plugin-transform-async-to-generator (10/28)
# babel-plugin-transform-async-to-generator (4/28)
* assumption-ignoreFunctionLength-true/basic/input.mjs
x Compiler assumption `ignoreFunctionLength` is not implemented for object-
@@ -1242,6 +1621,44 @@ x Output mismatch
* async-to-generator/async-iife-with-regenerator-spec/input.js
x Output mismatch
* async-to-generator/function-arity/input.js
Symbol flags mismatch for "_one":
after transform: SymbolId(24): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(2): SymbolFlags(Function)
Symbol flags mismatch for "_two":
after transform: SymbolId(27): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(8): SymbolFlags(Function)
Symbol flags mismatch for "_three":
after transform: SymbolId(29): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(14): SymbolFlags(Function)
Symbol flags mismatch for "_four":
after transform: SymbolId(31): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(21): SymbolFlags(Function)
Symbol flags mismatch for "_five":
after transform: SymbolId(34): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(29): SymbolFlags(Function)
Symbol flags mismatch for "_six":
after transform: SymbolId(36): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(34): SymbolFlags(Function)
* async-to-generator/shadowed-promise/input.js
Symbol flags mismatch for "_foo":
after transform: SymbolId(3): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(2): SymbolFlags(Function)
* async-to-generator/shadowed-promise-import/input.mjs
Symbol flags mismatch for "_foo":
after transform: SymbolId(2): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(2): SymbolFlags(Function)
* async-to-generator/shadowed-promise-nested/input.js
Symbol flags mismatch for "_foo":
after transform: SymbolId(5): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(2): SymbolFlags(Function)
Symbol flags mismatch for "_bar":
after transform: SymbolId(4): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(5): SymbolFlags(Function)
* bluebird-coroutines/arrow-function/input.js
x Output mismatch
@@ -1272,6 +1689,11 @@ x Output mismatch
* regression/15978/input.js
x Output mismatch
* regression/8783/input.js
Symbol flags mismatch for "poll":
after transform: SymbolId(0): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(1): SymbolFlags(Function)
* regression/T7108/input.js
x Output mismatch
@@ -1281,6 +1703,14 @@ x Output mismatch
* regression/in-uncompiled-class-fields/input.js
x Output mismatch
* regression/regression-2765/input.js
Symbol flags mismatch for "g":
after transform: SymbolId(7): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(4): SymbolFlags(Function)
Symbol flags mismatch for "c":
after transform: SymbolId(11): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(10): SymbolFlags(Function)
# babel-plugin-transform-exponentiation-operator (2/7)
* exponentiation-operator/memoise-object/input.js
@@ -1879,8 +2309,8 @@ rebuilt : ScopeId(0): []
* imports/import-type-func-with-duplicate-name/input.ts
Symbol flags mismatch for "Foo":
after transform: SymbolId(0): SymbolFlags(BlockScopedVariable | Function | TypeImport)
rebuilt : SymbolId(0): SymbolFlags(BlockScopedVariable | Function)
after transform: SymbolId(0): SymbolFlags(Function | TypeImport)
rebuilt : SymbolId(0): SymbolFlags(Function)
Symbol span mismatch for "Foo":
after transform: SymbolId(0): Span { start: 13, end: 16 }
rebuilt : SymbolId(0): Span { start: 70, end: 73 }
@@ -1888,8 +2318,8 @@ Symbol redeclarations mismatch for "Foo":
after transform: SymbolId(0): [Span { start: 70, end: 73 }]
rebuilt : SymbolId(0): []
Symbol flags mismatch for "Foo2":
after transform: SymbolId(1): SymbolFlags(BlockScopedVariable | Function | TypeImport)
rebuilt : SymbolId(1): SymbolFlags(BlockScopedVariable | Function)
after transform: SymbolId(1): SymbolFlags(Function | TypeImport)
rebuilt : SymbolId(1): SymbolFlags(Function)
Symbol span mismatch for "Foo2":
after transform: SymbolId(1): Span { start: 43, end: 47 }
rebuilt : SymbolId(1): Span { start: 87, end: 91 }
@@ -2294,9 +2724,6 @@ rebuilt : SymbolId(18): SymbolFlags(BlockScopedVariable)
Symbol span mismatch for "c":
after transform: SymbolId(19): Span { start: 344, end: 345 }
rebuilt : SymbolId(18): Span { start: 0, end: 0 }
Symbol flags mismatch for "C":
after transform: SymbolId(20): SymbolFlags(BlockScopedVariable | Function)
rebuilt : SymbolId(20): SymbolFlags(FunctionScopedVariable)
Symbol flags mismatch for "d":
after transform: SymbolId(21): SymbolFlags(NameSpaceModule | ValueModule)
rebuilt : SymbolId(21): SymbolFlags(BlockScopedVariable)
@@ -2429,14 +2856,14 @@ Symbol span mismatch for "C":
after transform: SymbolId(1): Span { start: 45, end: 46 }
rebuilt : SymbolId(2): Span { start: 0, end: 0 }
Symbol flags mismatch for "M":
after transform: SymbolId(4): SymbolFlags(BlockScopedVariable | Function | NameSpaceModule | ValueModule)
rebuilt : SymbolId(6): SymbolFlags(FunctionScopedVariable)
after transform: SymbolId(4): SymbolFlags(Function | NameSpaceModule | ValueModule)
rebuilt : SymbolId(6): SymbolFlags(Function)
Symbol redeclarations mismatch for "M":
after transform: SymbolId(4): [Span { start: 129, end: 130 }]
rebuilt : SymbolId(6): []
Symbol flags mismatch for "D":
after transform: SymbolId(6): SymbolFlags(BlockScopedVariable | Function | NameSpaceModule | ValueModule)
rebuilt : SymbolId(9): SymbolFlags(FunctionScopedVariable)
after transform: SymbolId(6): SymbolFlags(Function | NameSpaceModule | ValueModule)
rebuilt : SymbolId(9): SymbolFlags(Function)
Symbol redeclarations mismatch for "D":
after transform: SymbolId(6): [Span { start: 207, end: 208 }]
rebuilt : SymbolId(9): []
@@ -2545,9 +2972,6 @@ rebuilt : SymbolId(5): Span { start: 0, end: 0 }
Symbol redeclarations mismatch for "N":
after transform: SymbolId(3): [Span { start: 115, end: 116 }, Span { start: 166, end: 167 }]
rebuilt : SymbolId(5): []
Symbol flags mismatch for "_N3":
after transform: SymbolId(4): SymbolFlags(BlockScopedVariable | Function)
rebuilt : SymbolId(7): SymbolFlags(FunctionScopedVariable)
Symbol flags mismatch for "_N":
after transform: SymbolId(6): SymbolFlags(RegularEnum)
rebuilt : SymbolId(11): SymbolFlags(BlockScopedVariable)
@@ -2752,7 +3176,12 @@ transform-react-jsx: unknown field `autoImport`, expected one of `runtime`, `dev
x Output mismatch
# babel-plugin-proposal-explicit-resource-management (20/24)
# babel-plugin-proposal-explicit-resource-management (19/24)
* integration/async-to-generator/input.js
Symbol flags mismatch for "_fn":
after transform: SymbolId(4): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(1): SymbolFlags(Function)
* transform-sync/function-body/input.js
Bindings mismatch:
after transform: ScopeId(1): ["_usingCtx", "x"]
+102 -12
View File
@@ -1,17 +1,14 @@
commit: 578ac4df
Passed: 138/229
Passed: 126/229
# All Passed:
* babel-plugin-transform-class-static-block
* babel-plugin-transform-private-methods
* babel-plugin-transform-logical-assignment-operators
* babel-plugin-transform-nullish-coalescing-operator
* babel-plugin-transform-optional-chaining
* babel-plugin-transform-optional-catch-binding
* babel-plugin-transform-async-generator-functions
* babel-plugin-transform-object-rest-spread
* babel-plugin-transform-async-to-generator
* babel-plugin-transform-exponentiation-operator
* babel-plugin-transform-arrow-functions
* babel-preset-typescript
@@ -19,18 +16,13 @@ Passed: 138/229
* regexp
# babel-plugin-transform-class-properties (20/27)
# babel-plugin-transform-class-properties (21/27)
* private-field-resolve-to-method/input.js
x Output mismatch
* private-field-resolve-to-method-in-computed-key/input.js
x Output mismatch
* static-block-this-and-class-name/input.js
Symbol flags mismatch for "inner":
after transform: SymbolId(8): SymbolFlags(BlockScopedVariable | Function)
rebuilt : SymbolId(14): SymbolFlags(FunctionScopedVariable)
* static-super-assignment-target/input.js
x Output mismatch
@@ -48,6 +40,104 @@ after transform: SymbolId(0): [ReferenceId(0), ReferenceId(2), ReferenceId(6), R
rebuilt : SymbolId(0): [ReferenceId(0), ReferenceId(2), ReferenceId(6), ReferenceId(10)]
# babel-plugin-transform-private-methods (0/1)
* unused-methods/input.js
Symbol flags mismatch for "_method":
after transform: SymbolId(4): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(3): SymbolFlags(Function)
Symbol flags mismatch for "_method2":
after transform: SymbolId(6): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(5): SymbolFlags(Function)
Symbol flags mismatch for "_method3":
after transform: SymbolId(7): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(7): SymbolFlags(Function)
Symbol flags mismatch for "_method4":
after transform: SymbolId(9): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(9): SymbolFlags(Function)
# babel-plugin-transform-async-generator-functions (1/3)
* for-await/with-if-statement/input.js
Symbol flags mismatch for "_handleAsyncIterables":
after transform: SymbolId(10): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(2): SymbolFlags(Function)
* for-await/with-labeled-statement/input.js
Symbol flags mismatch for "_handleAsyncIterable":
after transform: SymbolId(10): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(2): SymbolFlags(Function)
# babel-plugin-transform-async-to-generator (15/25)
* arguments/assign/input.js
Symbol flags mismatch for "ArgumentsAssignment":
after transform: SymbolId(3): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(3): SymbolFlags(Function)
* arguments/nested-block/input.js
Symbol flags mismatch for "ArrowFunction":
after transform: SymbolId(3): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(3): SymbolFlags(Function)
* arrow/basic/input.js
Symbol flags mismatch for "A":
after transform: SymbolId(5): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(3): SymbolFlags(Function)
* arrow/without-params/input.js
Symbol flags mismatch for "g":
after transform: SymbolId(2): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(2): SymbolFlags(Function)
* function/export/default-with-name/input.js
Symbol flags mismatch for "_D":
after transform: SymbolId(4): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(2): SymbolFlags(Function)
* function/export/default-without-name/input.js
Symbol flags mismatch for "_ref":
after transform: SymbolId(3): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(1): SymbolFlags(Function)
* function/export/named/input.js
Symbol flags mismatch for "_named":
after transform: SymbolId(2): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(1): SymbolFlags(Function)
* function/expression/input.js
Symbol flags mismatch for "func":
after transform: SymbolId(7): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(4): SymbolFlags(Function)
* object/property-with-function/input.js
Symbol flags mismatch for "foo":
after transform: SymbolId(5): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(3): SymbolFlags(Function)
Symbol flags mismatch for "bar":
after transform: SymbolId(7): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(6): SymbolFlags(Function)
Symbol flags mismatch for "_":
after transform: SymbolId(10): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(9): SymbolFlags(Function)
Symbol flags mismatch for "_":
after transform: SymbolId(12): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(12): SymbolFlags(Function)
Symbol flags mismatch for "_this":
after transform: SymbolId(14): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(14): SymbolFlags(Function)
Symbol flags mismatch for "_default":
after transform: SymbolId(16): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(16): SymbolFlags(Function)
Symbol flags mismatch for "O_X_C":
after transform: SymbolId(18): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(18): SymbolFlags(Function)
* super/outer-super-in-nested-class/input.js
Symbol flags mismatch for "fn":
after transform: SymbolId(5): SymbolFlags(FunctionScopedVariable)
rebuilt : SymbolId(5): SymbolFlags(Function)
# babel-plugin-transform-typescript (2/14)
* class-property-definition/input.ts
Unresolved references mismatch:
@@ -185,8 +275,8 @@ Symbol span mismatch for "Name":
after transform: SymbolId(7): Span { start: 116, end: 120 }
rebuilt : SymbolId(5): Span { start: 0, end: 0 }
Symbol flags mismatch for "T":
after transform: SymbolId(9): SymbolFlags(FunctionScopedVariable | TypeAlias)
rebuilt : SymbolId(8): SymbolFlags(FunctionScopedVariable)
after transform: SymbolId(9): SymbolFlags(Function | TypeAlias)
rebuilt : SymbolId(8): SymbolFlags(Function)
Symbol span mismatch for "T":
after transform: SymbolId(9): Span { start: 205, end: 206 }
rebuilt : SymbolId(8): Span { start: 226, end: 227 }