swiftlang / swift-syntax

A set of Swift libraries for parsing, inspecting, generating, and transforming Swift source code.
Apache License 2.0
3.2k stars 405 forks source link

Use root node for detached node lookup in location retrieval #2792

Closed mateusrodriguesxyz closed 1 month ago

mateusrodriguesxyz commented 1 month ago

Fixes #2791

Maybe just let nodeInOriginalTree = sharedState.detachedNodes[Syntax(node.root)] is sufficient? I tried and no existing tests failed.

ahoppen commented 1 month ago

@swift-ci Please test

ahoppen commented 1 month ago

Thanks for fixing this @mateusrodriguesxyz! 🙏🏽