oxc-project / oxc

⚓ A collection of JavaScript tools written in Rust.
https://oxc.rs
MIT License
11.98k stars 430 forks source link

Possible bug in transform checker #6770

Closed overlookmotel closed 33 minutes ago

overlookmotel commented 3 hours ago

6658 threw up some semantic errors which look like they could be erroneous.

https://github.com/oxc-project/oxc/blob/4db28a4add2fdc22c9eba291c26f10f01f42080d/tasks/transform_conformance/snapshots/babel.snap.md?plain=1#L1754-L1757

Why is ScopeId(0) being mapped to ScopeId(3)?

This could be a bug in the transform checker.

Dunqing commented 2 hours ago

I have resolved many semantic errors at #6658. Now, the remaining errors are related to this problem. I don't know the SemanticChecker how to check, since I moved a scope to a new scope, it is correct that the scope ID does not match. However, if it checks its child scopes, it can prove that even though the scope ID mismatch, they are still correct.

Dunqing commented 33 minutes ago

I have corrected all semantic errors so close it because there is no bug in the transform checker.