mirror of
https://github.com/danbulant/oxc
synced 2026-05-23 06:08:47 +00:00
feat(semantic): add SymbolFlags::Function for FunctionDeclaration (#1713)
Co-authored-by: Boshen <boshenc@gmail.com>
This commit is contained in:
parent
ef08892027
commit
edc6fa4830
2 changed files with 4 additions and 2 deletions
|
|
@ -122,7 +122,10 @@ impl<'a> Binder for Function<'a> {
|
|||
if (parent_flags.is_strict_mode() || self.r#async || self.generator)
|
||||
&& !function_as_var(parent_flags, builder.source_type)
|
||||
{
|
||||
(SymbolFlags::BlockScopedVariable, SymbolFlags::BlockScopedVariableExcludes)
|
||||
(
|
||||
SymbolFlags::Function | SymbolFlags::BlockScopedVariable,
|
||||
SymbolFlags::BlockScopedVariableExcludes,
|
||||
)
|
||||
} else {
|
||||
(
|
||||
SymbolFlags::FunctionScopedVariable,
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@ fn test_class_simple() {
|
|||
.test();
|
||||
}
|
||||
|
||||
#[ignore = "function symbols currently lack SymbolFlags::Function"]
|
||||
#[test]
|
||||
fn test_function_simple() {
|
||||
SemanticTester::js("function foo() { return }")
|
||||
|
|
|
|||
Loading…
Reference in a new issue