Skip to content

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

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

Merged
merged 1 commit into from
Aug 9, 2024

Conversation

mateusrodriguesxyz
Copy link
Contributor

@mateusrodriguesxyz mateusrodriguesxyz commented Aug 8, 2024

Fixes #2791

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

Copy link
Member

@ahoppen ahoppen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @mateusrodriguesxyz 🙏🏽

@ahoppen
Copy link
Member

ahoppen commented Aug 9, 2024

@swift-ci Please test

@ahoppen
Copy link
Member

ahoppen commented Aug 9, 2024

Thanks for fixing this @mateusrodriguesxyz! 🙏🏽

@ahoppen ahoppen enabled auto-merge August 9, 2024 14:51
@ahoppen ahoppen merged commit 5170a2d into swiftlang:main Aug 9, 2024
3 checks passed
@AdamCmiel
Copy link

AdamCmiel commented Apr 15, 2025

@mateusrodriguesxyz still seeing this erroneous behavior for attributes of a functionDeclSyntax, I'll write up a test and see if I can't amend the context, see #3056

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Source location retrieving doesn't work in body macro expansion assertion
3 participants