We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Several attempts was made to pass all tests in test262 + babel + typescript regarding var hoisting in strict / non-strict mode.
Scope tree ended up with a var binding everywhere:
var
{ { var x } } x = 1
produces
Scope1 (ScopeFlags(StrictMode | Top)) { Bindings: { x (SymbolFlags(FunctionScopedVariable)) } Scope2 (ScopeFlags(StrictMode)) { Bindings: { x (SymbolFlags(FunctionScopedVariable)) } Scope3 (ScopeFlags(StrictMode)) { Bindings: { x (SymbolFlags(FunctionScopedVariable)) } } } }
The consequence of this is:
oxc/crates/oxc_mangler/src/lib.rs
Lines 111 to 123 in 3df9e69
To understand the test cases, try different strategies in
oxc/crates/oxc_semantic/src/binder.rs
Lines 46 to 54 in 3df9e69
and run just c to see changes in snapshot.
just c
The text was updated successfully, but these errors were encountered:
CatchClause
fix(semantic): avoid var hosting insert the var variable to the `Catc…
9badac0
…hClause` scope (#4337) related: #4192 #4323 I will figure it out #4323 later
refactor(semantic): var hoisting (#4379)
7cd53f3
close: #4323 This PR refactors the var hoisting logic to avoid inserting the same symbol into every scope that can be hosted.
Dunqing
Successfully merging a pull request may close this issue.
Several attempts was made to pass all tests in test262 + babel + typescript regarding var hoisting in strict / non-strict mode.
Scope tree ended up with a
var
binding everywhere:produces
The consequence of this is:
oxc/crates/oxc_mangler/src/lib.rs
Lines 111 to 123 in 3df9e69
To understand the test cases, try different strategies in
oxc/crates/oxc_semantic/src/binder.rs
Lines 46 to 54 in 3df9e69
and run
just c
to see changes in snapshot.The text was updated successfully, but these errors were encountered: