refactor(semantic): should not add symbols of ClassExpression and FunctionExpression to the scope#4141
Conversation
Your org has enabled the Graphite merge queue for merging into mainAdd the label “merge” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix. You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link. |
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
e5721da to
adfebfa
Compare
CodSpeed Performance ReportMerging #4141 will degrade performances by 3.12%Comparing Summary
Benchmarks breakdown
|
adfebfa to
9920171
Compare
f676841 to
e88e957
Compare
a4e1a1a to
357ad9f
Compare
357ad9f to
cbb7bfd
Compare
f5a2d06 to
2634b62
Compare
cbb7bfd to
520d1f1
Compare
2634b62 to
7fe477a
Compare
7fe477a to
3f07793
Compare

TypeScript Behavior
Create a symbol for the
idofClassExpressionandFunctionExpressionbut doesn't add to the scopeClassExpression: https://github.com/microsoft/TypeScript/blob/d8086f14b6b97c0df34a0cc2f56d4b5926a0c299/src/compiler/binder.ts#L3598-L3605FunctionExpression: https://github.com/microsoft/TypeScript/blob/d8086f14b6b97c0df34a0cc2f56d4b5926a0c299/src/compiler/binder.ts#L3714-L3726Different resolve logic is implemented specifically for these ASTs.
ClassExpression: https://github.com/microsoft/TypeScript/blob/d8086f14b6b97c0df34a0cc2f56d4b5926a0c299/src/compiler/utilities.ts#L11310-L11316FunctionExpression: https://github.com/microsoft/TypeScript/blob/d8086f14b6b97c0df34a0cc2f56d4b5926a0c299/src/compiler/utilities.ts#L11375-L11378