Skip to content
New issue

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

Incorrect symbol references #2023

Closed
Dunqing opened this issue Jan 13, 2024 · 0 comments · Fixed by #4253
Closed

Incorrect symbol references #2023

Dunqing opened this issue Jan 13, 2024 · 0 comments · Fixed by #4253
Assignees
Labels
A-semantic Area - Semantic C-bug Category - Bug

Comments

@Dunqing
Copy link
Member

Dunqing commented Jan 13, 2024

https://oxc-project.github.io/oxc/playground/?code=3YCAAIC2gICAgICAgIC0G8rnONK88wEEqaAR7TB6kap9ZsyLue0RBjpWSJG6bXYDMwOdJ7L3juP1dt5lItxqFGL6b5l0%2F36F7IA%3D

image

The correct result is that the reference should be in SymbolId 2.

@Dunqing Dunqing added C-bug Category - Bug A-semantic Area - Semantic labels Jan 13, 2024
@Dunqing Dunqing self-assigned this Jan 17, 2024
Boshen pushed a commit that referenced this issue Jul 17, 2024
close: #3969
close: #2023

We need to add scope according to [this](https://github.com/microsoft/TypeScript/blob/d8086f14b6b97c0df34a0cc2f56d4b5926a0c299/src/compiler/binder.ts#L3883-L3962). There are still some ASTs that need to be added to the scope.

---

Context from @Boshen:

Before this whole journey of fixing symbols and scopes I asked @Dunqing to debug through binder.ts via a debugger to fully understand how it does resolution.

We then agreed to align the implementation so that when a problem occurs, we can debug through both implementations and find where our problem is.

tsc doesn't have a specification, so we need to align with the reference implementation instead.
@Dunqing Dunqing closed this as completed Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment