traverse/scope: explicit scope.crawl() misses referencePath #9327
Labels
i: bug
i: needs triage
outdated
A closed issue/PR that is archived due to age. Recommended to make a new issue
Bug Report
Current Behavior
Running
path.scope.crawl()
removes a reference to a class when it is used in the class body itself.The reference is correctly listed in
getBinding().referencePath
whencrawl()
isn't called.Input Code
https://astexplorer.net/#/gist/e3682e9577f38305e86fb2e13d87246f/a285511da5ad7370d42a3ac87f23e2441c657a68
visitor:
Output
Expected behavior/code
The reference to the class should exist in
scope.getBinding().referencePaths
.Environment
Additional context/Screenshots
Causes a bug in Parcel's scope hoisting code: parcel-bundler/parcel#2513.
The text was updated successfully, but these errors were encountered: